Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8217a65d authored by Abhijeet Kaur's avatar Abhijeet Kaur
Browse files

Null Pointer check on ApplicationInfo object before invoking method

Test: builds
Change-Id: I53444e604b9c5eec79f824aadb4d7a8867cbef9e
parent 755bbc6a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4030,7 +4030,7 @@ class StorageManagerService extends IStorageManager.Stub
            if (!hasLegacy && !mIsFuseEnabled) {
                ApplicationInfo ai = mIPackageManager.getApplicationInfo(packageName,
                        0, UserHandle.getUserId(uid));
                hasLegacy = ai.hasRequestedLegacyExternalStorage();
                hasLegacy = (ai != null && ai.hasRequestedLegacyExternalStorage());
            }

            if (hasLegacy && hasWrite) {