Loading services/core/java/com/android/server/pm/PackageManagerService.java +18 −10 Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ public class PackageManagerService extends IPackageManager.Stub for (String packageName : packages) { PackageSetting setting = mSettings.mPackages.get(packageName); if (setting != null && shouldFilterApplicationLocked(setting, callingUid, callingUserId)) { && !shouldFilterApplicationLocked(setting, callingUid, callingUserId)) { notifyInstallObserver(packageName); } } Loading Loading @@ -21007,11 +21007,15 @@ public class PackageManagerService extends IPackageManager.Stub false /* requireFullPermission */, false /* checkShell */, "get enabled"); // reader synchronized (mLock) { try { if (shouldFilterApplicationLocked( mSettings.getPackageLPr(packageName), callingUid, userId)) { return COMPONENT_ENABLED_STATE_DISABLED; throw new PackageManager.NameNotFoundException(packageName); } return mSettings.getApplicationEnabledSettingLPr(packageName, userId); } catch (PackageManager.NameNotFoundException e) { throw new IllegalArgumentException("Unknown package: " + packageName); } } } Loading @@ -21023,12 +21027,16 @@ public class PackageManagerService extends IPackageManager.Stub mPermissionManager.enforceCrossUserPermission(callingUid, userId, false /*requireFullPermission*/, false /*checkShell*/, "getComponentEnabled"); synchronized (mLock) { try { if (shouldFilterApplicationLocked( mSettings.getPackageLPr(component.getPackageName()), callingUid, component, TYPE_UNKNOWN, userId)) { return COMPONENT_ENABLED_STATE_DISABLED; throw new PackageManager.NameNotFoundException(component.getPackageName()); } return mSettings.getComponentEnabledSettingLPr(component, userId); } catch (PackageManager.NameNotFoundException e) { throw new IllegalArgumentException("Unknown component: " + component); } } } services/core/java/com/android/server/pm/Settings.java +6 −4 Original line number Diff line number Diff line Loading @@ -4363,19 +4363,21 @@ public final class Settings { return pkg.installSource.isOrphaned; } int getApplicationEnabledSettingLPr(String packageName, int userId) { int getApplicationEnabledSettingLPr(String packageName, int userId) throws PackageManager.NameNotFoundException { final PackageSetting pkg = mPackages.get(packageName); if (pkg == null) { throw new IllegalArgumentException("Unknown package: " + packageName); throw new PackageManager.NameNotFoundException(packageName); } return pkg.getEnabled(userId); } int getComponentEnabledSettingLPr(ComponentName componentName, int userId) { int getComponentEnabledSettingLPr(ComponentName componentName, int userId) throws PackageManager.NameNotFoundException { final String packageName = componentName.getPackageName(); final PackageSetting pkg = mPackages.get(packageName); if (pkg == null) { throw new IllegalArgumentException("Unknown component: " + componentName); throw new PackageManager.NameNotFoundException(componentName.getPackageName()); } final String classNameStr = componentName.getClassName(); return pkg.getCurrentEnabledStateLPr(classNameStr, userId); Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +18 −10 Original line number Diff line number Diff line Loading @@ -2376,7 +2376,7 @@ public class PackageManagerService extends IPackageManager.Stub for (String packageName : packages) { PackageSetting setting = mSettings.mPackages.get(packageName); if (setting != null && shouldFilterApplicationLocked(setting, callingUid, callingUserId)) { && !shouldFilterApplicationLocked(setting, callingUid, callingUserId)) { notifyInstallObserver(packageName); } } Loading Loading @@ -21007,11 +21007,15 @@ public class PackageManagerService extends IPackageManager.Stub false /* requireFullPermission */, false /* checkShell */, "get enabled"); // reader synchronized (mLock) { try { if (shouldFilterApplicationLocked( mSettings.getPackageLPr(packageName), callingUid, userId)) { return COMPONENT_ENABLED_STATE_DISABLED; throw new PackageManager.NameNotFoundException(packageName); } return mSettings.getApplicationEnabledSettingLPr(packageName, userId); } catch (PackageManager.NameNotFoundException e) { throw new IllegalArgumentException("Unknown package: " + packageName); } } } Loading @@ -21023,12 +21027,16 @@ public class PackageManagerService extends IPackageManager.Stub mPermissionManager.enforceCrossUserPermission(callingUid, userId, false /*requireFullPermission*/, false /*checkShell*/, "getComponentEnabled"); synchronized (mLock) { try { if (shouldFilterApplicationLocked( mSettings.getPackageLPr(component.getPackageName()), callingUid, component, TYPE_UNKNOWN, userId)) { return COMPONENT_ENABLED_STATE_DISABLED; throw new PackageManager.NameNotFoundException(component.getPackageName()); } return mSettings.getComponentEnabledSettingLPr(component, userId); } catch (PackageManager.NameNotFoundException e) { throw new IllegalArgumentException("Unknown component: " + component); } } }
services/core/java/com/android/server/pm/Settings.java +6 −4 Original line number Diff line number Diff line Loading @@ -4363,19 +4363,21 @@ public final class Settings { return pkg.installSource.isOrphaned; } int getApplicationEnabledSettingLPr(String packageName, int userId) { int getApplicationEnabledSettingLPr(String packageName, int userId) throws PackageManager.NameNotFoundException { final PackageSetting pkg = mPackages.get(packageName); if (pkg == null) { throw new IllegalArgumentException("Unknown package: " + packageName); throw new PackageManager.NameNotFoundException(packageName); } return pkg.getEnabled(userId); } int getComponentEnabledSettingLPr(ComponentName componentName, int userId) { int getComponentEnabledSettingLPr(ComponentName componentName, int userId) throws PackageManager.NameNotFoundException { final String packageName = componentName.getPackageName(); final PackageSetting pkg = mPackages.get(packageName); if (pkg == null) { throw new IllegalArgumentException("Unknown component: " + componentName); throw new PackageManager.NameNotFoundException(componentName.getPackageName()); } final String classNameStr = componentName.getClassName(); return pkg.getCurrentEnabledStateLPr(classNameStr, userId); Loading