From 8fb4cafac8847cef45ab20a6c4bc28c3c73e092a Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Fri, 24 Apr 2020 23:10:58 +0200 Subject: [PATCH] Cleanup: remove DSS RemoteException references These stopped being necessary when ServiceManager.waitForDeclaredService was made to return null instead of throwing a RemoteException in case of failure. Bug: 154629168 Change-Id: I4adb5f03efaff84c8a98420348750d2007e5656a --- .../java/com/android/server/DynamicSystemService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/DynamicSystemService.java b/services/core/java/com/android/server/DynamicSystemService.java index b6bbe1912a168..b09b2605a7914 100644 --- a/services/core/java/com/android/server/DynamicSystemService.java +++ b/services/core/java/com/android/server/DynamicSystemService.java @@ -51,7 +51,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { mContext = context; } - private IGsiService getGsiService() throws RemoteException { + private IGsiService getGsiService() { checkPermission(); if (mGsiService != null) { return mGsiService; @@ -60,8 +60,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } private void checkPermission() { - if (mContext.checkCallingOrSelfPermission( - android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) + if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires MANAGE_DYNAMIC_SYSTEM permission"); } @@ -147,12 +146,12 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } @Override - public boolean isInUse() throws RemoteException { + public boolean isInUse() { return SystemProperties.getBoolean("ro.gsid.image_running", false); } @Override - public boolean isInstalled() throws RemoteException { + public boolean isInstalled() { boolean installed = SystemProperties.getBoolean("gsid.image_installed", false); Slog.i(TAG, "isInstalled(): " + installed); return installed;