From: Robert Snoeberger Date: Tue, 16 Apr 2019 20:55:21 +0000 (-0400) Subject: Add smart space to custom clock faces. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=699568050da6694c0610de67bf3713cf330df922;p=android-x86%2Fframeworks-base.git Add smart space to custom clock faces. This changes adds a hook to the ClockPlugin to allow the custom clock to control the position of the smart space. Still todo: - move out of the way for the lock icon - don't slide smart space down on lock screen when no notifs are showing Bug: 129348218 Test: Manually checked custom clock faces. Change-Id: I2472f6b2bb54f94e2e673f01c78170c0e7f87627 --- diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java index 58d50ead72ce..6c6c9270bc84 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java @@ -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. @@ -72,6 +72,14 @@ public interface ClockPlugin extends Plugin { } /** + * 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. * * Called when the view previously created by {@link ClockPlugin#getView()} has been detached diff --git a/packages/SystemUI/res-keyguard/layout/analog_clock.xml b/packages/SystemUI/res-keyguard/layout/analog_clock.xml index cf6d35ee27af..ee0df48f4f5d 100644 --- a/packages/SystemUI/res-keyguard/layout/analog_clock.xml +++ b/packages/SystemUI/res-keyguard/layout/analog_clock.xml @@ -19,22 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - -