Loading services/core/java/com/android/server/pm/verify/domain/DomainVerificationService.java +10 −10 Original line number Diff line number Diff line Loading @@ -256,8 +256,8 @@ public class DomainVerificationService extends SystemService public DomainVerificationInfo getDomainVerificationInfo(@NonNull String packageName) throws NameNotFoundException { mEnforcer.assertApprovedQuerent(mConnection.getCallingUid(), mProxy); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { PackageStateInternal pkgSetting = snapshot.getPackageStateInternal(packageName); AndroidPackage pkg = pkgSetting == null ? null : pkgSetting.getPkg(); if (pkg == null) { Loading Loading @@ -315,8 +315,8 @@ public class DomainVerificationService extends SystemService @NonNull Set<String> domains, int state) throws NameNotFoundException { mEnforcer.assertApprovedVerifier(callingUid, mProxy); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { List<String> verifiedDomains = new ArrayList<>(); GetAttachedResult result = getAndValidateAttachedLocked(domainSetId, domains, Loading Loading @@ -369,8 +369,8 @@ public class DomainVerificationService extends SystemService ArraySet<String> verifiedDomains = new ArraySet<>(); if (packageName == null) { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { ArraySet<String> validDomains = new ArraySet<>(); int size = mAttachedPkgStates.size(); Loading Loading @@ -403,8 +403,8 @@ public class DomainVerificationService extends SystemService } } } else { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { DomainVerificationPkgState pkgState = mAttachedPkgStates.get(packageName); if (pkgState == null) { throw DomainVerificationUtils.throwPackageUnavailable(packageName); Loading Loading @@ -539,8 +539,8 @@ public class DomainVerificationService extends SystemService return DomainVerificationManager.ERROR_DOMAIN_SET_ID_INVALID; } synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { GetAttachedResult result = getAndValidateAttachedLocked(domainSetId, domains, false /* forAutoVerify */, callingUid, userId, snapshot); if (result.isError()) { Loading Loading @@ -578,8 +578,8 @@ public class DomainVerificationService extends SystemService @NonNull String packageName, boolean enabled, @Nullable ArraySet<String> domains) throws NameNotFoundException { mEnforcer.assertInternal(mConnection.getCallingUid()); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { DomainVerificationPkgState pkgState = mAttachedPkgStates.get(packageName); if (pkgState == null) { throw DomainVerificationUtils.throwPackageUnavailable(packageName); Loading Loading @@ -682,8 +682,8 @@ public class DomainVerificationService extends SystemService throw DomainVerificationUtils.throwPackageUnavailable(packageName); } synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { PackageStateInternal pkgSetting = snapshot.getPackageStateInternal(packageName); AndroidPackage pkg = pkgSetting == null ? null : pkgSetting.getPkg(); if (pkg == null) { Loading Loading @@ -1179,8 +1179,8 @@ public class DomainVerificationService extends SystemService public void printOwnersForPackage(@NonNull IndentingPrintWriter writer, @Nullable String packageName, @Nullable @UserIdInt Integer userId) throws NameNotFoundException { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { if (packageName == null) { int size = mAttachedPkgStates.size(); for (int index = 0; index < size; index++) { Loading Loading @@ -1227,8 +1227,8 @@ public class DomainVerificationService extends SystemService @Override public void printOwnersForDomains(@NonNull IndentingPrintWriter writer, @NonNull List<String> domains, @Nullable @UserIdInt Integer userId) { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { int size = domains.size(); for (int index = 0; index < size; index++) { printOwnersForDomain(writer, domains.get(index), userId, snapshot); Loading Loading @@ -1403,8 +1403,8 @@ public class DomainVerificationService extends SystemService @Override public void clearDomainVerificationState(@Nullable List<String> packageNames) { mEnforcer.assertInternal(mConnection.getCallingUid()); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { if (packageNames == null) { int size = mAttachedPkgStates.size(); for (int index = 0; index < size; index++) { Loading Loading
services/core/java/com/android/server/pm/verify/domain/DomainVerificationService.java +10 −10 Original line number Diff line number Diff line Loading @@ -256,8 +256,8 @@ public class DomainVerificationService extends SystemService public DomainVerificationInfo getDomainVerificationInfo(@NonNull String packageName) throws NameNotFoundException { mEnforcer.assertApprovedQuerent(mConnection.getCallingUid(), mProxy); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { PackageStateInternal pkgSetting = snapshot.getPackageStateInternal(packageName); AndroidPackage pkg = pkgSetting == null ? null : pkgSetting.getPkg(); if (pkg == null) { Loading Loading @@ -315,8 +315,8 @@ public class DomainVerificationService extends SystemService @NonNull Set<String> domains, int state) throws NameNotFoundException { mEnforcer.assertApprovedVerifier(callingUid, mProxy); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { List<String> verifiedDomains = new ArrayList<>(); GetAttachedResult result = getAndValidateAttachedLocked(domainSetId, domains, Loading Loading @@ -369,8 +369,8 @@ public class DomainVerificationService extends SystemService ArraySet<String> verifiedDomains = new ArraySet<>(); if (packageName == null) { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { ArraySet<String> validDomains = new ArraySet<>(); int size = mAttachedPkgStates.size(); Loading Loading @@ -403,8 +403,8 @@ public class DomainVerificationService extends SystemService } } } else { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { DomainVerificationPkgState pkgState = mAttachedPkgStates.get(packageName); if (pkgState == null) { throw DomainVerificationUtils.throwPackageUnavailable(packageName); Loading Loading @@ -539,8 +539,8 @@ public class DomainVerificationService extends SystemService return DomainVerificationManager.ERROR_DOMAIN_SET_ID_INVALID; } synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { GetAttachedResult result = getAndValidateAttachedLocked(domainSetId, domains, false /* forAutoVerify */, callingUid, userId, snapshot); if (result.isError()) { Loading Loading @@ -578,8 +578,8 @@ public class DomainVerificationService extends SystemService @NonNull String packageName, boolean enabled, @Nullable ArraySet<String> domains) throws NameNotFoundException { mEnforcer.assertInternal(mConnection.getCallingUid()); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { DomainVerificationPkgState pkgState = mAttachedPkgStates.get(packageName); if (pkgState == null) { throw DomainVerificationUtils.throwPackageUnavailable(packageName); Loading Loading @@ -682,8 +682,8 @@ public class DomainVerificationService extends SystemService throw DomainVerificationUtils.throwPackageUnavailable(packageName); } synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { PackageStateInternal pkgSetting = snapshot.getPackageStateInternal(packageName); AndroidPackage pkg = pkgSetting == null ? null : pkgSetting.getPkg(); if (pkg == null) { Loading Loading @@ -1179,8 +1179,8 @@ public class DomainVerificationService extends SystemService public void printOwnersForPackage(@NonNull IndentingPrintWriter writer, @Nullable String packageName, @Nullable @UserIdInt Integer userId) throws NameNotFoundException { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { if (packageName == null) { int size = mAttachedPkgStates.size(); for (int index = 0; index < size; index++) { Loading Loading @@ -1227,8 +1227,8 @@ public class DomainVerificationService extends SystemService @Override public void printOwnersForDomains(@NonNull IndentingPrintWriter writer, @NonNull List<String> domains, @Nullable @UserIdInt Integer userId) { synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { int size = domains.size(); for (int index = 0; index < size; index++) { printOwnersForDomain(writer, domains.get(index), userId, snapshot); Loading Loading @@ -1403,8 +1403,8 @@ public class DomainVerificationService extends SystemService @Override public void clearDomainVerificationState(@Nullable List<String> packageNames) { mEnforcer.assertInternal(mConnection.getCallingUid()); synchronized (mLock) { final Computer snapshot = mConnection.snapshot(); synchronized (mLock) { if (packageNames == null) { int size = mAttachedPkgStates.size(); for (int index = 0; index < size; index++) { Loading