Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7dacfde authored by Matt Pietal's avatar Matt Pietal Committed by Automerger Merge Worker
Browse files

Merge "Add support to configure double line clock in lockscreen [1/2]" into...

Merge "Add support to configure double line clock in lockscreen [1/2]" into main am: 90693766 am: 3ed530e2 am: 095d79fa

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2527300



Change-Id: I144cfebb6d3b5dd9d7741e7beffb37b8da002e49
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 34b5c9cd 095d79fa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1419,6 +1419,11 @@
    <!-- Is the lock-screen disabled for new users by default -->
    <bool name="config_disableLockscreenByDefault">false</bool>

    <!-- Provides default value for double line clock in lock screen setting:
         0 - Don't show double line clock
         1 - Show double line clock in lock screen (default) -->
    <integer name="config_doublelineClockDefault">1</integer>

    <!-- If true, enables verification of the lockscreen credential in the factory reset protection
        flow. This should be true if gatekeeper / weaver credentials can still be checked after a
        factory reset. -->
+3 −0
Original line number Diff line number Diff line
@@ -2348,6 +2348,9 @@
  <java-symbol type="dimen" name="popup_enter_animation_from_y_delta" />
  <java-symbol type="dimen" name="popup_exit_animation_to_y_delta" />

  <!-- For double line clock in lock screen -->
  <java-symbol type="integer" name="config_doublelineClockDefault"/>

  <!-- ImfTest -->
  <java-symbol type="layout" name="auto_complete_list" />

+2 −1
Original line number Diff line number Diff line
@@ -506,7 +506,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS

    private void updateDoubleLineClock() {
        mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
            Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1,
            Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, mView.getResources()
                .getInteger(com.android.internal.R.integer.config_doublelineClockDefault),
                UserHandle.USER_CURRENT) != 0;

        if (!mCanShowDoubleLineClock) {
+4 −0
Original line number Diff line number Diff line
@@ -153,6 +153,9 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase {
        when(mResources.getInteger(R.integer.keyguard_date_weather_view_invisibility))
                .thenReturn(View.INVISIBLE);

        when(mResources.getInteger(com.android.internal.R.integer.config_doublelineClockDefault))
                .thenReturn(1);

        when(mView.findViewById(R.id.lockscreen_clock_view_large)).thenReturn(mLargeClockFrame);
        when(mView.findViewById(R.id.lockscreen_clock_view)).thenReturn(mSmallClockFrame);
        when(mSmallClockView.getContext()).thenReturn(getContext());
@@ -318,6 +321,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase {

        // When a settings change has occurred to the small clock, make sure the view is adjusted
        reset(mView);
        when(mView.getResources()).thenReturn(mResources);
        observer.onChange(true);
        mExecutor.runAllReady();
        verify(mView).switchToClock(KeyguardClockSwitch.SMALL, /* animate */ true);