summaryrefslogtreecommitdiff
path: root/core/java/android/view
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/IWindowManager.aidl5
-rw-r--r--core/java/android/view/ViewConfiguration.java3
-rw-r--r--core/java/android/view/WindowManagerPolicy.java5
3 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index fe32a5f196a4..93a9d50ac479 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -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();
}
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 5e104f9e373f..3441f7e57d7f 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -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;
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 17bdff2c9628..2e19bf64d3e1 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -1010,6 +1010,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.
*
* @param prefix Text to print at the front of each line.