I'm not sure I completely understood the your needs, so please let me know if my answer does not reply your question.
The code presented is supposed to be added into the application source code, not on init.rc file. I think this is why it's not working.
I found 2 Android Developers' how-to which explain the process (directly from Google)
Hiding the Navigation Bar | Android Developers
Using Immersive Full-Screen Mode | Android Developers
Besides that, I would like to say there is 2 bars in android, one is the notification bar and the other is the system/navigation bar. I'm not sure customer wants to hide one or both, so please be aware they are different and have different control settings.
In order to get it working from init.rc, I would expect a property accessible via getprop and setprop. Customer can use getprop (without parameters) to see the complete list and try to find if there is such property available to him.