summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/LoaderManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Nested fragments.Dianne Hackborn2012-09-061-2/+4
| | | | Change-Id: I79acc19b391352c16b06afee2ca543223c38e364
* Support automatic cancellation of Loaders.Jeff Brown2012-02-011-5/+51
| | | | Change-Id: I18d3f49e413f48fcdd519d15e99c238ad54d35b9
* SDK only: now that support lib is in SDK, we can link to it.Dianne Hackborn2011-12-121-1/+2
| | | | | | | | | | | Update some of the platform documentation to directly link to relevent support lib docs. Yay! Also improve BroadcastReceiver documentation to more clearly discussion security around receivers, and how the support lib's LocalBroadcastManager can help. Change-Id: I563c7516d5fbf91ab884c86bc411aff726249e42
* Bug 5535639 - Monkeys mad at FragmentManagerAdam Powell2011-10-311-1/+4
| | | | | | | Also check for starting deferred start fragments when a loader is destroyed. Change-Id: Ia17a902c579c09d7ac01079c7c1da137635aa08b
* Add API for deferring fragment start.Adam Powell2011-10-271-0/+14
| | | | | | | | | | | | | | Fragments now have the setDeferStart method to signal that a fragment has lower priority than others. Deferred start fragments will not always be started immediately; they will be started once any loaders have finished servicing any outstanding requests. This is useful if any attached fragments are not immediately visible and can wait to start until later. Disabling deferStart on a fragment that is waiting for a deferred start will start it immediately. Start. Change-Id: Ia1f004877ca5e88d4f10147d21c7e2e97f141c34
* docs: add developer guide cross-references, Project ACREJoe Fernandez2011-10-041-0/+6
| | | | Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
* Fix some problems with moving in and out of detached state.Dianne Hackborn2011-06-101-4/+29
| | | | | | | | | Loaders were not being re-initialized correctly when coming back (this would also impact the back stack). The ListView also wasn't working correctly, and there were also problems with simply re-using a Fragment instance after it had been removed. Change-Id: I534b091ae09c0ef7ffffe9d68049e6840e8926b3
* DO NOT MERGE: Integrate from main - Deprecate a bunch of APIs.Dianne Hackborn2011-05-131-1/+7
| | | | | | And clean up some documentation. Change-Id: I8f06e2fc3bb6c552581b64657e82ba690d524232
* Fix issue #3381489: IllegalStateException: attempt to re-open...Dianne Hackborn2011-01-301-0/+2
| | | | | | | | | | | | | | | | | | | ...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
* Fix some error messages, turn off logging.Dianne Hackborn2011-01-211-1/+1
| | | | Change-Id: Ifcd2c0f0ad137485896144d2248361aeb0a05600
* Fix issue #3352125: Crash after clearing search queryDianne Hackborn2011-01-201-24/+171
| | | | | | | | | | | | Don't deliver data arriving from a Loader after the application has moved on to a new Loader. Also throttle the number of Loaders will have actively running for a particular ID. Oh, and documentation. Documentation is good. Change-Id: I5a5cfdbb8c9bfb320ffc014f99e37fe7e3001382
* Fix a bunch of API review bugs.Dianne Hackborn2011-01-171-8/+0
| | | | | | | | | | 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
* Merge "Start renaming FragmentTransaction.openTransaction() to ↵Dianne Hackborn2011-01-171-1/+1
|\ | | | | | | beginTransaction()." into honeycomb
| * Start renaming FragmentTransaction.openTransaction() to beginTransaction().Dianne Hackborn2011-01-171-1/+1
| | | | | | | | Change-Id: Ib4a6d824b33cca699b7b25159c491fb610d5f5da
* | Delivering null cursor to loader callbacks.Dmitri Plotnikov2011-01-171-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ContentProviders are allowed to return null and both of our contact directories (Focus and Exchange) actually do when they find no data to return. The problem is that when LoaderManager receives a result from a loader, it checks if the result is the same as previously received. That's fine, as long as the loader always returns a different result. Now consider a loader that returns null when it cannot produce the result. What we are seeing is that if the loader is rapidly restared and returns null twice in a row, the null is never delivered to the callbacks. In the case of the reported bug, the scenario is this: 1. We look for "foo" 2. Data for "foo" comes from a directory and we display it 3. We hit backspace twice in rapid succession. Each time we hit backspace, the loader is restared, but since we do this very fast, the second restart overrides the first. So far so good. 4. The directories are programmed to return null if the query string is less than 3 characters long, so the loader returns null twice. 5. Loader manager looks at the final result, compares it to the previous result and since they are the same (both null) concludes that it does not need to deliver either of them. 6. The UI attempts to show the stale data and blows up Bug: 3352125 Change-Id: I3e5bc505faa03f72ebe5cb010377a740f5c7d5b6
* Fix issue #3301572: onCreateLoader must not be a member class: ↵Dianne Hackborn2010-12-211-14/+20
| | | | | | | | VolumeMetadataLoader Also some various cleanup. Change-Id: I8e8616a86c50c86817f7ec9bb02a5954c1ccd84f
* More cleanup of Loader APIs.Dianne Hackborn2010-12-201-38/+66
| | | | | | | | - Remove old method names. - Introduce onXxx() hooks to Loader. - Improve debugging. Change-Id: I3fba072a05c7023aa7d2c3eb4e126feb514ab6d8
* Some fixes to the new loader management.Dianne Hackborn2010-12-171-2/+12
| | | | Change-Id: Ib882be5762b0ebeed9b027754159f401232718e9
* Fixes for when onLoaderReset() is called.Dianne Hackborn2010-12-161-1/+6
| | | | Change-Id: Iab479926f11fa579757904032ada46c41686d560
* Fix issue #3272082: Contacts: when going back from edit view,Dianne Hackborn2010-12-161-16/+107
| | | | | | | | | | | | | | | | | | | | | list UI is not ready yet This involves some reworking of Loaders. Loaders, in particular CursorLoader, are now expected to retain their current data after being stopped. This allows applications to keep that data across onStop() -> onStart(), so when the user returns to the app it doesn't have to wait for the data to reload and thus cause flicker. This includes various API changes to better reflect the new semantics, plus a new LoaderCallbacks method to tell the application when it is actually time to stop their use of a loader's data. Note this is somewhat half-done, to help checking in the extensive application changes that are required without causing build breakage. Change-Id: Ib4b3bf8185a6da46e7f06ca125521d65e2e380a1
* Fix issue #3274841: Orientation change problem with a paused activityDianne Hackborn2010-12-131-1/+60
| | | | | | | | Plus a bunch of debug output improvements. And some new Intent helpers for dealing with restarting an app. Change-Id: I50ec56bca6a86c562156b13fe8a6fdf68038a12e
* Fixe some stuff.Dianne Hackborn2010-11-081-6/+6
| | | | | | | | | | | | | | | Addresses these bugs: 3061847 - With no headers, PreferenceActivity crashes 2888426 - minor typo in DevicePolicyManagerService.ActiveAdmin.writeToXml() 3159155 - IllegalStateException:"Can not perform this action after onSaveInstanceState" while dismissing a DialogFragment 3155995 - PopupWindow.showAtLocation does not respect LayoutParams Also tweak the new fragment APIs to use abstract classes instead of interfaces as base classes. Change-Id: I9c0b4337fe0e304b737b5f7c2762762372bb3020
* Fix issue #3130426: Finsky crash in switching from window carouselDianne Hackborn2010-10-261-9/+53
| | | | | | | | | | | | Need to note that we no longer have saved state before delivering results or new intents to an activity. Also do some work on loaders to prevent apps from making fragment changes as a result of receiving loader data. This makes apps consistent crash in a case that they would previously sometimes crash (if they got the loader data after onPause). Change-Id: I46e9e46d0aa05d9d7d6a275a2a488a18a20a5747
* This may fix LoaderManager bug where a closed cursor could be used.Dianne Hackborn2010-08-091-5/+8
| | | | Change-Id: I362d5f86dcbdbede921ef9d29c849ed6401850ea
* Fix some Loader bugs.Dianne Hackborn2010-08-051-15/+76
| | | | | | | | | - Weren't re-attaching to the current loader manager after retaining instance state. - Ensure loaders are being destroyed. - Fix a bug if you call restartLoader() inside of onLoadFinished(). Change-Id: I89df53db49d8e09047bf55216ebeb0f133c059e7
* Relay stopLoading() on the loader from LoaderInfo.stop()Ben Komalo2010-07-211-0/+1
| | | | Change-Id: Ie48b303cef4fe1b284d4ed6a1b310f3dcef20c91
* Fix bug where loader listener would be registered twice.Dianne Hackborn2010-07-151-49/+80
| | | | | | Also change LoaderManager to an interface. Change-Id: Ife6d123e56cc6f63b6fe902afac35b2673761e60
* Change Javadoc to get around brokennessKenny Root2010-07-121-1/+1
| | | | | | | | Apparently the Javadoc we're using can't handle generic method arguments, so remove the argument specification to let the compiler match the right one since we're not overloading that method anyway. Change-Id: Ie1a1a28c6e3c5fe5d2d434ecc66519e514bc692c
* Implement instance passing in LoaderManager.Dianne Hackborn2010-07-091-73/+199
| | | | | | | Activity now propagates loaders across instances when retaining state. Adjusted APIs to make it better for apps to deal with this. Change-Id: I8a6448cff1132e66207f9223eb29ccfc0decf2ca
* Fix build.Dianne Hackborn2010-07-081-2/+1
| | | | Change-Id: I60185df6150d13d704a28933bc919527da173307
* Integrate Loader support in to Activity/Fragment.Dianne Hackborn2010-07-081-0/+181
Introduces a new LoaderManager class that takes care of most of what LoaderManagingFragment does. Every Fragment and Activity can have one instance of this class. In the future, the instance will be retained across config changes. Also various other cleanups and improvement. Change-Id: I3dfb406dca46bda7f5acb3c722efcbfb8d0aa9ba