OSDN Git Service

Disable camera and search from some security screens.
authorJim Miller <jaggies@google.com>
Tue, 8 Oct 2013 00:12:27 +0000 (17:12 -0700)
committerJim Miller <jaggies@google.com>
Tue, 8 Oct 2013 00:13:45 +0000 (17:13 -0700)
This disables showing the camera and search buttons in the
navbar while SIM, PUK and Account security screens are showing.

Fixes bug 10991981

Change-Id: Ic64adc079685948f8c1114dbdefa42a671948350

packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java

index 63aab4d..f1af3b3 100644 (file)
@@ -972,6 +972,11 @@ public class KeyguardHostView extends KeyguardViewBase {
         mAppWidgetContainer.setVisibility(
                 isSimOrAccount && fullScreenEnabled ? View.GONE : View.VISIBLE);
 
+        // Don't show camera or search in navbar when SIM or Account screen is showing
+        setSystemUiVisibility(isSimOrAccount ?
+                (getSystemUiVisibility() | View.STATUS_BAR_DISABLE_SEARCH)
+                : (getSystemUiVisibility() & ~View.STATUS_BAR_DISABLE_SEARCH));
+
         if (mSlidingChallengeLayout != null) {
             mSlidingChallengeLayout.setChallengeInteractive(!fullScreenEnabled);
         }