Loading packages/SystemUI/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -370,7 +370,7 @@ android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" tools:replace="android:appComponentFactory" android:appComponentFactory=".SystemUIAppComponentFactory"> android:appComponentFactory=".PhoneSystemUIAppComponentFactory"> <!-- Keep theme in sync with SystemUIApplication.onCreate(). Setting the theme on the application does not affect views inflated by services. The application theme is set again from onCreate to take effect for those views. --> Loading packages/SystemUI/proguard.flags +1 −7 Original line number Diff line number Diff line -include proguard_common.flags -keep class com.android.systemui.statusbar.tv.TvStatusBar -keep class com.android.systemui.SystemUIInitializerImpl { *; } -keep class com.android.systemui.tv.TvSystemUIInitializer { *; } -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.DaggerReferenceGlobalRootComponent** { !synthetic *; } No newline at end of file -keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.DaggerTvGlobalRootComponent** { !synthetic *; } No newline at end of file packages/SystemUI/res/values-television/config.xml +0 −5 Original line number Diff line number Diff line Loading @@ -20,11 +20,6 @@ <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources> <!-- SystemUIFactory component --> <string name="config_systemUIFactoryComponent" translatable="false"> com.android.systemui.tv.TvSystemUIInitializer </string> <!-- Svelte specific logic, see RecentsConfiguration.SVELTE_* constants. --> <integer name="recents_svelte_level">3</integer> Loading packages/SystemUI/res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -302,9 +302,6 @@ <!-- Determines whether the shell features all run on another thread. --> <bool name="config_enableShellMainThread">true</bool> <!-- SystemUIFactory component --> <string name="config_systemUIFactoryComponent" translatable="false">com.android.systemui.SystemUIInitializerImpl</string> <!-- QS tile shape store width. negative implies fill configuration instead of stroke--> <dimen name="config_qsTileStrokeWidthActive">-1dp</dimen> <dimen name="config_qsTileStrokeWidthInactive">-1dp</dimen> Loading packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java→packages/SystemUI/src/com/android/systemui/PhoneSystemUIAppComponentFactory.kt +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -14,24 +14,10 @@ * limitations under the License. */ package com.android.systemui; package com.android.systemui import android.content.Context; import android.content.Context /** * Starts up SystemUI using the AOSP {@link SystemUIInitializerImpl}. * * This initializer relies on reflection to start everything up and should be considered deprecated. * Instead, create your own {@link SystemUIAppComponentFactoryBase}, specify it in your * AndroidManifest.xml and construct your own {@link SystemUIInitializer} directly. * * @deprecated Define your own SystemUIAppComponentFactoryBase implementation and use that. This * implementation may be changed or removed in future releases. */ @Deprecated public class SystemUIAppComponentFactory extends SystemUIAppComponentFactoryBase { @Override protected SystemUIInitializer createSystemUIInitializer(Context context) { return SystemUIInitializerFactory.createWithContext(context); } class PhoneSystemUIAppComponentFactory : SystemUIAppComponentFactoryBase() { override fun createSystemUIInitializer(context: Context) = SystemUIInitializerImpl(context) } Loading
packages/SystemUI/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -370,7 +370,7 @@ android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" tools:replace="android:appComponentFactory" android:appComponentFactory=".SystemUIAppComponentFactory"> android:appComponentFactory=".PhoneSystemUIAppComponentFactory"> <!-- Keep theme in sync with SystemUIApplication.onCreate(). Setting the theme on the application does not affect views inflated by services. The application theme is set again from onCreate to take effect for those views. --> Loading
packages/SystemUI/proguard.flags +1 −7 Original line number Diff line number Diff line -include proguard_common.flags -keep class com.android.systemui.statusbar.tv.TvStatusBar -keep class com.android.systemui.SystemUIInitializerImpl { *; } -keep class com.android.systemui.tv.TvSystemUIInitializer { *; } -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.DaggerReferenceGlobalRootComponent** { !synthetic *; } No newline at end of file -keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.DaggerTvGlobalRootComponent** { !synthetic *; } No newline at end of file
packages/SystemUI/res/values-television/config.xml +0 −5 Original line number Diff line number Diff line Loading @@ -20,11 +20,6 @@ <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources> <!-- SystemUIFactory component --> <string name="config_systemUIFactoryComponent" translatable="false"> com.android.systemui.tv.TvSystemUIInitializer </string> <!-- Svelte specific logic, see RecentsConfiguration.SVELTE_* constants. --> <integer name="recents_svelte_level">3</integer> Loading
packages/SystemUI/res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -302,9 +302,6 @@ <!-- Determines whether the shell features all run on another thread. --> <bool name="config_enableShellMainThread">true</bool> <!-- SystemUIFactory component --> <string name="config_systemUIFactoryComponent" translatable="false">com.android.systemui.SystemUIInitializerImpl</string> <!-- QS tile shape store width. negative implies fill configuration instead of stroke--> <dimen name="config_qsTileStrokeWidthActive">-1dp</dimen> <dimen name="config_qsTileStrokeWidthInactive">-1dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java→packages/SystemUI/src/com/android/systemui/PhoneSystemUIAppComponentFactory.kt +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -14,24 +14,10 @@ * limitations under the License. */ package com.android.systemui; package com.android.systemui import android.content.Context; import android.content.Context /** * Starts up SystemUI using the AOSP {@link SystemUIInitializerImpl}. * * This initializer relies on reflection to start everything up and should be considered deprecated. * Instead, create your own {@link SystemUIAppComponentFactoryBase}, specify it in your * AndroidManifest.xml and construct your own {@link SystemUIInitializer} directly. * * @deprecated Define your own SystemUIAppComponentFactoryBase implementation and use that. This * implementation may be changed or removed in future releases. */ @Deprecated public class SystemUIAppComponentFactory extends SystemUIAppComponentFactoryBase { @Override protected SystemUIInitializer createSystemUIInitializer(Context context) { return SystemUIInitializerFactory.createWithContext(context); } class PhoneSystemUIAppComponentFactory : SystemUIAppComponentFactoryBase() { override fun createSystemUIInitializer(context: Context) = SystemUIInitializerImpl(context) }