* commit '22522289fc0fda5c5fdd8c74e72c9f1f84e421f1': Add hasNavigationBar() to the window manager.
This commit is contained in:
@@ -224,4 +224,9 @@ interface IWindowManager
|
||||
* Block until the given window has been drawn to the screen.
|
||||
*/
|
||||
void waitForWindowDrawn(IBinder token, in IRemoteCallback callback);
|
||||
|
||||
/**
|
||||
* Device has a software navigation bar (separate from the status bar).
|
||||
*/
|
||||
boolean hasNavigationBar();
|
||||
}
|
||||
|
||||
@@ -292,8 +292,7 @@ public class ViewConfiguration {
|
||||
if (!sHasPermanentMenuKeySet) {
|
||||
IWindowManager wm = Display.getWindowManager();
|
||||
try {
|
||||
sHasPermanentMenuKey = wm.canStatusBarHide() && !res.getBoolean(
|
||||
com.android.internal.R.bool.config_showNavigationBar);
|
||||
sHasPermanentMenuKey = wm.canStatusBarHide() && !wm.hasNavigationBar();
|
||||
sHasPermanentMenuKeySet = true;
|
||||
} catch (RemoteException ex) {
|
||||
sHasPermanentMenuKey = false;
|
||||
|
||||
@@ -1009,6 +1009,11 @@ public interface WindowManagerPolicy {
|
||||
*/
|
||||
public int adjustSystemUiVisibilityLw(int visibility);
|
||||
|
||||
/**
|
||||
* Specifies whether there is an on-screen navigation bar separate from the status bar.
|
||||
*/
|
||||
public boolean hasNavigationBar();
|
||||
|
||||
/**
|
||||
* Print the WindowManagerPolicy's state into the given stream.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user