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

Commit db64add8 authored by Chris Tate's avatar Chris Tate Committed by Android (Google) Code Review
Browse files

Merge "Enable background restrictions"

parents a0e468ac 62e9fc65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ final class ActivityManagerConstants extends ContentObserver {
    private static final String KEY_MAX_CACHED_PROCESSES = "max_cached_processes";

    private static final boolean DEFAULT_ENFORCE_BG_CHECK = SystemProperties.getBoolean(
            "debug.bgcheck", false);
            "debug.bgcheck", true);
    private static final int DEFAULT_MAX_CACHED_PROCESSES = 32;

    // Enforce background check on apps targeting O?
+8 −8
Original line number Diff line number Diff line
@@ -2611,6 +2611,14 @@ public class ActivityManagerService extends IActivityManager.Stub
        mPermissionReviewRequired = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_permissionReviewRequired);
        mHandlerThread = new ServiceThread(TAG,
                android.os.Process.THREAD_PRIORITY_FOREGROUND, false /*allowIo*/);
        mHandlerThread.start();
        mHandler = new MainHandler(mHandlerThread.getLooper());
        mUiHandler = new UiHandler();
        mConstants = new ActivityManagerConstants(this, mHandler);
        if (DEBUG_BACKGROUND_CHECK) {
            Slog.d(TAG, "Enforcing O+ bg restrictions: " + mConstants.ENFORCE_BG_CHECK);
            StringBuilder sb = new StringBuilder(200);
@@ -2622,14 +2630,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            Slog.d(TAG, sb.toString());
        }
        mHandlerThread = new ServiceThread(TAG,
                android.os.Process.THREAD_PRIORITY_FOREGROUND, false /*allowIo*/);
        mHandlerThread.start();
        mHandler = new MainHandler(mHandlerThread.getLooper());
        mUiHandler = new UiHandler();
        mConstants = new ActivityManagerConstants(this, mHandler);
        /* static; one-time init here */
        if (sKillHandler == null) {
            sKillThread = new ServiceThread(TAG + ":kill",