diff options
| author | 2021-08-19 23:12:30 +0000 | |
|---|---|---|
| committer | 2021-08-19 23:12:30 +0000 | |
| commit | 51efd9cee77713d65f99afb05c0515e5018a8f60 (patch) | |
| tree | b7a1b59da68ede784e2f7093eb3eee5e47b27929 | |
| parent | 906bd66ab8c7d5d5b08094078dcaa1328f9b1c03 (diff) | |
| parent | 45319d558ca284d8ae01f39229a312566cb05193 (diff) | |
Merge "Allow overlays to be notified about theme changes" into sc-qpr1-dev am: 45319d558c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15590962
Change-Id: Ie24a2af8b3ab9d037752de6682494d37749f02ff
3 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt b/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt index bfa478088cad..5b327bd5e4c1 100644 --- a/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt +++ b/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt @@ -34,7 +34,7 @@ import javax.inject.Inject * See [DumpHandler] for more information on how and when this information is dumped. */ @SysUISingleton -class DumpManager @Inject constructor() { +open class DumpManager @Inject constructor() { private val dumpables: MutableMap<String, RegisteredDumpable<Dumpable>> = ArrayMap() private val buffers: MutableMap<String, RegisteredDumpable<LogBuffer>> = ArrayMap() diff --git a/packages/SystemUI/src/com/android/systemui/flags/SystemPropertiesHelper.kt b/packages/SystemUI/src/com/android/systemui/flags/SystemPropertiesHelper.kt index 28f63b07e584..6561bd5a5323 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/SystemPropertiesHelper.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/SystemPropertiesHelper.kt @@ -25,8 +25,12 @@ import javax.inject.Inject * Proxy to make {@link SystemProperties} easily testable. */ @SysUISingleton -class SystemPropertiesHelper @Inject constructor() { +open class SystemPropertiesHelper @Inject constructor() { fun getBoolean(name: String, default: Boolean): Boolean { return SystemProperties.getBoolean(name, default) } + + fun set(name: String, value: Int) { + SystemProperties.set(name, value.toString()) + } }
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java index c807ad828e30..a53d528ac78c 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java @@ -530,6 +530,10 @@ public class ThemeOverlayController extends SystemUI implements Dumpable { mThemeManager.applyCurrentUserOverlays(categoryToPackage, null, currentUser, managedProfiles); } + onOverlaysApplied(); + } + + protected void onOverlaysApplied() { } @Override |