Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -144,11 +144,6 @@ object Flags { "lockscreen_custom_clocks" ) // TODO(b/275694445): Tracking Bug @JvmField val LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING = releasedFlag("lockscreen_without_secure_lock_when_dreaming") // TODO(b/286092087): Tracking Bug @JvmField val ENABLE_SYSTEM_UI_DREAM_CONTROLLER = unreleasedFlag("enable_system_ui_dream_controller") Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +5 −6 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ import com.android.systemui.util.time.SystemClock; import com.android.systemui.wallpapers.data.repository.WallpaperRepository; import com.android.wm.shell.keyguard.KeyguardTransitions; import dagger.Lazy; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading @@ -180,7 +182,8 @@ import java.util.Objects; import java.util.concurrent.Executor; import java.util.function.Consumer; import dagger.Lazy; import kotlinx.coroutines.CoroutineDispatcher; /** Loading Loading @@ -1933,11 +1936,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, public void onDreamingStarted() { mUpdateMonitor.dispatchDreamingStarted(); synchronized (this) { final boolean alwaysShowKeyguard = mFeatureFlags.isEnabled(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING); if (mDeviceInteractive && (alwaysShowKeyguard || mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser()))) { if (mDeviceInteractive) { doKeyguardLaterLocked(); } } Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +0 −26 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.keyguard; import static android.os.PowerManager.WAKE_REASON_WAKE_MOTION; import static android.provider.Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT; import static android.view.WindowManager.TRANSIT_OLD_KEYGUARD_GOING_AWAY; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_TIMEOUT; Loading Loading @@ -634,29 +633,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { assertEquals(DELAYED_KEYGUARD_ACTION, pendingIntent.getValue().getIntent().getAction()); } @Test public void lockAfterSpecifiedAfterDreamStarted() { int currentUserId = 99; int userSpecificTimeout = 5999; KeyguardUpdateMonitor.setCurrentUser(currentUserId); // set mDeviceInteractive to true mViewMediator.onStartedWakingUp(WAKE_REASON_WAKE_MOTION, false); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, false); when(mLockPatternUtils.isSecure(currentUserId)).thenReturn(true); when(mDevicePolicyManager.getMaximumTimeToLock(null, currentUserId)).thenReturn(0L); when(mSecureSettings.getIntForUser(LOCK_SCREEN_LOCK_AFTER_TIMEOUT, KEYGUARD_LOCK_AFTER_DELAY_DEFAULT, currentUserId)).thenReturn(userSpecificTimeout); mSystemClock.setElapsedRealtime(0L); ArgumentCaptor<PendingIntent> pendingIntent = ArgumentCaptor.forClass(PendingIntent.class); mViewMediator.onDreamingStarted(); verify(mAlarmManager).setExactAndAllowWhileIdle(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(Long.valueOf(userSpecificTimeout)), pendingIntent.capture()); assertEquals(DELAYED_KEYGUARD_ACTION, pendingIntent.getValue().getIntent().getAction()); } @Test public void testHideSurfaceBehindKeyguardMarksKeyguardNotGoingAway() { mViewMediator.hideSurfaceBehindKeyguard(); Loading Loading @@ -1023,7 +999,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.setShowingLocked(false); when(mKeyguardStateController.isShowing()).thenReturn(false); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, false); mViewMediator.onDreamingStarted(); assertFalse(mViewMediator.isShowingAndNotOccluded()); } Loading @@ -1034,7 +1009,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.setShowingLocked(true); when(mKeyguardStateController.isShowing()).thenReturn(true); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, true); mViewMediator.onDreamingStarted(); assertTrue(mViewMediator.isShowingAndNotOccluded()); } Loading Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -144,11 +144,6 @@ object Flags { "lockscreen_custom_clocks" ) // TODO(b/275694445): Tracking Bug @JvmField val LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING = releasedFlag("lockscreen_without_secure_lock_when_dreaming") // TODO(b/286092087): Tracking Bug @JvmField val ENABLE_SYSTEM_UI_DREAM_CONTROLLER = unreleasedFlag("enable_system_ui_dream_controller") Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +5 −6 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ import com.android.systemui.util.time.SystemClock; import com.android.systemui.wallpapers.data.repository.WallpaperRepository; import com.android.wm.shell.keyguard.KeyguardTransitions; import dagger.Lazy; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading @@ -180,7 +182,8 @@ import java.util.Objects; import java.util.concurrent.Executor; import java.util.function.Consumer; import dagger.Lazy; import kotlinx.coroutines.CoroutineDispatcher; /** Loading Loading @@ -1933,11 +1936,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, public void onDreamingStarted() { mUpdateMonitor.dispatchDreamingStarted(); synchronized (this) { final boolean alwaysShowKeyguard = mFeatureFlags.isEnabled(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING); if (mDeviceInteractive && (alwaysShowKeyguard || mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser()))) { if (mDeviceInteractive) { doKeyguardLaterLocked(); } } Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +0 −26 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.keyguard; import static android.os.PowerManager.WAKE_REASON_WAKE_MOTION; import static android.provider.Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT; import static android.view.WindowManager.TRANSIT_OLD_KEYGUARD_GOING_AWAY; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_TIMEOUT; Loading Loading @@ -634,29 +633,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { assertEquals(DELAYED_KEYGUARD_ACTION, pendingIntent.getValue().getIntent().getAction()); } @Test public void lockAfterSpecifiedAfterDreamStarted() { int currentUserId = 99; int userSpecificTimeout = 5999; KeyguardUpdateMonitor.setCurrentUser(currentUserId); // set mDeviceInteractive to true mViewMediator.onStartedWakingUp(WAKE_REASON_WAKE_MOTION, false); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, false); when(mLockPatternUtils.isSecure(currentUserId)).thenReturn(true); when(mDevicePolicyManager.getMaximumTimeToLock(null, currentUserId)).thenReturn(0L); when(mSecureSettings.getIntForUser(LOCK_SCREEN_LOCK_AFTER_TIMEOUT, KEYGUARD_LOCK_AFTER_DELAY_DEFAULT, currentUserId)).thenReturn(userSpecificTimeout); mSystemClock.setElapsedRealtime(0L); ArgumentCaptor<PendingIntent> pendingIntent = ArgumentCaptor.forClass(PendingIntent.class); mViewMediator.onDreamingStarted(); verify(mAlarmManager).setExactAndAllowWhileIdle(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(Long.valueOf(userSpecificTimeout)), pendingIntent.capture()); assertEquals(DELAYED_KEYGUARD_ACTION, pendingIntent.getValue().getIntent().getAction()); } @Test public void testHideSurfaceBehindKeyguardMarksKeyguardNotGoingAway() { mViewMediator.hideSurfaceBehindKeyguard(); Loading Loading @@ -1023,7 +999,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.setShowingLocked(false); when(mKeyguardStateController.isShowing()).thenReturn(false); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, false); mViewMediator.onDreamingStarted(); assertFalse(mViewMediator.isShowingAndNotOccluded()); } Loading @@ -1034,7 +1009,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.setShowingLocked(true); when(mKeyguardStateController.isShowing()).thenReturn(true); mFeatureFlags.set(Flags.LOCKSCREEN_WITHOUT_SECURE_LOCK_WHEN_DREAMING, true); mViewMediator.onDreamingStarted(); assertTrue(mViewMediator.isShowingAndNotOccluded()); } Loading