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

Commit 8003c3d0 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "More encryption-aware triaging." into nyc-dev am: 950b3042

am: 0b0f03a1

* commit '0b0f03a1':
  More encryption-aware triaging.
parents b8aa1b47 0b0f03a1
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -447,7 +447,8 @@ public final class LoadedApk {
        IPackageManager pm = ActivityThread.getPackageManager();
        IPackageManager pm = ActivityThread.getPackageManager();
        android.content.pm.PackageInfo pi;
        android.content.pm.PackageInfo pi;
        try {
        try {
            pi = pm.getPackageInfo(mPackageName, 0, UserHandle.myUserId());
            pi = pm.getPackageInfo(mPackageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
                    UserHandle.myUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw new IllegalStateException("Unable to get package info for "
            throw new IllegalStateException("Unable to get package info for "
                    + mPackageName + "; is system dying?", e);
                    + mPackageName + "; is system dying?", e);
+2 −1
Original line number Original line Diff line number Diff line
@@ -363,7 +363,8 @@ public final class SearchableInfo implements Parcelable {
        String suggestProviderPackage = null;
        String suggestProviderPackage = null;
        if (mSuggestAuthority != null) {
        if (mSuggestAuthority != null) {
            PackageManager pm = activityContext.getPackageManager();
            PackageManager pm = activityContext.getPackageManager();
            ProviderInfo pi = pm.resolveContentProvider(mSuggestAuthority, 0);
            ProviderInfo pi = pm.resolveContentProvider(mSuggestAuthority,
                    PackageManager.MATCH_DEBUG_TRIAGED_MISSING);
            if (pi != null) {
            if (pi != null) {
                suggestProviderPackage = pi.packageName;
                suggestProviderPackage = pi.packageName;
            }
            }
+2 −3
Original line number Original line Diff line number Diff line
@@ -92,8 +92,7 @@ public class ServiceWatcher implements ServiceConnection {
            String pkg = initialPackageNames.get(i);
            String pkg = initialPackageNames.get(i);
            try {
            try {
                HashSet<Signature> set = new HashSet<Signature>();
                HashSet<Signature> set = new HashSet<Signature>();
                Signature[] sigs = pm.getPackageInfo(pkg,
                Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.MATCH_SYSTEM_ONLY
                        PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE
                        | PackageManager.GET_SIGNATURES).signatures;
                        | PackageManager.GET_SIGNATURES).signatures;
                set.addAll(Arrays.asList(sigs));
                set.addAll(Arrays.asList(sigs));
                sigSets.add(set);
                sigSets.add(set);
+7 −2
Original line number Original line Diff line number Diff line
@@ -10722,6 +10722,12 @@ public final class ActivityManagerService extends ActivityManagerNative
            return;
            return;
        }
        }
        // We're only interested in providers that are encryption unaware, and
        // we don't care about uninstalled apps, since there's no way they're
        // running at this point.
        final int matchFlags = GET_PROVIDERS | MATCH_ENCRYPTION_UNAWARE
                | MATCH_DEBUG_TRIAGED_MISSING;
        synchronized (this) {
        synchronized (this) {
            final int NP = mProcessNames.getMap().size();
            final int NP = mProcessNames.getMap().size();
            for (int ip = 0; ip < NP; ip++) {
            for (int ip = 0; ip < NP; ip++) {
@@ -10736,8 +10742,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                        try {
                        try {
                            final String pkgName = app.pkgList.keyAt(ig);
                            final String pkgName = app.pkgList.keyAt(ig);
                            final PackageInfo pkgInfo = AppGlobals.getPackageManager()
                            final PackageInfo pkgInfo = AppGlobals.getPackageManager()
                                    .getPackageInfo(pkgName,
                                    .getPackageInfo(pkgName, matchFlags, userId);
                                            GET_PROVIDERS | MATCH_ENCRYPTION_UNAWARE, userId);
                            if (pkgInfo != null && !ArrayUtils.isEmpty(pkgInfo.providers)) {
                            if (pkgInfo != null && !ArrayUtils.isEmpty(pkgInfo.providers)) {
                                for (ProviderInfo provInfo : pkgInfo.providers) {
                                for (ProviderInfo provInfo : pkgInfo.providers) {
                                    Log.v(TAG, "Installing " + provInfo);
                                    Log.v(TAG, "Installing " + provInfo);
+2 −1
Original line number Original line Diff line number Diff line
@@ -1024,7 +1024,8 @@ public class JobSchedulerService extends com.android.server.SystemService
            final IPackageManager pm = AppGlobals.getPackageManager();
            final IPackageManager pm = AppGlobals.getPackageManager();
            final ComponentName service = job.getService();
            final ComponentName service = job.getService();
            try {
            try {
                ServiceInfo si = pm.getServiceInfo(service, 0, UserHandle.getUserId(uid));
                ServiceInfo si = pm.getServiceInfo(service,
                        PackageManager.MATCH_DEBUG_TRIAGED_MISSING, UserHandle.getUserId(uid));
                if (si == null) {
                if (si == null) {
                    throw new IllegalArgumentException("No such service " + service);
                    throw new IllegalArgumentException("No such service " + service);
                }
                }
Loading