Merge "Test for null package in isEnabledAndMatches()" into sc-dev am: 6c83011d9c am: e28ce40823
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14668164 Change-Id: I6a589a2bd201c915b602f14053d0640ce031df7a
This commit is contained in:
@@ -26547,11 +26547,17 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(188814480) should be able to remove the NPE check when snapshot
|
||||
// "recursion" is fixed.
|
||||
@Override
|
||||
public boolean isEnabledAndMatches(ParsedMainComponent component, int flags, int userId) {
|
||||
synchronized (mLock) {
|
||||
AndroidPackage pkg = getPackage(component.getPackageName());
|
||||
return mSettings.isEnabledAndMatchLPr(pkg, component, flags, userId);
|
||||
if (pkg == null) {
|
||||
return false;
|
||||
} else {
|
||||
return mSettings.isEnabledAndMatchLPr(pkg, component, flags, userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user