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

Commit 9b36a703 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8432959 from b48ecfe2 to tm-qpr1-release

Change-Id: Ice405e5b65eb607d6a9d6dabe76613895fdab611
parents 75b868d1 b48ecfe2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -631,7 +631,7 @@ public abstract class ActivityManagerInternal {
     * @param uid uid
     * @param pid pid of the ProcessRecord that is pending top.
     */
    public abstract void addPendingTopUid(int uid, int pid);
    public abstract void addPendingTopUid(int uid, int pid, @Nullable IApplicationThread thread);

    /**
     * Delete uid from the ActivityManagerService PendingStartActivityUids list.
+8 −0
Original line number Diff line number Diff line
@@ -14270,6 +14270,14 @@ public final class Settings {
        public static final String EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS =
                "emergency_gesture_power_button_cooldown_period_ms";
        /**
         * The minimum time in milliseconds to perform the emergency gesture.
         *
         * @hide
         */
        public static final String EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS =
                "emergency_gesture_tap_detection_min_time_ms";
        /**
         * Whether to enable automatic system server heap dumps. This only works on userdebug or
         * eng builds, not on user builds. This is set by the user and overrides the config value.
+2 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ public class GlobalSettingsValidators {
                Global.EMERGENCY_TONE, new DiscreteValueValidator(new String[] {"0", "1", "2"}));
        VALIDATORS.put(Global.EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Global.EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Global.CALL_AUTO_RETRY, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.DOCK_AUDIO_MEDIA_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
+1 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ public class SettingsBackupTest {
                    Settings.Global.DROPBOX_TAG_PREFIX,
                    Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
                    Settings.Global.EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS,
                    Settings.Global.EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS,
                    Settings.Global.EMULATE_DISPLAY_CUTOUT,
                    Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
                    Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION,
+20 −4
Original line number Diff line number Diff line
@@ -17268,7 +17268,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        }
        @Override
        public void addPendingTopUid(int uid, int pid) {
        public void addPendingTopUid(int uid, int pid, @Nullable IApplicationThread thread) {
            final boolean isNewPending = mPendingStartActivityUids.add(uid, pid);
            // If the next top activity is in cached and frozen mode, WM should raise its priority
            // to unfreeze it. This is done by calling AMS.updateOomAdj that will lower its oom adj.
@@ -17285,13 +17285,29 @@ public class ActivityManagerService extends IActivityManager.Stub
            // (e.g. battery/data saver) but since waiting for updateOomAdj to complete and then
            // informing NetworkPolicyManager might get delayed, informing the state change as soon
            // as we know app is going to come to the top state.
            if (mNetworkPolicyUidObserver != null) {
            if (isNewPending && mNetworkPolicyUidObserver != null) {
                try {
                    final long procStateSeq = mProcessList.getNextProcStateSeq();
                    mNetworkPolicyUidObserver.onUidStateChanged(uid, PROCESS_STATE_TOP,
                            mProcessList.getNextProcStateSeq(), PROCESS_CAPABILITY_ALL);
                            procStateSeq, PROCESS_CAPABILITY_ALL);
                    if (thread != null && isNetworkingBlockedForUid(uid)) {
                        thread.setNetworkBlockSeq(procStateSeq);
                    }
                } catch (RemoteException e) {
                    // Should not happen; call is within the same process
                    Slog.d(TAG, "Error calling setNetworkBlockSeq", e);
                }
            }
        }
        private boolean isNetworkingBlockedForUid(int uid) {
            synchronized (mUidNetworkBlockedReasons) {
                // TODO: We can consider only those blocked reasons that will be overridden
                // by the TOP state. For other ones, there is no point in waiting.
                // TODO: We can reuse this data in
                // ProcessList#incrementProcStateSeqAndNotifyAppsLOSP instead of calling into
                // NetworkManagementService.
                return mUidNetworkBlockedReasons.get(uid, BLOCKED_REASON_NONE)
                        != BLOCKED_REASON_NONE;
            }
        }
Loading