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

Commit efaa2162 authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Remove `mIsolated` from Installer.

Isolated installer was for otapreopt. It no longer exists.

Bug: 258223472
Bug: 6527146
Test: Presubmit
Flag: EXEMPT cleanup
Change-Id: Ie0494441044657842c7021de72e2aca7540f403e
parent 6d255d41
Loading
Loading
Loading
Loading
+1 −28
Original line number Diff line number Diff line
@@ -82,22 +82,13 @@ public class Installer extends SystemService {
    private static final long CONNECT_RETRY_DELAY_MS = DateUtils.SECOND_IN_MILLIS;
    private static final long CONNECT_WAIT_MS = 10 * DateUtils.SECOND_IN_MILLIS;

    private final boolean mIsolated;
    private volatile boolean mDeferSetFirstBoot;
    private volatile IInstalld mInstalld = null;
    private volatile CountDownLatch mInstalldLatch = new CountDownLatch(1);
    private volatile Object mWarnIfHeld;

    public Installer(Context context) {
        this(context, false);
    }

    /**
     * @param isolated Make the installer isolated. See {@link isIsolated}.
     */
    public Installer(Context context, boolean isolated) {
        super(context);
        mIsolated = isolated;
    }

    /**
@@ -108,24 +99,10 @@ public class Installer extends SystemService {
        mWarnIfHeld = warnIfHeld;
    }

    /**
     * Returns true if the installer is isolated, i.e. if this object should <em>not</em> connect to
     * the real {@code installd}. All remote calls will be ignored unless you extend this class and
     * intercept them.
     */
    public boolean isIsolated() {
        return mIsolated;
    }

    @Override
    public void onStart() {
        if (mIsolated) {
            mInstalld = null;
            mInstalldLatch.countDown();
        } else {
        connect();
    }
    }

    private void connect() {
        IBinder binder = ServiceManager.getService("installd");
@@ -175,10 +152,6 @@ public class Installer extends SystemService {
            Slog.wtf(TAG, "Calling thread " + Thread.currentThread().getName() + " is holding 0x"
                    + Integer.toHexString(System.identityHashCode(mWarnIfHeld)), new Throwable());
        }
        if (mIsolated) {
            Slog.i(TAG, "Ignoring request because this installer is isolated");
            return false;
        }

        try {
            if (!mInstalldLatch.await(CONNECT_WAIT_MS, TimeUnit.MILLISECONDS)) {