Where do I put this service call activity 42 s16 com.android.systemui boot arg in the init.rc file?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where do I put this service call activity 42 s16 com.android.systemui boot arg in the init.rc file?

1,979 Views
cliftonjones
Contributor I

I am using the service call activity 42 s16 com.android.systemui  to remove the service bar in my solution. My question is where would I put this function in the init.rc file.  I am using the android 4.43 on the sabre lite board from boundary devices .

Labels (1)
0 Kudos
4 Replies

1,009 Views
jamesbone
NXP TechSupport
NXP TechSupport
0 Kudos

1,009 Views
cliftonjones
Contributor I

I am  using the one of the hide tool bar functions described in the links and they don't seem to be working. the notification bar does not go away at all please let me know if implemented this correctly?

super.onCreate(savedInstanceState);
if (!Config.DEBUG)
Thread.setDefaultUncaughtExceptionHandler(new AppExceptionHandler(this, MainMenu.class));

// Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//// Remove notification bar
//this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
//WindowManager.LayoutParams.FLAG_FULLSCREEN);
//HIDE TOOLBAR
try{
    //REQUIRES ROOT
    Build.VERSION_CODES vc = new Build.VERSION_CODES();
    Build.VERSION vr = new Build.VERSION();
    String ProcID = "79"; //HONEYCOMB AND OLDER

    //v.RELEASE  //4.0.3
    if(vr.SDK_INT >= vc.ICE_CREAM_SANDWICH){
        ProcID = "42"; //ICS AND NEWER
    }

    //REQUIRES ROOT
    Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity "+ ProcID +" s16 com.android.systemui"}); //WAS 79
    proc.waitFor();

}catch(Exception ex){
    Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
}

setContentView(R.layout.main);
0 Kudos

1,009 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Clift,

Let me ask internally, to see if the developers of android know about how to remove it from the beginning.

0 Kudos

1,009 Views
jamesbone
NXP TechSupport
NXP TechSupport

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.