OSDN Git Service

AOD: prevent clicking shelf when dark
authorAdrian Roos <roosa@google.com>
Wed, 29 Mar 2017 00:54:05 +0000 (17:54 -0700)
committerAdrian Roos <roosa@google.com>
Wed, 5 Apr 2017 18:23:21 +0000 (11:23 -0700)
Fixes: 35718464
Test: Enable AOD, try clicking on shelf in AOD, make sure it's not clickable.
Change-Id: Iede88d1e0ab394f0db2acaac6a1ad8baaeef15f1

packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java

index 8da17fa..8ba4eb5 100644 (file)
@@ -133,6 +133,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
             mViewInvertHelper.update(dark);
         }
         mShelfIcons.setAmbient(dark);
+        updateInteractiveness();
     }
 
     @Override
@@ -576,7 +577,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
     }
 
     private void updateInteractiveness() {
-        mInteractive = mStatusBarState == StatusBarState.KEYGUARD && mHasItemsInStableShelf;
+        mInteractive = mStatusBarState == StatusBarState.KEYGUARD && mHasItemsInStableShelf
+                && !mDark;
         setClickable(mInteractive);
         setFocusable(mInteractive);
         setImportantForAccessibility(mInteractive ? View.IMPORTANT_FOR_ACCESSIBILITY_YES