Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c21f8b91 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by Automerger Merge Worker
Browse files

Merge "Remove old code that isn't relevant anymore." am: 22e3e74e am:...

Merge "Remove old code that isn't relevant anymore." am: 22e3e74e am: 0642fc19 am: dd85ce6a am: 11f48743

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354663

Change-Id: I73da8e316b2b740ea2d0ecf8f8bb062a64ff6978
parents 0b97dc6b 11f48743
Loading
Loading
Loading
Loading
+3 −22
Original line number Diff line number Diff line
@@ -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(
            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);
+0 −6
Original line number Diff line number Diff line
@@ -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");