commit | cddf1fa5eb3f2e1a5a22955e2ab6cc516ab9540f | [log] [tgz] |
---|---|---|
author | Hawkwood Glazier <jglazier@google.com> | Tue May 28 21:42:53 2024 +0000 |
committer | Hawkwood Glazier <jglazier@google.com> | Thu May 30 17:32:17 2024 +0000 |
tree | 318627cb0887433dfd1d69fab8de68fc93e20c33 | |
parent | 48952cc73e864c11e3a512a8cb288e8fd5d27a4b [diff] |
Add flag for clock reactive variants Bug: 340253296 Bug: 343495953 Test: Manually tested the interaction Flag: com.android.systemui.clock_reactive_variants Change-Id: Ibbb9bc4177101037abcd0b93673ce8df2681775b
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig index 1df9c88e..37f42a4 100644 --- a/packages/SystemUI/aconfig/systemui.aconfig +++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -414,6 +414,13 @@ } flag { + name: "clock_reactive_variants" + namespace: "systemui" + description: "Add reactive variant fonts to some clocks" + bug: "343495953" +} + +flag { name: "fast_unlock_transition" namespace: "systemui" description: "Faster wallpaper unlock transition"
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt index b392014..502dbe3 100644 --- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
@@ -239,6 +239,8 @@ } inner class DefaultClockEvents : ClockEvents { + override var isReactiveTouchInteractionEnabled: Boolean = false + override fun onTimeFormatChanged(is24Hr: Boolean) = clocks.forEach { it.refreshFormat(is24Hr) }
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt b/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt index 629c96c..c7998f0 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt
@@ -153,6 +153,9 @@ /** Events that should call when various rendering parameters change */ interface ClockEvents { + /** Set to enable or disable swipe interaction */ + var isReactiveTouchInteractionEnabled: Boolean + /** Call whenever timezone changes */ fun onTimeZoneChanged(timeZone: TimeZone)