Merge "Bump activity stop timeout past ANR timeout." into pi-dev

am: 82c4ae150c

Change-Id: I1df6ebf343abd907da0072d885578130b2da8435
This commit is contained in:
Robert Carr
2018-03-16 03:11:49 +00:00
committed by android-build-merger
2 changed files with 10 additions and 3 deletions

View File

@@ -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.

View File

@@ -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)