Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.TimeZone; public interface ClockPlugin extends Plugin { String ACTION = "com.android.systemui.action.PLUGIN_CLOCK"; int VERSION = 4; int VERSION = 5; /** * Get the name of the clock face. Loading Loading @@ -71,6 +71,14 @@ public interface ClockPlugin extends Plugin { return null; } /** * Returns the preferred Y position of the clock. * * @param totalHeight Height of the parent container. * @return preferred Y position. */ int getPreferredY(int totalHeight); /** * Allows the plugin to clean up resources when no longer needed. * Loading packages/SystemUI/res-keyguard/layout/analog_clock.xml +0 −16 Original line number Diff line number Diff line Loading @@ -19,22 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <TextClock android:id="@+id/digital_clock" android:paddingStart="20dp" android:layout_marginTop="72dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" android:layout_width="wrap_content" Loading packages/SystemUI/res-keyguard/layout/bubble_clock.xml +0 −16 Original line number Diff line number Diff line Loading @@ -19,22 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <TextClock android:id="@+id/digital_clock" android:paddingStart="20dp" android:layout_marginTop="72dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" android:layout_width="wrap_content" Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +14 −0 Original line number Diff line number Diff line Loading @@ -297,6 +297,20 @@ public class KeyguardClockSwitch extends RelativeLayout { return mClockView.getTextSize(); } /** * Returns the preferred Y position of the clock. * * @param totalHeight Height of the parent container. * @return preferred Y position. */ int getPreferredY(int totalHeight) { if (mClockPlugin != null) { return mClockPlugin.getPreferredY(totalHeight); } else { return totalHeight / 2; } } /** * Refresh the time of the clock, due to either time tick broadcast or doze time tick alarm. */ Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +10 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,16 @@ public class KeyguardStatusView extends GridLayout implements return mClockView.getTextSize(); } /** * Returns the preferred Y position of the clock. * * @param totalHeight The height available to position the clock. * @return Y position of clock. */ public int getClockPreferredY(int totalHeight) { return mClockView.getPreferredY(totalHeight); } private void updateLogoutView() { if (mLogoutView == null) { return; Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.TimeZone; public interface ClockPlugin extends Plugin { String ACTION = "com.android.systemui.action.PLUGIN_CLOCK"; int VERSION = 4; int VERSION = 5; /** * Get the name of the clock face. Loading Loading @@ -71,6 +71,14 @@ public interface ClockPlugin extends Plugin { return null; } /** * Returns the preferred Y position of the clock. * * @param totalHeight Height of the parent container. * @return preferred Y position. */ int getPreferredY(int totalHeight); /** * Allows the plugin to clean up resources when no longer needed. * Loading
packages/SystemUI/res-keyguard/layout/analog_clock.xml +0 −16 Original line number Diff line number Diff line Loading @@ -19,22 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <TextClock android:id="@+id/digital_clock" android:paddingStart="20dp" android:layout_marginTop="72dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" android:layout_width="wrap_content" Loading
packages/SystemUI/res-keyguard/layout/bubble_clock.xml +0 −16 Original line number Diff line number Diff line Loading @@ -19,22 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" > <TextClock android:id="@+id/digital_clock" android:paddingStart="20dp" android:layout_marginTop="72dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top|left" android:textSize="44dp" android:letterSpacing="0.05" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" style="@style/widget_big" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" /> <com.android.keyguard.clock.ImageClock android:id="@+id/analog_clock" android:layout_width="wrap_content" Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +14 −0 Original line number Diff line number Diff line Loading @@ -297,6 +297,20 @@ public class KeyguardClockSwitch extends RelativeLayout { return mClockView.getTextSize(); } /** * Returns the preferred Y position of the clock. * * @param totalHeight Height of the parent container. * @return preferred Y position. */ int getPreferredY(int totalHeight) { if (mClockPlugin != null) { return mClockPlugin.getPreferredY(totalHeight); } else { return totalHeight / 2; } } /** * Refresh the time of the clock, due to either time tick broadcast or doze time tick alarm. */ Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +10 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,16 @@ public class KeyguardStatusView extends GridLayout implements return mClockView.getTextSize(); } /** * Returns the preferred Y position of the clock. * * @param totalHeight The height available to position the clock. * @return Y position of clock. */ public int getClockPreferredY(int totalHeight) { return mClockView.getPreferredY(totalHeight); } private void updateLogoutView() { if (mLogoutView == null) { return; Loading