diff options
| author | Daniel Chapin <chapin@google.com> | 2020-02-10 22:12:44 +0000 |
|---|---|---|
| committer | Daniel Chapin <chapin@google.com> | 2020-02-10 22:12:44 +0000 |
| commit | 3a54effffdb361ccd60169dcce93cf4e87fc6dac (patch) | |
| tree | d8cfca03706d46e505ac5b8ebbc6d756078f1905 /core/java/android/content/ContentResolver.java | |
| parent | 140fc2e9c9382d5326b72ff28e8782e7bffc493d (diff) | |
Revert "Prevents an NPE when content provider is slow to start"
This reverts commit 140fc2e9c9382d5326b72ff28e8782e7bffc493d.
Reason for revert: b/149176266
Change-Id: I4015fcc1624ee116c4a013c99816d43ce7b24834
Diffstat (limited to 'core/java/android/content/ContentResolver.java')
| -rw-r--r-- | core/java/android/content/ContentResolver.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 0e0161ff4e9f..f32a4ab43357 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -700,27 +700,6 @@ public abstract class ContentResolver implements ContentInterface { /** @hide */ public static final String REMOTE_CALLBACK_RESULT = "result"; - /** - * How long we wait for an attached process to publish its content providers - * before we decide it must be hung. - * @hide - */ - public static final int CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS = 10 * 1000; - - /** - * How long we wait for an provider to be published. Should be longer than - * {@link #CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS}. - * @hide - */ - public static final int CONTENT_PROVIDER_WAIT_TIMEOUT_MILLIS = - CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS + 10 * 1000; - - // 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 - // needs to be started for that. - private static final int GET_TYPE_TIMEOUT_MILLIS = - CONTENT_PROVIDER_WAIT_TIMEOUT_MILLIS + 5 * 1000; - public ContentResolver(@Nullable Context context) { this(context, null); } @@ -870,6 +849,8 @@ public abstract class ContentResolver implements ContentInterface { } } + private static final int GET_TYPE_TIMEOUT_MILLIS = 3000; + private static class GetTypeResultListener implements RemoteCallback.OnResultListener { @GuardedBy("this") public boolean done; |
