Loading packages/SystemUI/res/layout/super_notification_shade.xml +0 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ android:id="@+id/scrim_behind" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading @@ -38,7 +37,6 @@ android:id="@+id/scrim_notifications" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading Loading @@ -78,7 +76,6 @@ android:id="@+id/scrim_in_front" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java +2 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,8 @@ public class ScrimView extends View { public ScrimView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); setFocusable(false); setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); mDrawable = new ScrimDrawable(); mDrawable.setCallback(this); mColors = new ColorExtractor.GradientColors(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +0 −9 Original line number Diff line number Diff line Loading @@ -396,9 +396,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump states[i].setDefaultScrimAlpha(mDefaultScrimAlpha); } mScrimBehind.setDefaultFocusHighlightEnabled(false); mNotificationsScrim.setDefaultFocusHighlightEnabled(false); mScrimInFront.setDefaultFocusHighlightEnabled(false); mTransparentScrimBackground = notificationsScrim.getResources() .getBoolean(R.bool.notification_scrim_transparent); updateScrims(); Loading Loading @@ -509,12 +506,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump applyState(); // Scrim might acquire focus when user is navigating with a D-pad or a keyboard. // We need to disable focus otherwise AOD would end up with a gray overlay. mScrimInFront.setFocusable(!state.isLowPowerState()); mScrimBehind.setFocusable(!state.isLowPowerState()); mNotificationsScrim.setFocusable(!state.isLowPowerState()); mScrimInFront.setBlendWithMainColor(state.shouldBlendWithMainColor()); // Cancel blanking transitions that were pending before we requested a new state Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +5 −16 Original line number Diff line number Diff line Loading @@ -1185,14 +1185,11 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test public void testScrimFocus() { mScrimController.transitionTo(ScrimState.AOD); assertFalse("Should not be focusable on AOD", mScrimBehind.isFocusable()); assertFalse("Should not be focusable on AOD", mScrimInFront.isFocusable()); mScrimController.transitionTo(ScrimState.KEYGUARD); Assert.assertTrue("Should be focusable on keyguard", mScrimBehind.isFocusable()); Assert.assertTrue("Should be focusable on keyguard", mScrimInFront.isFocusable()); public void testScrimsAreNotFocusable() { assertFalse("Behind scrim should not be focusable", mScrimBehind.isFocusable()); assertFalse("Front scrim should not be focusable", mScrimInFront.isFocusable()); assertFalse("Notifications scrim should not be focusable", mNotificationsScrim.isFocusable()); } @Test Loading Loading @@ -1262,14 +1259,6 @@ public class ScrimControllerTest extends SysuiTestCase { ScrimState.AOD.getAnimateChange()); } @Test public void testViewsDontHaveFocusHighlight() { assertFalse("Scrim shouldn't have focus highlight", mScrimInFront.getDefaultFocusHighlightEnabled()); assertFalse("Scrim shouldn't have focus highlight", mScrimBehind.getDefaultFocusHighlightEnabled()); } @Test public void testIsLowPowerMode() { HashSet<ScrimState> lowPowerModeStates = new HashSet<>(Arrays.asList( Loading Loading
packages/SystemUI/res/layout/super_notification_shade.xml +0 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ android:id="@+id/scrim_behind" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading @@ -38,7 +37,6 @@ android:id="@+id/scrim_notifications" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading Loading @@ -78,7 +76,6 @@ android:id="@+id/scrim_in_front" android:layout_width="match_parent" android:layout_height="match_parent" android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> Loading
packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java +2 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,8 @@ public class ScrimView extends View { public ScrimView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); setFocusable(false); setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); mDrawable = new ScrimDrawable(); mDrawable.setCallback(this); mColors = new ColorExtractor.GradientColors(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +0 −9 Original line number Diff line number Diff line Loading @@ -396,9 +396,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump states[i].setDefaultScrimAlpha(mDefaultScrimAlpha); } mScrimBehind.setDefaultFocusHighlightEnabled(false); mNotificationsScrim.setDefaultFocusHighlightEnabled(false); mScrimInFront.setDefaultFocusHighlightEnabled(false); mTransparentScrimBackground = notificationsScrim.getResources() .getBoolean(R.bool.notification_scrim_transparent); updateScrims(); Loading Loading @@ -509,12 +506,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump applyState(); // Scrim might acquire focus when user is navigating with a D-pad or a keyboard. // We need to disable focus otherwise AOD would end up with a gray overlay. mScrimInFront.setFocusable(!state.isLowPowerState()); mScrimBehind.setFocusable(!state.isLowPowerState()); mNotificationsScrim.setFocusable(!state.isLowPowerState()); mScrimInFront.setBlendWithMainColor(state.shouldBlendWithMainColor()); // Cancel blanking transitions that were pending before we requested a new state Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +5 −16 Original line number Diff line number Diff line Loading @@ -1185,14 +1185,11 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test public void testScrimFocus() { mScrimController.transitionTo(ScrimState.AOD); assertFalse("Should not be focusable on AOD", mScrimBehind.isFocusable()); assertFalse("Should not be focusable on AOD", mScrimInFront.isFocusable()); mScrimController.transitionTo(ScrimState.KEYGUARD); Assert.assertTrue("Should be focusable on keyguard", mScrimBehind.isFocusable()); Assert.assertTrue("Should be focusable on keyguard", mScrimInFront.isFocusable()); public void testScrimsAreNotFocusable() { assertFalse("Behind scrim should not be focusable", mScrimBehind.isFocusable()); assertFalse("Front scrim should not be focusable", mScrimInFront.isFocusable()); assertFalse("Notifications scrim should not be focusable", mNotificationsScrim.isFocusable()); } @Test Loading Loading @@ -1262,14 +1259,6 @@ public class ScrimControllerTest extends SysuiTestCase { ScrimState.AOD.getAnimateChange()); } @Test public void testViewsDontHaveFocusHighlight() { assertFalse("Scrim shouldn't have focus highlight", mScrimInFront.getDefaultFocusHighlightEnabled()); assertFalse("Scrim shouldn't have focus highlight", mScrimBehind.getDefaultFocusHighlightEnabled()); } @Test public void testIsLowPowerMode() { HashSet<ScrimState> lowPowerModeStates = new HashSet<>(Arrays.asList( Loading