-1

have already read the article How to hide navigation bar permanently in android activity? have also tried Permanently hide Navigation Bar in an activity

But that is not what I want My question is can I change code from os source which hide navigation bar permanently

such as path:frameworks\base\services\java\com\android\server\SystemServer.java where the main start and where can I set navigation bar invisible

which in user view they cannot see navigationbar forever after they power on their device

jason yu
  • 21
  • 5
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 30 '22 at 19:27

1 Answers1

0

the solution might only work in android 11 yep I will just answer this by myself

to remove the navigation bar on the entire system the andoird 11 works totally different compare to android 7

they remove PhoneStatusBar.java and combine it into StatusBar.java

both of them are in ..\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone

in Android7 method people use

mWindowManager.removeViewImmediate(mNavigationBarView);

but this might not works properly and might cause SystemUI shut down

try use below method to do so Path ..\SystemUI\src\com\android\systemui\statusbar\NavigationBarController.java

@Override
    public void onDisplayRemoved(int displayId) {
        removeNavigationBar(displayId);
    }


Using view to set flag cannot work properly because when you switch window or app the nav bar will appear again
jason yu
  • 21
  • 5