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

Commit 7fcb488e authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Remove unnecessary pending temp allow list in ATM" into tm-dev...

Merge "Merge "Remove unnecessary pending temp allow list in ATM" into tm-dev am: 5b19566d am: 803548c2 am: 587aa44a"
parents 67f7df26 da56307b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.server.am;

import static android.os.Process.INVALID_UID;

import android.util.SparseArray;

/** Allowlists of uids to temporarily bypass Power Save mode. */
@@ -36,16 +34,12 @@ final class PendingTempAllowlists {
        synchronized (mPendingTempAllowlist) {
            mPendingTempAllowlist.put(uid, value);
        }
        mService.mAtmInternal.onUidAddedToPendingTempAllowlist(uid, value.tag);
    }

    void removeAt(int index) {
        int uid = INVALID_UID;
        synchronized (mPendingTempAllowlist) {
            uid = mPendingTempAllowlist.keyAt(index);
            mPendingTempAllowlist.removeAt(index);
        }
        mService.mAtmInternal.onUidRemovedFromPendingTempAllowlist(uid);
    }

    ActivityManagerService.PendingTempAllowlist get(int uid) {
+0 −3
Original line number Diff line number Diff line
@@ -512,9 +512,6 @@ public abstract class ActivityTaskManagerInternal {
    public abstract void onUidInactive(int uid);
    public abstract void onUidProcStateChanged(int uid, int procState);

    public abstract void onUidAddedToPendingTempAllowlist(int uid, String tag);
    public abstract void onUidRemovedFromPendingTempAllowlist(int uid);

    /** Handle app crash event in {@link android.app.IActivityController} if there is one. */
    public abstract boolean handleAppCrashInActivityController(String processName, int pid,
            String shortMsg, String longMsg, long timeMillis, String stackTrace,
+0 −17
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIV
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RTL;
import static android.provider.Settings.Global.HIDE_ERROR_DIALOGS;
import static android.provider.Settings.System.FONT_SCALE;
import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.WindowManager.TRANSIT_WAKE;
@@ -284,7 +283,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -382,7 +380,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
    private AppOpsManager mAppOpsManager;
    /** All active uids in the system. */
    final MirrorActiveUids mActiveUids = new MirrorActiveUids();
    private final SparseArray<String> mPendingTempAllowlist = new SparseArray<>();
    /** All processes currently running that might have a window organized by name. */
    final ProcessMap<WindowProcessController> mProcessNames = new ProcessMap<>();
    /** All processes we currently have running mapped by pid and uid */
@@ -6438,20 +6435,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            mActiveUids.onUidProcStateChanged(uid, procState);
        }

        @Override
        public void onUidAddedToPendingTempAllowlist(int uid, String tag) {
            synchronized (mGlobalLockWithoutBoost) {
                mPendingTempAllowlist.put(uid, tag);
            }
        }

        @Override
        public void onUidRemovedFromPendingTempAllowlist(int uid) {
            synchronized (mGlobalLockWithoutBoost) {
                mPendingTempAllowlist.remove(uid);
            }
        }

        @Override
        public boolean handleAppCrashInActivityController(String processName, int pid,
                String shortMsg, String longMsg, long timeMillis, String stackTrace,