From 0c4ccff36930ff4f0292b94ad51e164c9fa060a3 Mon Sep 17 00:00:00 2001 From: Daniel Sandler <dsandler@android.com> Date: Wed, 19 Oct 2011 16:39:14 -0400 Subject: Add hasNavigationBar() to the window manager. It is no longer sufficient to check the value of internal.R.bool.config_showNavigationBar to determine if a navigation bar (separate from the status bar) is shown on a device, because the emulator needs to be able to override this value (now possible by setting qemu.hw.mainkeys to "1" or "0", for navbar or no navbar, respectively). This logic is now contained in PhoneWindowManager, and any clients wishing to know whether the system has a software nav bar should consult the new hasNavigationBar() method. Bug: 5404945 Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359 --- services/java/com/android/server/wm/WindowManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'services') diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 68f0e66..3af3e06 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -9263,6 +9263,11 @@ public class WindowManagerService extends IWindowManager.Stub } } + @Override + public boolean hasNavigationBar() { + return mPolicy.hasNavigationBar(); + } + void dumpInput(FileDescriptor fd, PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER INPUT (dumpsys window input)"); mInputManager.dump(pw); -- cgit v1.1