Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void hideNavigationBar() {
- try {
- Process proc = null;
- String ProcID = "79"; // HONEYCOMB AND OLDER
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
- ProcID = "42"; // ICS AND NEWER
- proc = Runtime.getRuntime().exec(
- new String[] { "su", "-c", "service call activity " + ProcID + " s16 com.android.systemui" });
- proc.waitFor();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public static void showNavigationBar() {
- Process proc = null;
- try {
- proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "am startservice -n com.android.systemui/.SystemUIService" });
- proc.waitFor();
- } catch (Exception e) {
- // do nothing
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement