Loading services/core/java/com/android/server/DynamicSystemService.java +4 −5 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { mContext = context; mContext = context; } } private IGsiService getGsiService() throws RemoteException { private IGsiService getGsiService() { checkPermission(); checkPermission(); if (mGsiService != null) { if (mGsiService != null) { return mGsiService; return mGsiService; Loading @@ -60,8 +60,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } } private void checkPermission() { private void checkPermission() { if (mContext.checkCallingOrSelfPermission( if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) != PackageManager.PERMISSION_GRANTED) { != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires MANAGE_DYNAMIC_SYSTEM permission"); throw new SecurityException("Requires MANAGE_DYNAMIC_SYSTEM permission"); } } Loading Loading @@ -147,12 +146,12 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } } @Override @Override public boolean isInUse() throws RemoteException { public boolean isInUse() { return SystemProperties.getBoolean("ro.gsid.image_running", false); return SystemProperties.getBoolean("ro.gsid.image_running", false); } } @Override @Override public boolean isInstalled() throws RemoteException { public boolean isInstalled() { boolean installed = SystemProperties.getBoolean("gsid.image_installed", false); boolean installed = SystemProperties.getBoolean("gsid.image_installed", false); Slog.i(TAG, "isInstalled(): " + installed); Slog.i(TAG, "isInstalled(): " + installed); return installed; return installed; Loading Loading
services/core/java/com/android/server/DynamicSystemService.java +4 −5 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { mContext = context; mContext = context; } } private IGsiService getGsiService() throws RemoteException { private IGsiService getGsiService() { checkPermission(); checkPermission(); if (mGsiService != null) { if (mGsiService != null) { return mGsiService; return mGsiService; Loading @@ -60,8 +60,7 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } } private void checkPermission() { private void checkPermission() { if (mContext.checkCallingOrSelfPermission( if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) != PackageManager.PERMISSION_GRANTED) { != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires MANAGE_DYNAMIC_SYSTEM permission"); throw new SecurityException("Requires MANAGE_DYNAMIC_SYSTEM permission"); } } Loading Loading @@ -147,12 +146,12 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } } @Override @Override public boolean isInUse() throws RemoteException { public boolean isInUse() { return SystemProperties.getBoolean("ro.gsid.image_running", false); return SystemProperties.getBoolean("ro.gsid.image_running", false); } } @Override @Override public boolean isInstalled() throws RemoteException { public boolean isInstalled() { boolean installed = SystemProperties.getBoolean("gsid.image_installed", false); boolean installed = SystemProperties.getBoolean("gsid.image_installed", false); Slog.i(TAG, "isInstalled(): " + installed); Slog.i(TAG, "isInstalled(): " + installed); return installed; return installed; Loading