From 16f02268e8d1242ac355f275f83c9f9b0a342950 Mon Sep 17 00:00:00 2001 From: Bharadwaj Narasimha Date: Thu, 21 Jul 2016 16:52:32 -0700 Subject: ThemeService:Component id is being changed for multiple entries in mixnmatch. When a theme with more that one wallpaper is installed(Hexo), when we set the wallpaper in other themes to the second and third wallpapers of Hexo while using mixnmatch, some other components like icons,ringtones overlays would also change its Component_id to the corresponding Component_id of the wallpaper changed. Change-Id: I16a0b9a69a329308927cecbe2385f51184c8f0ee TICKET: CYNGNOS-3220 --- .../java/org/cyanogenmod/platform/internal/ThemeManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/ThemeManagerService.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/ThemeManagerService.java index 2eaa441..08273e3 100644 --- a/cm/lib/main/java/org/cyanogenmod/platform/internal/ThemeManagerService.java +++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/ThemeManagerService.java @@ -96,6 +96,9 @@ public class ThemeManagerService extends CMSystemService { private static final String TAG = ThemeManagerService.class.getName(); + //Constant to set Component_id in case of mismatch with mixnmatch_homescreen + private static final int DEFAULT_COMPONENT_ID = 0; + private static final boolean DEBUG = false; private static final String GOOGLE_SETUPWIZARD_PACKAGE = "com.google.android.setupwizard"; @@ -528,6 +531,8 @@ public class ThemeManagerService extends CMSystemService { // Add component ID for multiwallpaper if (ThemesColumns.MODIFIES_LAUNCHER.equals(component)) { values.put(MixnMatchColumns.COL_COMPONENT_ID, request.getWallpaperId()); + } else { + values.put(MixnMatchColumns.COL_COMPONENT_ID, DEFAULT_COMPONENT_ID); } mContext.getContentResolver().update(MixnMatchColumns.CONTENT_URI, values, where, -- cgit v1.1