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

Commit f1a1caad authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use cached getPackageInfo for target overlayable" into rvc-dev

parents db49a262 81369301
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Process;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Pair;

@@ -140,7 +139,7 @@ public class OverlayActorEnforcer {
                        return ActorState.MISSING_LEGACY_PERMISSION;
                    }
                }
            } catch (RemoteException | IOException e) {
            } catch (IOException e) {
                return ActorState.ERROR_READING_OVERLAYABLE;
            }
        }
+2 −3
Original line number Diff line number Diff line
@@ -1151,9 +1151,8 @@ public final class OverlayManagerService extends SystemService {

        @Override
        public boolean doesTargetDefineOverlayable(String targetPackageName, int userId)
                throws RemoteException, IOException {
            PackageInfo packageInfo = mPackageManager.getPackageInfo(targetPackageName, 0,
                    userId);
                throws IOException {
            PackageInfo packageInfo = getPackageInfo(targetPackageName, userId);
            if (packageInfo == null) {
                throw new IOException("Unable to get target package");
            }
+1 −3
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.annotation.Nullable;
import android.content.om.OverlayableInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.RemoteException;

import com.android.server.pm.PackageManagerServiceUtils;

@@ -68,8 +67,7 @@ public interface OverlayableInfoCallback {
    /**
     * @return true if the target package has declared an overlayable
     */
    boolean doesTargetDefineOverlayable(String targetPackageName, int userId)
            throws RemoteException, IOException;
    boolean doesTargetDefineOverlayable(String targetPackageName, int userId) throws IOException;

    /**
     * @throws SecurityException containing message if the caller doesn't have the given