Throw IOException when checking if invalid target defines overlayable
PackageInfo can be null for cases where the target is missing, and this should not crash in those cases. Mirrors the behavior of getOverlayableForTarget by converting null to an IOException. Bug: 147255897 Change-Id: I345dc68b7e6bea65f3f5da7a49a9136e07ba3793
This commit is contained in:
@@ -1154,6 +1154,10 @@ public final class OverlayManagerService extends SystemService {
|
||||
throws RemoteException, IOException {
|
||||
PackageInfo packageInfo = mPackageManager.getPackageInfo(targetPackageName, 0,
|
||||
userId);
|
||||
if (packageInfo == null) {
|
||||
throw new IOException("Unable to get target package");
|
||||
}
|
||||
|
||||
String baseCodePath = packageInfo.applicationInfo.getBaseCodePath();
|
||||
|
||||
ApkAssets apkAssets = null;
|
||||
|
||||
Reference in New Issue
Block a user