diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2020-07-07 09:03:34 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-07 09:03:34 +0000 |
commit | dd85ce6a50b8e453a50d3c0c72837bc71ac461f7 (patch) | |
tree | 7c039abb112f742e7cd0bcd5459b4aabee3fb086 | |
parent | 60c730b6d98f1721a9e078b209a6e15080d6ce0f (diff) | |
parent | 0642fc19f31586d31c40e47f98a0c38c2116b6a3 (diff) |
Merge "Remove old code that isn't relevant anymore." am: 22e3e74e4b am: 0642fc19f3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354663
Change-Id: Ic39e4a46f50fd3ab18dba5c859ec39c9458191a0
-rw-r--r-- | services/core/java/com/android/server/storage/DeviceStorageMonitorService.java | 25 | ||||
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 6 |
2 files changed, 3 insertions, 28 deletions
diff --git a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java index 734b71824490..de06c92e8dae 100644 --- a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java +++ b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java @@ -49,11 +49,8 @@ import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.IndentingPrintWriter; import com.android.server.EventLogTags; import com.android.server.SystemService; -import com.android.server.pm.InstructionSets; import com.android.server.pm.PackageManagerService; -import dalvik.system.VMRuntime; - import java.io.File; import java.io.FileDescriptor; import java.io.IOException; @@ -214,7 +211,7 @@ public class DeviceStorageMonitorService extends SystemService { newLevel = State.LEVEL_FULL; } else if (usableBytes <= lowBytes) { newLevel = State.LEVEL_LOW; - } else if (StorageManager.UUID_DEFAULT.equals(uuid) && !isBootImageOnDisk() + } else if (StorageManager.UUID_DEFAULT.equals(uuid) && usableBytes < BOOT_IMAGE_STORAGE_REQUIREMENT) { newLevel = State.LEVEL_LOW; } else { @@ -261,15 +258,6 @@ public class DeviceStorageMonitorService extends SystemService { }; } - private static boolean isBootImageOnDisk() { - for (String instructionSet : InstructionSets.getAllDexCodeInstructionSets()) { - if (!VMRuntime.isBootClassPathOnDisk(instructionSet)) { - return false; - } - } - return true; - } - @Override public void onStart() { final Context context = getContext(); @@ -481,15 +469,8 @@ public class DeviceStorageMonitorService extends SystemService { final CharSequence title = context.getText( com.android.internal.R.string.low_internal_storage_view_title); - final CharSequence details; - if (StorageManager.UUID_DEFAULT.equals(uuid)) { - details = context.getText(isBootImageOnDisk() - ? com.android.internal.R.string.low_internal_storage_view_text - : com.android.internal.R.string.low_internal_storage_view_text_no_boot); - } else { - details = context.getText( - com.android.internal.R.string.low_internal_storage_view_text); - } + final CharSequence details = context.getText( + com.android.internal.R.string.low_internal_storage_view_text); PendingIntent intent = PendingIntent.getActivityAsUser(context, 0, lowMemIntent, 0, null, UserHandle.CURRENT); diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 7a1b074d49f8..b3dcf4d4fa63 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -608,12 +608,6 @@ public final class SystemServer { } } - // Diagnostic to ensure that the system is in a base healthy state. Done here as a common - // non-zygote process. - if (!VMRuntime.hasBootImageSpaces()) { - Slog.wtf(TAG, "Runtime is not running with a boot image!"); - } - // Loop forever. Looper.loop(); throw new RuntimeException("Main thread loop unexpectedly exited"); |