am 22522289: am 84e825a8: Merge "Add hasNavigationBar() to the window manager." into ics-mr0

* commit '22522289fc0fda5c5fdd8c74e72c9f1f84e421f1':
  Add hasNavigationBar() to the window manager.
This commit is contained in:
Daniel Sandler
2011-10-19 18:09:19 -07:00
committed by Android Git Automerger
8 changed files with 45 additions and 10 deletions

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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.
*