Skip to content

Commit e326127

Browse files
0xD34Dcodex-corp
authored andcommitted
Themes: Only kill launchers if overlays or icons changed
There is no need to kill the launcher for every coponent changed. The only ones that really concern us in regards to killing launchers are MODIFIES_OVERLAYS and MODIFIES_ICONS Change-Id: I840b8e2ecd4b52a33f352809c5d3d2c7e92ce85e
1 parent 3df029d commit e326127

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

services/java/com/android/server/ThemeService.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private void doApplyTheme(Map<String, String> componentMap) {
221221

222222
updateConfiguration(componentMap);
223223

224-
killLaunchers();
224+
killLaunchers(componentMap);
225225

226226
postFinish(true, componentMap);
227227
mIsThemeApplying = false;
@@ -647,7 +647,12 @@ private static ThemeConfig.Builder createBuilderFrom(Configuration config,
647647

648648
// Kill the current Home process, they tend to be evil and cache
649649
// drawable references in all apps
650-
private void killLaunchers() {
650+
private void killLaunchers(Map<String, String> componentMap) {
651+
if (!(componentMap.containsKey(ThemesColumns.MODIFIES_ICONS)
652+
|| componentMap.containsKey(ThemesColumns.MODIFIES_OVERLAYS))) {
653+
return;
654+
}
655+
651656
final ActivityManager am =
652657
(ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
653658
final PackageManager pm = mContext.getPackageManager();

0 commit comments

Comments
 (0)