am 89c5a118: Merge "Don\'t crash attempting restore of uninstalled live wallpaper" into klp-dev
* commit '89c5a1180830934db485ff9c189143deab653310': Don't crash attempting restore of uninstalled live wallpaper
This commit is contained in:
@@ -821,6 +821,11 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
|
|||||||
int serviceUserId = wallpaper.userId;
|
int serviceUserId = wallpaper.userId;
|
||||||
ServiceInfo si = mIPackageManager.getServiceInfo(componentName,
|
ServiceInfo si = mIPackageManager.getServiceInfo(componentName,
|
||||||
PackageManager.GET_META_DATA | PackageManager.GET_PERMISSIONS, serviceUserId);
|
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)) {
|
if (!android.Manifest.permission.BIND_WALLPAPER.equals(si.permission)) {
|
||||||
String msg = "Selected service does not require "
|
String msg = "Selected service does not require "
|
||||||
+ android.Manifest.permission.BIND_WALLPAPER
|
+ android.Manifest.permission.BIND_WALLPAPER
|
||||||
|
|||||||
Reference in New Issue
Block a user