From 715dd4b180744f764035d19ba0ef1e456879bff4 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Thu, 21 Jan 2021 16:06:55 +0800 Subject: [PATCH] Fix dynsystem.BootCompletedReceiver Cleanup remnants of dynamic_system feature flag. This piece of code only makes sense when we had the feature flag. Now that the feature flag is deprecated, we shouldn't check the DynamicSystemManager.isInUse() anymore, because we actually do want to post a notification when DSU is installed but not in use. Bug: 176795908 Test: Install a DSU, reboot into guest system, reboot back to host system, verify the BootCompletedReceiver is active. Change-Id: I31c438fcd70e71eb2a5b14cdb713bd25516e8532 --- .../com/android/dynsystem/BootCompletedReceiver.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/BootCompletedReceiver.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/BootCompletedReceiver.java index 35bc490180e80..fcee98d0bd0ba 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/BootCompletedReceiver.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/BootCompletedReceiver.java @@ -21,7 +21,6 @@ import android.content.Context; import android.content.Intent; import android.os.UserHandle; import android.os.image.DynamicSystemClient; -import android.os.image.DynamicSystemManager; /** @@ -41,15 +40,6 @@ public class BootCompletedReceiver extends BroadcastReceiver { return; } - DynamicSystemManager dynSystem = - (DynamicSystemManager) context.getSystemService(Context.DYNAMIC_SYSTEM_SERVICE); - - boolean isInUse = (dynSystem != null) && dynSystem.isInUse(); - - if (!isInUse) { - return; - } - Intent startServiceIntent = new Intent( context, DynamicSystemInstallationService.class);