summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2013-09-08 20:07:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-08 20:07:20 +0000
commit89c5a1180830934db485ff9c189143deab653310 (patch)
tree8508ea8d9a1c4f6e747d66d0db4b754a5e134e86 /services
parent4b98978157295c6e7ea21b70ffcf9edffc41f0e1 (diff)
parent909522048f7ce7af54e1476175c8e8d1df808a04 (diff)
downloadframeworks_base-89c5a1180830934db485ff9c189143deab653310.zip
frameworks_base-89c5a1180830934db485ff9c189143deab653310.tar.gz
frameworks_base-89c5a1180830934db485ff9c189143deab653310.tar.bz2
Merge "Don't crash attempting restore of uninstalled live wallpaper" into klp-dev
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/WallpaperManagerService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index d677f24..162add4 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -821,6 +821,11 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
int serviceUserId = wallpaper.userId;
ServiceInfo si = mIPackageManager.getServiceInfo(componentName,
PackageManager.GET_META_DATA | PackageManager.GET_PERMISSIONS, serviceUserId);
+ if (si == null) {
+ // The wallpaper component we're trying to use doesn't exist
+ Slog.w(TAG, "Attempted wallpaper " + componentName + " is unavailable");
+ return false;
+ }
if (!android.Manifest.permission.BIND_WALLPAPER.equals(si.permission)) {
String msg = "Selected service does not require "
+ android.Manifest.permission.BIND_WALLPAPER