There are a handful of core system services that collect data from
third-party ContentProviders by spinning them up and then caching the
results locally in memory. However, if those apps are killed due to
low-memory pressure, they lose that cached data and have to collect
it again from scratch. It's impossible for those apps to maintain a
correct cache when not running, since they'll miss out on Uri change
notifications.
To work around this, this change introducing a narrowly-scoped
caching mechanism that maps from Uris to Bundles. The cache is
isolated per-user and per-calling-package, and internally it's
optimized to keep the Uri notification flow as fast as possible.
Each Bundle is invalidated whenever a notification event for a Uri
key is sent, or when the package hosting the provider is changed.
This change also wires up DocumentsUI to use this new mechanism,
which improves cold-start performance from 3300ms to 1800ms. The
more DocumentsProviders a system has, the more pronounced this
benefit is. Use BOOT_COMPLETED to build the cache at boot.
Add more permission docs, send a missing extra in DATA_CLEARED
broadcast.
Bug: 18406595
Change-Id: If3eae14bb3c69a8b83a65f530e081efc3b34d4bc
This guarantees the retry/delete support in the downloads
trampoline can do its thing.
Allow APKs not in downloads to go directly to pakcage
manager via VIEW intent.
Add test coverage for retry dialog.
Bug: 27539337
Change-Id: I75c5db8915e24a7648c7990136d39ed86d407637
Delete "MANAGE_ROOT" activity.
Add intent filter for "BROWSE_DOWNLOADS".
Open by default on Downloads directory.
Bug: 27563427
Change-Id: I1f85dc17a0bc94b439a272847e4ab3bb347ead23
Sometimes providers may refuse to do a provider-side copy/move
even though the documents had the SUPPORTS_COPY/MOVE flags set.
This is because optimized copy/move may be only supported within
the same root.
Since there is no easy way to check if documents are on the same
roots from DocumentsUI, as well as whether the provider can actually
copy/move efficiently between different roots, we should tolerate the
failure and do a fallback to byte-by-byte operation.
Bug: 27436368
Change-Id: Ia1a0fbdba26c06b2151afc25d8513c01d60d31db
This CL replaces List<String> with String[], which prevents from
calling get() and set() multiple times within a loop, in favor of
System.arraycopy().
Scanning a directory with 10K files went down from 1200ms to 450ms.
Bug: 27286016
Change-Id: Id533480934f739905a845cb0e13fe862e361b3db
Basically push them through downloads.ui TrampolineActivity
to get origin url and referer and other security bits
added before handing off to package manager.
Bug: 24676446
Change-Id: Id40787ada6ace424c4e5e4bfeedc0a8005b7a734
And permit users to peek into zip files stored in Downloads.
But dont' show active downloads in pickers.
Bug: 26759955
Change-Id: Ib425a79488e953c981ddadeb01a37f6e1d8a8285
For instrumentation test apks, it should not statically include
Java libraries that are already present in the app module being
instrumented. They only need to be on classpath during compile
time.
Bug: 26689464
Change-Id: I68d4be95e30ae70bbab23d016a87eb085c10cc50