From 07fcb2fc5bd017c06a26ab669efddd4cb5d281e3 Mon Sep 17 00:00:00 2001 From: Howard Chen Date: Thu, 19 Dec 2019 11:40:16 +0800 Subject: [PATCH] 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 --- .../com/android/server/DynamicSystemService.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/services/core/java/com/android/server/DynamicSystemService.java b/services/core/java/com/android/server/DynamicSystemService.java index 7b02b6e0ac11c..7909e3096cbe8 100644 --- a/services/core/java/com/android/server/DynamicSystemService.java +++ b/services/core/java/com/android/server/DynamicSystemService.java @@ -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