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

Commit 4c2bf7a1 authored by Robert Carr's avatar Robert Carr Committed by android-build-merger
Browse files

Merge "Bump activity stop timeout past ANR timeout." into pi-dev am: 82c4ae15

am: 6ac3e7ce

Change-Id: I0656be8fa0ea0326987ca2b73a51b5b1f661b7f9
parents 7acc6f1d 6ac3e7ce
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -195,8 +195,12 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai

    // How long we wait for the activity to tell us it has stopped before
    // giving up.  This is a good amount of time because we really need this
    // from the application in order to get its saved state.
    private static final int STOP_TIMEOUT = 10 * 1000;
    // from the application in order to get its saved state. Once the stop
    // is complete we may start destroying client resources triggering
    // crashes if the UI thread was hung. We put this timeout one second behind
    // the ANR timeout so these situations will generate ANR instead of
    // Surface lost or other errors.
    private static final int STOP_TIMEOUT = 11 * 1000;

    // How long we wait until giving up on an activity telling us it has
    // finished destroying itself.
+4 −1
Original line number Diff line number Diff line
@@ -256,6 +256,9 @@ public class NotificationManagerService extends SystemService {
    static final int LONG_DELAY = PhoneWindowManager.TOAST_WINDOW_TIMEOUT;
    static final int SHORT_DELAY = 2000; // 2 seconds

    // 1 second past the ANR timeout.
    static final int FINISH_TOKEN_TIMEOUT = 11 * 1000;

    static final long[] DEFAULT_VIBRATE_PATTERN = {0, 250, 250, 250};

    static final long SNOOZE_UNTIL_UNSPECIFIED = -1;
@@ -4804,7 +4807,7 @@ public class NotificationManagerService extends SystemService {
    {
        mHandler.removeCallbacksAndMessages(token);
        Message m = Message.obtain(mHandler, MESSAGE_FINISH_TOKEN_TIMEOUT, token);
        mHandler.sendMessageDelayed(m, 5);
        mHandler.sendMessageDelayed(m, FINISH_TOKEN_TIMEOUT);
    }

    private void handleKillTokenTimeout(IBinder token)