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
This commit is contained in:
Howard Chen
2019-12-19 11:40:16 +08:00
parent 967232eef3
commit 07fcb2fc5b

View File

@@ -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