Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +25 −15 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import androidx.annotation.VisibleForTesting; import com.android.systemui.Dumpable; import com.android.systemui.common.ui.ConfigurationState; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlagsClassic; Loading Loading @@ -78,6 +79,7 @@ import com.android.systemui.util.settings.SecureSettings; import java.io.PrintWriter; import java.util.Locale; import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.inject.Inject; Loading Loading @@ -136,6 +138,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private KeyguardInteractor mKeyguardInteractor; private KeyguardClockInteractor mKeyguardClockInteractor; private final DelayableExecutor mUiExecutor; private final Executor mBgExecutor; private boolean mCanShowDoubleLineClock = true; private DisposableHandle mAodIconsBindHandle; @Nullable private NotificationIconContainer mAodIconContainer; Loading Loading @@ -186,6 +189,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS KeyguardUnlockAnimationController keyguardUnlockAnimationController, SecureSettings secureSettings, @Main DelayableExecutor uiExecutor, @Background Executor bgExecutor, DumpManager dumpManager, ClockEventController clockEventController, @KeyguardClockLog LogBuffer logBuffer, Loading @@ -209,6 +213,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mIconViewBindingFailureTracker = iconViewBindingFailureTracker; mSecureSettings = secureSettings; mUiExecutor = uiExecutor; mBgExecutor = bgExecutor; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mDumpManager = dumpManager; mClockEventController = clockEventController; Loading Loading @@ -328,6 +333,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS updateAodIcons(); mStatusArea = mView.findViewById(R.id.keyguard_status_area); mBgExecutor.execute(() -> { mSecureSettings.registerContentObserverForUser( Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, false, /* notifyForDescendants */ Loading @@ -341,6 +347,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mShowWeatherObserver, UserHandle.USER_ALL ); }); updateDoubleLineClock(); mKeyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( Loading Loading @@ -382,8 +390,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mClockEventController.unregisterListeners(); setClock(null); mBgExecutor.execute(() -> { mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserver(mShowWeatherObserver); }); mKeyguardUnlockAnimationController.removeKeyguardUnlockAnimationListener( mKeyguardUnlockAnimationListener); Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class KeyguardClockSwitchControllerBaseTest extends SysuiTestCase { mKeyguardUnlockAnimationController, mSecureSettings, mExecutor, mExecutor, mDumpManager, mClockEventController, mLogBuffer, Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); Loading Loading @@ -212,6 +213,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +25 −15 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import androidx.annotation.VisibleForTesting; import com.android.systemui.Dumpable; import com.android.systemui.common.ui.ConfigurationState; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlagsClassic; Loading Loading @@ -78,6 +79,7 @@ import com.android.systemui.util.settings.SecureSettings; import java.io.PrintWriter; import java.util.Locale; import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.inject.Inject; Loading Loading @@ -136,6 +138,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private KeyguardInteractor mKeyguardInteractor; private KeyguardClockInteractor mKeyguardClockInteractor; private final DelayableExecutor mUiExecutor; private final Executor mBgExecutor; private boolean mCanShowDoubleLineClock = true; private DisposableHandle mAodIconsBindHandle; @Nullable private NotificationIconContainer mAodIconContainer; Loading Loading @@ -186,6 +189,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS KeyguardUnlockAnimationController keyguardUnlockAnimationController, SecureSettings secureSettings, @Main DelayableExecutor uiExecutor, @Background Executor bgExecutor, DumpManager dumpManager, ClockEventController clockEventController, @KeyguardClockLog LogBuffer logBuffer, Loading @@ -209,6 +213,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mIconViewBindingFailureTracker = iconViewBindingFailureTracker; mSecureSettings = secureSettings; mUiExecutor = uiExecutor; mBgExecutor = bgExecutor; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mDumpManager = dumpManager; mClockEventController = clockEventController; Loading Loading @@ -328,6 +333,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS updateAodIcons(); mStatusArea = mView.findViewById(R.id.keyguard_status_area); mBgExecutor.execute(() -> { mSecureSettings.registerContentObserverForUser( Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, false, /* notifyForDescendants */ Loading @@ -341,6 +347,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mShowWeatherObserver, UserHandle.USER_ALL ); }); updateDoubleLineClock(); mKeyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( Loading Loading @@ -382,8 +390,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mClockEventController.unregisterListeners(); setClock(null); mBgExecutor.execute(() -> { mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserver(mShowWeatherObserver); }); mKeyguardUnlockAnimationController.removeKeyguardUnlockAnimationListener( mKeyguardUnlockAnimationListener); Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class KeyguardClockSwitchControllerBaseTest extends SysuiTestCase { mKeyguardUnlockAnimationController, mSecureSettings, mExecutor, mExecutor, mDumpManager, mClockEventController, mLogBuffer, Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); Loading Loading @@ -212,6 +213,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); Loading