Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +7 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,13 @@ public interface ClockPlugin extends Plugin { */ default void onTimeZoneChanged(TimeZone timeZone) {} /** * Notifies that the time format has changed. * * @param timeFormat "12" for 12-hour format, "24" for 24-hour format */ default void onTimeFormatChanged(String timeFormat) {} /** * Indicates whether the keyguard status area (date) should be shown below * the clock. Loading packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +6 −2 Original line number Diff line number Diff line Loading @@ -73,13 +73,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:textSize="80dp" android:textSize="100dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:elegantTextHeight="false" dozeWeight="200" lockScreenWeight="300" /> </FrameLayout> <FrameLayout Loading @@ -95,13 +97,15 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" android:textSize="180dp" android:textSize="200dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:elegantTextHeight="false" dozeWeight="100" lockScreenWeight="400" /> </FrameLayout> <include layout="@layout/keyguard_status_area" Loading packages/SystemUI/res-keyguard/values/attrs.xml +5 −0 Original line number Diff line number Diff line Loading @@ -39,4 +39,9 @@ </declare-styleable> <attr name="passwordStyle" format="reference" /> <declare-styleable name="AnimatableClockView"> <attr name="dozeWeight" format="integer" /> <attr name="lockScreenWeight" format="integer" /> </declare-styleable> </resources> packages/SystemUI/res-keyguard/values/styles.xml +0 −1 Original line number Diff line number Diff line Loading @@ -137,5 +137,4 @@ <item name="android:shadowColor">@color/keyguard_shadow_color</item> <item name="android:shadowRadius">?attr/shadowRadius</item> </style> </resources> packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +17 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ import com.android.settingslib.Utils; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.util.ViewController; import java.util.TimeZone; /** * Controls the color of a GradientTextClock. */ Loading Loading @@ -62,12 +64,26 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie } /** * Updates the time for this view. * Updates the time for the view. */ public void refreshTime() { mView.refreshTime(); } /** * Updates the timezone for the view. */ public void onTimeZoneChanged(TimeZone timeZone) { mView.onTimeZoneChanged(timeZone); } /** * Trigger a time format update */ public void refreshFormat() { mView.refreshFormat(); } private void initColors() { mLockScreenColors[0] = Utils.getColorAttrDefaultColor(getContext(), com.android.systemui.R.attr.wallpaperTextColor); Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +7 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,13 @@ public interface ClockPlugin extends Plugin { */ default void onTimeZoneChanged(TimeZone timeZone) {} /** * Notifies that the time format has changed. * * @param timeFormat "12" for 12-hour format, "24" for 24-hour format */ default void onTimeFormatChanged(String timeFormat) {} /** * Indicates whether the keyguard status area (date) should be shown below * the clock. Loading
packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +6 −2 Original line number Diff line number Diff line Loading @@ -73,13 +73,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:textSize="80dp" android:textSize="100dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:elegantTextHeight="false" dozeWeight="200" lockScreenWeight="300" /> </FrameLayout> <FrameLayout Loading @@ -95,13 +97,15 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" android:textSize="180dp" android:textSize="200dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:elegantTextHeight="false" dozeWeight="100" lockScreenWeight="400" /> </FrameLayout> <include layout="@layout/keyguard_status_area" Loading
packages/SystemUI/res-keyguard/values/attrs.xml +5 −0 Original line number Diff line number Diff line Loading @@ -39,4 +39,9 @@ </declare-styleable> <attr name="passwordStyle" format="reference" /> <declare-styleable name="AnimatableClockView"> <attr name="dozeWeight" format="integer" /> <attr name="lockScreenWeight" format="integer" /> </declare-styleable> </resources>
packages/SystemUI/res-keyguard/values/styles.xml +0 −1 Original line number Diff line number Diff line Loading @@ -137,5 +137,4 @@ <item name="android:shadowColor">@color/keyguard_shadow_color</item> <item name="android:shadowRadius">?attr/shadowRadius</item> </style> </resources>
packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +17 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ import com.android.settingslib.Utils; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.util.ViewController; import java.util.TimeZone; /** * Controls the color of a GradientTextClock. */ Loading Loading @@ -62,12 +64,26 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie } /** * Updates the time for this view. * Updates the time for the view. */ public void refreshTime() { mView.refreshTime(); } /** * Updates the timezone for the view. */ public void onTimeZoneChanged(TimeZone timeZone) { mView.onTimeZoneChanged(timeZone); } /** * Trigger a time format update */ public void refreshFormat() { mView.refreshFormat(); } private void initColors() { mLockScreenColors[0] = Utils.getColorAttrDefaultColor(getContext(), com.android.systemui.R.attr.wallpaperTextColor); Loading