c64ff3782c71ce7b5a92b7d91199a922ea0a37d9 |
|
10-Oct-2013 |
Jeff Brown <jeffbrown@google.com> |
Minor code cleanup in loaders. Change-Id: I38147eb9e494b53d41ca3cad042d804631916941
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
d01571e6d4e1c403534e19142720530d324eac9b |
|
02-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Isolate calls to each remote DocumentsProvider. All background work is going through AsyncTasks, which uses a shared thread pool. Even with the new ContentProviderClient logic to detect ANRs, the UI can still appear to be unresponsive for 20 seconds, even if the user attempted to switch to a different backend. In the worst case, a backlog of thumbnail requests would end up wedging Loaders for a long time, since they all share the same THREAD_POOL_EXECUTOR. This change isolates calls to each provider onto their own thread, which they're free to wedge and recover from over time. It also means we no longer need a dedicated thread pool for recents loading, and can use a simpler Semaphore instead. Disables thumbnails in recents on svelte devices. Bug: 10993301, 11014856 Change-Id: I7f8a5bbb5f64437e006cb2c48b7e854136d5c38c
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
ca614f78bed7eebf9dbfd77ba5720a0b5eeed816 |
|
15-Mar-2013 |
Dianne Hackborn <hackbod@google.com> |
Fix a bug where we could lose a loader content change. If AsyncTaskLoader starts a background update due to a content change, and that update is cancelled, we drop the data when it finally arrives and forget that the content changed. If we later come back to the loader, we then end up showing stale data because we don't know that we still need to update due to the old content change. This change adds a couple new APIs to Loader to deal with the time between when you ask for whether there is a content change and finally either commit the data or cancel the update. AsyncTaskLoader is changed to make use of this so that it doesn't lose changes. Change-Id: I3866236b1c22bb9138f2d9f6032b126aeaee2e6e
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
c21b5a019c1da00b6d861cd2859e3c349a44b3a7 |
|
08-Jan-2013 |
Jeff Brown <jeffbrown@google.com> |
Fix cursor window leak when query execution fails. Ensure that the Cursor object is closed if a query on a content provider fails due to an error or is canceled during execution. There are several places in the code where similar problems can occur. To further reduce the likelihood of leaks, close the cursor window immediately when a query fails. Bug: 7278577 Change-Id: I8c686c259de80a162b9086628a817d57f09fdd13
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
a7771df3696954f0e279407e8894a916a7cb26cc |
|
08-May-2012 |
Jeff Brown <jeffbrown@google.com> |
Move CancellationSignal to android.os package. Bug: 6427830 Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
b19a71a20adb48c084e87d06a1e6b0dcb49170f5 |
|
31-Jan-2012 |
Jeff Brown <jeffbrown@google.com> |
Support automatic cancellation of Loaders. Change-Id: I18d3f49e413f48fcdd519d15e99c238ad54d35b9
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
75ea64fc54f328d37b115cfb1ded1e45c30380ed |
|
26-Jan-2012 |
Jeff Brown <jeffbrown@google.com> |
Implement a cancelation mechanism for queries. Added new API to enable cancelation of SQLite and content provider queries by means of a CancelationSignal object. The application creates a CancelationSignal object and passes it as an argument to the query. The cancelation signal can then be used to cancel the query while it is executing. If the cancelation signal is raised before the query is executed, then it is immediately terminated. Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
9567a66a5e6f49dd8495fb5f6e2efb9f32e84b35 |
|
20-Apr-2011 |
Dianne Hackborn <hackbod@google.com> |
Deprecate a bunch of APIs. And clean up some documentation. Change-Id: I7882183b3daf883b7ac6098d19f88dc7cfbcdf61
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
260c3c77d9b340164e055f87002c64d78da6e836 |
|
31-Jan-2011 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #3381489: IllegalStateException: attempt to re-open... ...an already-closed object: android.database.sqlite.SQLiteQuery It turns out there is a state we are missing -- the loader is still needed, but in the inactive list. In this case the loader needs to continue holding on to its current data, and not deliver any new data (which would result in it releasing its old data). This introduces the new state to Loader, and uses it in AsyncTaskLoader so all subclasses of that should get the new correct behavior. A further improvement would be to unregister CursorLoader's content listener when going in to this state, but that can wait for later. Change-Id: I6d30173b94f8e30b5be31d018accd328cc3388ec
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
5d9d03a0234faa3cffd11502f973057045cafe82 |
|
24-Jan-2011 |
Dianne Hackborn <hackbod@google.com> |
Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException... ...Invalid index 0, size is 0 at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326) It looks like if an arrow key is dispatched between the time the list view is told its data set has changed and it does the resulting layout pass, we could try to move the position to a now invalid index. This may prevent that from happening. Also put in a better error message if saving state of a fragment whose target is no longer in the fragment manager. And fix a bug in PackageManager where we could return a null from queryIntentActivities(). And add a new API to find out whether a fragment is being removed, to help fix issue #3306021: NPE at android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java) Next, for new HC apps we can delay committing data to storage until the activity is stopped. Finally, use the new multi-threaded AyncTask executor in a few places, so we don't have worked blocked by long-running tasks from the application. Change-Id: I27b2aafedf2e1bf3a2316309889613fa539760f3
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
4afde4fda383116a9730aea1e931d4bce7ea0fd0 |
|
18-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Hiding the AsyncTaskLoader.waitForLoader method I introduced this method a couple of weeks ago, but then we had a chat with Dianne and she made a good point that rather than having this behavior on AsyncTaskLoader, we should have it on LoaderManager and then it will cover all kinds of loaders, not just the ones inheriting from AsyncTaskLoader. She suggested that we postpone that work until after Honeycomb. Change-Id: I1939956296cddb678791ba652ab5f4a0dd45eea1
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
327fbd2c8fa294b919475feb4c74a74ee1981e02 |
|
17-Jan-2011 |
Dianne Hackborn <hackbod@google.com> |
Fix a bunch of API review bugs. 3362464 API REVIEW: android.content potpourri 3362445 API REVIEW: Fragment transaction stuff 3362428 API REVIEW: Fragment stuff 3362418 API REVIEW: Loader stuff 3362414 API REVIEW: android.content.pm.ActivityInfo Change-Id: I6475421a4735759b458acb67df4380cc6234f147
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
540f86aa42877ac73f6f2f24dac49382432aa078 |
|
12-Jan-2011 |
Dianne Hackborn <hackbod@google.com> |
Get rid of old ParcelFileDescriptor API. Also some new debugging code in AsyncTaskLoader. Change-Id: Ib13386b7862821cf0ee31b003bedef78f46240f1
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
59d8edd09dc88cc0eb629bdee711a004d300f2fa |
|
09-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Fixed the waitForLoader method. The reason we need a separate latch is that AsyncTask will post onPostExecute/onCancelled _after_ executing mFuture.get(). The previous implementation would only wait for mFuture.get() to complete and not the entire task. Change-Id: I96964591980965148eb09af38b5838bfa5d28277
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
247fe74c934cb3fba85aae7e051a8044f460fb11 |
|
09-Jan-2011 |
Dianne Hackborn <hackbod@google.com> |
Implement issue # 3255887 could CursorLoader offer... ...to throttle contentobserver-based requeries Why yes, I guess it could. This also reworks AsyncTaskLoader to not generate multiple concurrent tasks if it is getting change notifications before the last background task is complete. And removes some of the old APIs that had been deprecated but need to be gone for final release. And fixes a few little problems with applying the wrong theme in system code. Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
cd3676e7b835653b04d4f66251a63749e7603f5b |
|
07-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Adding AsyncTaskLoader.waitForLoader() for testing Change-Id: I8a4c13d48c9deca70594be58beafb68f08da65ea
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
0e3b8f421dfcc5363f234eb1b76479cb2fb2e8ee |
|
21-Dec-2010 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #3301572: onCreateLoader must not be a member class: VolumeMetadataLoader Also some various cleanup. Change-Id: I8e8616a86c50c86817f7ec9bb02a5954c1ccd84f
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
a2ea747faaf5fcd437afbaaf4085cfc29e7c16b8 |
|
20-Dec-2010 |
Dianne Hackborn <hackbod@google.com> |
More cleanup of Loader APIs. - Remove old method names. - Introduce onXxx() hooks to Loader. - Improve debugging. Change-Id: I3fba072a05c7023aa7d2c3eb4e126feb514ab6d8
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
bef9c7a59dc020c5cdcbd555b5212ae5a10e8045 |
|
17-Jun-2010 |
Dmitri Plotnikov <dplotnikov@google.com> |
Preventing cursor leaks when a query is interrupted Re-ran runtest cts-os Change-Id: I518a2a4f842b01d082078e16643aa377a4575237
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
7860b10d1687b7102a14f321d327620bb4191fa6 |
|
18-May-2010 |
Jeff Hamilton <jham@android.com> |
Another try at fixing the docs build. Change-Id: Ief60f4e71efee1d3bb4ee36e2f2a2fcaeb996284
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
e6c6d09a7eb9a7cd6e94c164e75a08dc499fd577 |
|
18-May-2010 |
Jeff Hamilton <jham@android.com> |
Fix a broken docs link. Change-Id: I2e940165726ecfce306cd143ed049045c927b6a0
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|
9911b7f83db2e960f72345e6d50df2b77ca75e3f |
|
15-May-2010 |
Jeff Hamilton <jham@android.com> |
Add the Loader and supporting classes. Loaders are designed to make it easier to manage asynchronously loading data. Change-Id: I948db08c721411e94fca071dc6fb4db2b83ea4d6
/frameworks/base/core/java/android/content/AsyncTaskLoader.java
|