summaryrefslogtreecommitdiffstats
path: root/services/appwidget
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-10-07 19:26:28 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2014-10-08 03:13:06 +0000
commitad870c3d9c58a9ee31cdf4a9807a4cec2e68ab04 (patch)
treebec53bccf9bf24f48911cdd77282250267db6529 /services/appwidget
parentd76f80bd3a38e11d27935cbe461c3a9d4243dd76 (diff)
downloadframeworks_base-ad870c3d9c58a9ee31cdf4a9807a4cec2e68ab04.zip
frameworks_base-ad870c3d9c58a9ee31cdf4a9807a4cec2e68ab04.tar.gz
frameworks_base-ad870c3d9c58a9ee31cdf4a9807a4cec2e68ab04.tar.bz2
Restored widget provider id not properly updated.
During restore first the provider records and then the applications are restored. Therefore, we keep the restored provider records in a zombie state and once we get the package install broadcasts from the package manager we update the zombie providers to be real ones. The bug was that while doing this we were not updating the provider id from one with an undefined UID to the one with the UID under which its package now runs. bug:17869323 Change-Id: I20b7cbfd2f90e2f5bf3a6b858d8da99cc1c82841
Diffstat (limited to 'services/appwidget')
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index fca13f8..7623514 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -1839,13 +1839,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
// If the provider was not found it may be because it was restored and
// we did not know its UID so let us find if there is such one.
if (existing == null) {
- providerId = new ProviderId(UNKNOWN_UID, componentName);
- existing = lookupProviderLocked(providerId);
+ ProviderId restoredProviderId = new ProviderId(UNKNOWN_UID, componentName);
+ existing = lookupProviderLocked(restoredProviderId);
}
if (existing != null) {
if (existing.zombie && !mSafeMode) {
// it's a placeholder that was set up during an app restore
+ existing.id = providerId;
existing.zombie = false;
existing.info = provider.info; // the real one filled out from the ResolveInfo
if (DEBUG) {