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

Commit 07fcb2fc authored by Howard Chen's avatar Howard Chen
Browse files

Remove blocking binder calls from isInUse method

Bug: 145749943
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592

Change-Id: I56324c13eada832e3a319ddd9f6c5b2ab414684e
parent 967232ee
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -179,18 +179,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub implements

    @Override
    public boolean isInUse() throws RemoteException {
        boolean gsidWasRunning = "running".equals(SystemProperties.get("init.svc.gsid"));
        boolean isInUse = false;

        try {
            isInUse = getGsiService().isGsiRunning();
        } finally {
            if (!gsidWasRunning && !isInUse) {
                mGsiService = null;
            }
        }

        return isInUse;
        return SystemProperties.getBoolean("ro.gsid.image_running", false);
    }

    @Override