| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Does not remove Support Library artifacts from docs classpath (ApiDocs.bp)
because they are still used in development/samples, which is not as easy
to migrate as javadoc.
Bug: 158779503
Test: make docs
Exempt-From-Owner-Approval: Mass find/replace for androidx migration
Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it clear that the framework versions of
Fragments and Loaders should be replaced with their
identically named versions in the Support Library.
Reference the recent work on Lifecycle as an example
of a Support Library only change that should motivate
developers to switch to the Support Library
equivalents.
Test: Reviewed new Javadoc
BUG: 70336450
Change-Id: I93151fa0a316bba824c2e55f80f7de9d30bed3c6
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Redirect developers to use the Support Library
versions of Fragments and Loaders to ensure that
they get consistent behavior across versions of
Android and all devices as well as access to
Lifecycle improvements.
Test: Confirmed APIs deprecated in current.txt
BUG: 68381801
Change-Id: I58ec599e557fc93c8547c45ba7c9ced96b0c8616
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 32758881
Bug 34264461
When destroying the LoaderManager, the host was not being cleared.
The host was being leaked and this leaked the Activity.
When a LoaderManager is reused, for example with an orientation
change, the host was updated, but it wasn't started. This
adds a test for that case to ensure that when a reused
LoaderManager is loaded that it is properly started.
Test: Ib90f14e16083916a21a25ce87a4dd29ab9a33878
Change-Id: Id4c8afab5db0a78bbff376d597be294a6e3dbcba
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LoaderManagers configure their host callback lazily as their
associated fragment is brought up through its lifecycle states. In the
case of fragments on the fragment back stack this could happen very
late, if at all. As a LoaderManager's host callback references the
host Activity, this means that a LoaderManager could keep a destroyed
Activity reference alive.
Update the host callbacks of all LoaderManagers eagerly during the
restore non-configuration instance phase.
Bug: 30653222
Test: core/tests/coretests/src/android/app/LoaderLifecycleTest.java
Change-Id: I5d2b81daae5e7cae429fcf4934e64b3ce281140c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Framework edition
In some cases restartLoader calls that happen in quick succession
could cause the new loader to become stuck and never run. Treat loader
restarts for loaders that have not yet started the same as starting a
brand new loader.
Bug 27437287
https://code.google.com/p/android/issues/detail?id=56464
Change-Id: Ia4e276fc8e63d43b9c52c6155cea827b194d8b19
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loaders report entering the started state in two places, once from
their host callbacks and once when moving into their host fragment's
starting state. In the former, we will also deliver load results if
we're finishing a retained cycle.
In practice, the individual fragment start happens first which clears
the report-next-start flag, then the finishRetain step sees that flag
is cleared and dispatches the finished load results again. Change
reportStart to only call onLoadFinished if we are not finishing up a
retain step.
Bug 28074512
Change-Id: I85b848f7d7b239c8fac5aec8f0c91e4eea6bcebf
|
| |
|
|
|
|
|
|
|
|
| |
The FragmentManagerImpl is intimately tied with a FragmentActivity. In
many cases, we want to be able to create / manage Fragments outside of
a FragmentManager. This defines a FragmentController interface that can
be used by any class to host Fragments.
Bug: 19569654
Change-Id: I6816a5c1815122d206062b9f4584ad460b3d41dd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new kind of key/value mapping that stores its data
as an array, so it doesn't need to create an extra Entry object
for every mapping placed in to it. It is also optimized to reduce
memory overhead in other ways, by keeping the base object small,
being fairly aggressive about keeping the array data structures
small, etc.
There are some unit and performance tests dropped in to some
random places; they will need to be put somewhere else once I
decided what we are going to do with this for the next release
(for example if we make it public the unit tests should go in
to CTS).
Switch IntentResolver to using ArrayMap instead of HashMap.
Also get rid of a bunch of duplicate implementations of binarySearch,
and add an optimization to the various sparse arrays where you can
supply an explicit 0 capacity to prevent it from doing an initial
array allocation; use this new optimization in a few places where it
makes sense.
Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
|
| |
|
|
|
|
|
| |
See change Ia577caecbacb226a3ce525a01a66283efb6ba754 for details.
Change-Id: I9f07eeceaa3829f71008e6f6a38ab849095bd69c
Signed-off-by: Roman Mazur <mazur.roman@gmail.com>
|
| |
|
|
| |
Change-Id: I79acc19b391352c16b06afee2ca543223c38e364
|
| |
|
|
| |
Change-Id: I18d3f49e413f48fcdd519d15e99c238ad54d35b9
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Also check for starting deferred start fragments when a loader is
destroyed.
Change-Id: Ia17a902c579c09d7ac01079c7c1da137635aa08b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
And clean up some documentation.
Change-Id: I8f06e2fc3bb6c552581b64657e82ba690d524232
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...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
|
| |
|
|
| |
Change-Id: Ifcd2c0f0ad137485896144d2248361aeb0a05600
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| | |
beginTransaction()." into honeycomb
|
| | |
| |
| |
| | |
Change-Id: Ib4a6d824b33cca699b7b25159c491fb610d5f5da
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
VolumeMetadataLoader
Also some various cleanup.
Change-Id: I8e8616a86c50c86817f7ec9bb02a5954c1ccd84f
|
| |
|
|
|
|
|
|
| |
- Remove old method names.
- Introduce onXxx() hooks to Loader.
- Improve debugging.
Change-Id: I3fba072a05c7023aa7d2c3eb4e126feb514ab6d8
|
| |
|
|
| |
Change-Id: Ib882be5762b0ebeed9b027754159f401232718e9
|
| |
|
|
| |
Change-Id: Iab479926f11fa579757904032ada46c41686d560
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Plus a bunch of debug output improvements.
And some new Intent helpers for dealing with restarting an app.
Change-Id: I50ec56bca6a86c562156b13fe8a6fdf68038a12e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Change-Id: I362d5f86dcbdbede921ef9d29c849ed6401850ea
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
| |
Change-Id: Ie48b303cef4fe1b284d4ed6a1b310f3dcef20c91
|
| |
|
|
|
|
| |
Also change LoaderManager to an interface.
Change-Id: Ife6d123e56cc6f63b6fe902afac35b2673761e60
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Activity now propagates loaders across instances when retaining
state. Adjusted APIs to make it better for apps to deal with this.
Change-Id: I8a6448cff1132e66207f9223eb29ccfc0decf2ca
|
| |
|
|
| |
Change-Id: I60185df6150d13d704a28933bc919527da173307
|
|
|
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
|