diff options
author | Kévin Petit <kevin.petit@arm.com> | 2014-05-29 14:13:13 +0100 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2014-06-13 19:21:37 +0530 |
commit | 4776a5761247eca5750f52757d85bb060570b126 (patch) | |
tree | f55a375c4dd07f17607b234a4f8acafc9bd542c2 | |
parent | 77d28ca25378530f92d409fbd72a38a1e256b59f (diff) | |
download | base-linaro-armv8-20140613.tar.gz |
Increase timeoutslinaro-armv8-20140613
Increase timeout by 20x to prevent ANR and other
timing problems in slow platforms.
Change-Id: I221336bd65d5af69aef7736ca4239343c1406d14
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
9 files changed, 34 insertions, 34 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 72568640a161..5e5cabaa5b8d 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -1699,7 +1699,7 @@ public class AudioService extends IAudioService.Stub { private static final String ASSET_FILE_VERSION = "1.0"; private static final String GROUP_TOUCH_SOUNDS = "touch_sounds"; - private static final int SOUND_EFECTS_LOAD_TIMEOUT_MS = 5000; + private static final int SOUND_EFECTS_LOAD_TIMEOUT_MS = 20 * 5000; class LoadSoundEffectReply { public int mStatus = 1; diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java index 417d6d81cdf6..b210e15c33e8 100644 --- a/services/java/com/android/server/NativeDaemonConnector.java +++ b/services/java/com/android/server/NativeDaemonConnector.java @@ -61,8 +61,8 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo private AtomicInteger mSequenceNumber; - private static final int DEFAULT_TIMEOUT = 1 * 60 * 1000; /* 1 minute */ - private static final long WARN_EXECUTE_DELAY_MS = 500; /* .5 sec */ + private static final int DEFAULT_TIMEOUT = 20 * 1 * 60 * 1000; /* 20 * 1 minute */ + private static final long WARN_EXECUTE_DELAY_MS = 20 * 500; /* 20 * .5 sec */ /** Lock held whenever communicating with native daemon. */ private final Object mDaemonLock = new Object(); diff --git a/services/java/com/android/server/Watchdog.java b/services/java/com/android/server/Watchdog.java index e17f42d9f415..307920a3cddc 100644 --- a/services/java/com/android/server/Watchdog.java +++ b/services/java/com/android/server/Watchdog.java @@ -58,7 +58,7 @@ public class Watchdog extends Thread { // Set this to true to have the watchdog record kernel thread stacks when it fires static final boolean RECORD_KERNEL_THREADS = true; - static final long DEFAULT_TIMEOUT = DB ? 10*1000 : 60*1000; + static final long DEFAULT_TIMEOUT = DB ? 20 * 10*1000 : 20 * 60*1000; static final long CHECK_INTERVAL = DEFAULT_TIMEOUT / 2; // These are temporally ordered: larger values as lateness increases diff --git a/services/java/com/android/server/am/ActiveServices.java b/services/java/com/android/server/am/ActiveServices.java index d66c5a715d33..b186e2cdcdad 100755 --- a/services/java/com/android/server/am/ActiveServices.java +++ b/services/java/com/android/server/am/ActiveServices.java @@ -70,7 +70,7 @@ public final class ActiveServices { static final String TAG_MU = ActivityManagerService.TAG_MU; // How long we wait for a service to finish executing. - static final int SERVICE_TIMEOUT = 20*1000; + static final int SERVICE_TIMEOUT = 20*20*1000; // How long we wait for a service to finish executing. static final int SERVICE_BACKGROUND_TIMEOUT = SERVICE_TIMEOUT * 10; diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index baeced713fbd..5c4fb8e5818f 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -262,13 +262,13 @@ public final class ActivityManagerService extends ActivityManagerNative // How long we wait for a launched process to attach to the activity manager // before we decide it's never going to come up for real. - static final int PROC_START_TIMEOUT = 10*1000; + static final int PROC_START_TIMEOUT = 20*10*1000; // How long we wait for a launched process to attach to the activity manager // before we decide it's never going to come up for real, when the process was // started with a wrapper for instrumentation (such as Valgrind) because it // could take much longer than usual. - static final int PROC_START_TIMEOUT_WITH_WRAPPER = 1200*1000; + static final int PROC_START_TIMEOUT_WITH_WRAPPER = 20*1200*1000; // How long to wait after going idle before forcing apps to GC. static final int GC_TIMEOUT = 5*1000; @@ -295,18 +295,18 @@ public final class ActivityManagerService extends ActivityManagerNative static final int CPU_MIN_CHECK_DURATION = (DEBUG_POWER_QUICK ? 1 : 5) * 60*1000; // How long we allow a receiver to run before giving up on it. - static final int BROADCAST_FG_TIMEOUT = 10*1000; - static final int BROADCAST_BG_TIMEOUT = 60*1000; + static final int BROADCAST_FG_TIMEOUT = 20*10*1000; + static final int BROADCAST_BG_TIMEOUT = 20*60*1000; // How long we wait until we timeout on key dispatching. - static final int KEY_DISPATCHING_TIMEOUT = 5*1000; + static final int KEY_DISPATCHING_TIMEOUT = 20*5*1000; // How long we wait until we timeout on key dispatching during instrumentation. - static final int INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT = 60*1000; + static final int INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT = 20*60*1000; // Amount of time we wait for observers to handle a user switch before // giving up on them and unfreezing the screen. - static final int USER_SWITCH_TIMEOUT = 2*1000; + static final int USER_SWITCH_TIMEOUT = 20*2*1000; // Maximum number of users we allow to be running at a time. static final int MAX_RUNNING_USERS = 3; diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 4d6727c84f5c..83f7f59dbdf8 100755 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -94,16 +94,16 @@ final class ActivityStack { // How long we wait until giving up on the last activity to pause. This // is short because it directly impacts the responsiveness of starting the // next activity. - static final int PAUSE_TIMEOUT = 500; + static final int PAUSE_TIMEOUT = 20 * 500; // 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. - static final int STOP_TIMEOUT = 10*1000; + static final int STOP_TIMEOUT = 20 * 10*1000; // How long we wait until giving up on an activity telling us it has // finished destroying itself. - static final int DESTROY_TIMEOUT = 10*1000; + static final int DESTROY_TIMEOUT = 20 * 10*1000; // How long until we reset a task when the user returns to it. Currently // disabled. @@ -111,7 +111,7 @@ final class ActivityStack { // How long between activity launches that we consider safe to not warn // the user about an unexpected activity being launched on top. - static final long START_WARN_TIME = 5*1000; + static final long START_WARN_TIME = 20 * 5*1000; // Set to false to disable the preview that is shown while a new activity // is being started. @@ -119,7 +119,7 @@ final class ActivityStack { // How long to wait for all background Activities to redraw following a call to // convertToTranslucent(). - static final long TRANSLUCENT_CONVERSION_TIMEOUT = 2000; + static final long TRANSLUCENT_CONVERSION_TIMEOUT = 20 * 2000; static final boolean SCREENSHOT_FORCE_565 = ActivityManager .isLowRamDeviceStatic() ? true : false; diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java index d616f1b66e7a..03091dd9d98c 100644 --- a/services/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/java/com/android/server/am/ActivityStackSupervisor.java @@ -94,13 +94,13 @@ public final class ActivityStackSupervisor { public static final int HOME_STACK_ID = 0; /** How long we wait until giving up on the last activity telling us it is idle. */ - static final int IDLE_TIMEOUT = 10*1000; + static final int IDLE_TIMEOUT = 20 * 10*1000; /** How long we can hold the sleep wake lock before giving up. */ - static final int SLEEP_TIMEOUT = 5*1000; + static final int SLEEP_TIMEOUT = 20 * 5*1000; // How long we can hold the launch wake lock before giving up. - static final int LAUNCH_TIMEOUT = 10*1000; + static final int LAUNCH_TIMEOUT = 20 * 10*1000; static final int IDLE_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG; static final int IDLE_NOW_MSG = FIRST_SUPERVISOR_STACK_MSG + 1; diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index ab59e6a2e63b..d0fb0dcb5fc1 100755 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -240,7 +240,7 @@ public class PackageManagerService extends IPackageManager.Stub { * minute but we sometimes do very lengthy I/O operations on this thread, * such as installing multi-gigabyte applications, so ours needs to be longer. */ - private static final long WATCHDOG_TIMEOUT = 1000*60*10; // ten minutes + private static final long WATCHDOG_TIMEOUT = 20 * 1000*60*10; // 20 * ten minutes /** * Whether verification is enabled by default. @@ -251,7 +251,7 @@ public class PackageManagerService extends IPackageManager.Stub { * The default maximum time to wait for the verification agent to return in * milliseconds. */ - private static final long DEFAULT_VERIFICATION_TIMEOUT = 10 * 1000; + private static final long DEFAULT_VERIFICATION_TIMEOUT = 20 * 10 * 1000; /** * The default response for package verification timeout. diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 096921d13eba..890dfe92fc20 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -254,10 +254,10 @@ public class WindowManagerService extends IWindowManager.Stub static final int DEFAULT_FADE_IN_OUT_DURATION = 400; /** Amount of time (in milliseconds) to delay before declaring a window freeze timeout. */ - static final int WINDOW_FREEZE_TIMEOUT_DURATION = 2000; + static final int WINDOW_FREEZE_TIMEOUT_DURATION = 20 * 2000; /** Amount of time (in milliseconds) to delay before declaring a starting window leaked. */ - static final int STARTING_WINDOW_TIMEOUT_DURATION = 10000; + static final int STARTING_WINDOW_TIMEOUT_DURATION = 20 * 10000; /** * If true, the window manager will do its own custom freezing and general @@ -267,10 +267,10 @@ public class WindowManagerService extends IWindowManager.Stub // Maximum number of milliseconds to wait for input devices to be enumerated before // proceding with safe mode detection. - private static final int INPUT_DEVICES_READY_FOR_SAFE_MODE_DETECTION_TIMEOUT_MILLIS = 1000; + private static final int INPUT_DEVICES_READY_FOR_SAFE_MODE_DETECTION_TIMEOUT_MILLIS = 20 * 1000; // Default input dispatching timeout in nanoseconds. - static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 5000 * 1000000L; + static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 20 * 5000 * 1000000L; /** Minimum value for createStack and resizeStack weight value */ public static final float STACK_WEIGHT_MIN = 0.2f; @@ -534,9 +534,9 @@ public class WindowManagerService extends IWindowManager.Stub // The last time we had a timeout when waiting for a wallpaper. long mLastWallpaperTimeoutTime; // We give a wallpaper up to 150ms to finish scrolling. - static final long WALLPAPER_TIMEOUT = 150; + static final long WALLPAPER_TIMEOUT = 20 * 150; // Time we wait after a timeout before trying to wait again. - static final long WALLPAPER_TIMEOUT_RECOVERY = 10000; + static final long WALLPAPER_TIMEOUT_RECOVERY = 20 * 10000; boolean mAnimateWallpaperWithTarget; AppWindowToken mFocusedApp = null; @@ -3875,7 +3875,7 @@ public class WindowManagerService extends IWindowManager.Stub mStartingIconInTransition = false; mSkipAppTransitionAnimation = false; mH.removeMessages(H.APP_TRANSITION_TIMEOUT); - mH.sendEmptyMessageDelayed(H.APP_TRANSITION_TIMEOUT, 5000); + mH.sendEmptyMessageDelayed(H.APP_TRANSITION_TIMEOUT, 20 * 5000); } } } @@ -4434,7 +4434,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mAppsFreezingScreen == 1) { startFreezingDisplayLocked(false, 0, 0); mH.removeMessages(H.APP_FREEZE_TIMEOUT); - mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 5000); + mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 20 * 5000); } } final int N = wtoken.allAppWindows.size(); @@ -4965,7 +4965,7 @@ public class WindowManagerService extends IWindowManager.Stub try { startFreezingDisplayLocked(false, exitAnim, enterAnim); mH.removeMessages(H.CLIENT_FREEZE_TIMEOUT); - mH.sendEmptyMessageDelayed(H.CLIENT_FREEZE_TIMEOUT, 5000); + mH.sendEmptyMessageDelayed(H.CLIENT_FREEZE_TIMEOUT, 20* 5000); } finally { Binder.restoreCallingIdentity(origId); } @@ -5244,7 +5244,7 @@ public class WindowManagerService extends IWindowManager.Stub hideBootMessagesLocked(); // If the screen still doesn't come up after 30 seconds, give // up and turn it on. - mH.sendEmptyMessageDelayed(H.BOOT_TIMEOUT, 30*1000); + mH.sendEmptyMessageDelayed(H.BOOT_TIMEOUT, 20 * 30*1000); } mPolicy.systemBooted(); @@ -7357,7 +7357,7 @@ public class WindowManagerService extends IWindowManager.Stub if (mAnimator.mAnimating || mAnimationScheduled) { // If we are animating, don't do the gc now but // delay a bit so we don't interrupt the animation. - sendEmptyMessageDelayed(H.FORCE_GC, 2000); + sendEmptyMessageDelayed(H.FORCE_GC, 20 * 2000); return; } // If we are currently rotating the display, it will @@ -10033,7 +10033,7 @@ public class WindowManagerService extends IWindowManager.Stub // processes holds on others can be released if they are // no longer needed. mH.removeMessages(H.FORCE_GC); - mH.sendEmptyMessageDelayed(H.FORCE_GC, 2000); + mH.sendEmptyMessageDelayed(H.FORCE_GC, 20 * 2000); mScreenFrozenLock.release(); |