Skip to content

Commit 9be443d

Browse files
Alexaoleary
authored andcommitted
Make ThemeAccentsUtils accessible to other packages
- Move our ThemeAccentsUtils class to the core/java/com/android/internal/statusbar so we can call it from not only the SystemUI but other packages. This will reduce the amount of code in packages like DU-Tweaks, Updater and Settings. - Consolidate the code with our themes tile Change-Id: Ia77d53802b73ac1157f3cc8ce5887a3e50555382
1 parent 458afeb commit 9be443d

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

core/java/com/android/internal/statusbar/ThemeAccentUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public static void unloadStockDarkTheme(IOverlayManager om, int userId) {
173173
public static boolean isUsingWhiteAccent(IOverlayManager om, int userId) {
174174
OverlayInfo themeInfo = null;
175175
try {
176-
themeInfo = om.getOverlayInfo(ACCENTS[21],
176+
themeInfo = om.getOverlayInfo(ACCENTS[26],
177177
userId);
178178
} catch (RemoteException e) {
179179
e.printStackTrace();

packages/SystemUI/src/com/android/systemui/qs/tiles/ThemeTile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
288288

289289
private ThemeTileItem getThemeItemForStyleMode() {
290290
if (ThemeAccentUtils.isUsingDarkTheme(mOverlayManager, mCurrentUserId)) {
291-
return new ThemeTileItem(20, R.color.quick_settings_theme_tile_white,
291+
return new ThemeTileItem(25, R.color.quick_settings_theme_tile_white,
292292
R.string.quick_settings_theme_tile_color_white);
293293
} else {
294294
return new ThemeTileItem(20, R.color.quick_settings_theme_tile_black,

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
import com.android.systemui.statusbar.ScrimView;
244244
import com.android.systemui.statusbar.SignalClusterView;
245245
import com.android.systemui.statusbar.StatusBarState;
246+
import com.android.internal.statusbar.ThemeAccentUtils;
246247
import com.android.systemui.statusbar.notification.AboveShelfObserver;
247248
import com.android.systemui.statusbar.notification.InflationException;
248249
import com.android.systemui.statusbar.notification.RowInflaterTask;

0 commit comments

Comments
 (0)