Merge "Add support for a hw_timeout_multiplier system property." into sc-dev

This commit is contained in:
Peter Collingbourne
2021-03-09 04:35:45 +00:00
committed by Android (Google) Code Review
17 changed files with 73 additions and 29 deletions

View File

@@ -769,7 +769,7 @@ public abstract class ContentResolver implements ContentInterface {
// Always log queries which take 500ms+; shorter queries are
// sampled accordingly.
private static final boolean ENABLE_CONTENT_SAMPLE = false;
private static final int SLOW_THRESHOLD_MILLIS = 500;
private static final int SLOW_THRESHOLD_MILLIS = 500 * Build.HW_TIMEOUT_MULTIPLIER;
private final Random mRandom = new Random(); // guarded by itself
/** @hide */
@@ -783,7 +783,8 @@ public abstract class ContentResolver implements ContentInterface {
* before we decide it must be hung.
* @hide
*/
public static final int CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS = 10 * 1000;
public static final int CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS =
10 * 1000 * Build.HW_TIMEOUT_MULTIPLIER;
/**
* How long we wait for an provider to be published. Should be longer than
@@ -791,10 +792,11 @@ public abstract class ContentResolver implements ContentInterface {
* @hide
*/
public static final int CONTENT_PROVIDER_READY_TIMEOUT_MILLIS =
CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS + 10 * 1000;
CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS + 10 * 1000 * Build.HW_TIMEOUT_MULTIPLIER;
// Timeout given a ContentProvider that has already been started and connected to.
private static final int CONTENT_PROVIDER_TIMEOUT_MILLIS = 3 * 1000;
private static final int CONTENT_PROVIDER_TIMEOUT_MILLIS =
3 * 1000 * Build.HW_TIMEOUT_MULTIPLIER;
// Should be >= {@link #CONTENT_PROVIDER_WAIT_TIMEOUT_MILLIS}, because that's how
// long ActivityManagerService is giving a content provider to get published if a new process