Merge "Check for null ApplicationInfo object in SMS."

This commit is contained in:
TreeHugger Robot
2020-02-15 08:32:18 +00:00
committed by Android (Google) Code Review

View File

@@ -3975,7 +3975,7 @@ class StorageManagerService extends IStorageManager.Stub
if (mIsFuseEnabled && hasMtp) {
ApplicationInfo ai = mIPackageManager.getApplicationInfo(packageName,
0, UserHandle.getUserId(uid));
if (ai.isSignedWithPlatformKey()) {
if (ai != null && ai.isSignedWithPlatformKey()) {
// Platform processes hosting the MTP server should be able to write in Android/
return Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE;
}