171 Commits

Author SHA1 Message Date
Jeff Sharkey
75b96875be am 3a27585d: am a9a6007c: Merge "Treat document thumbnails as preemptable." into klp-dev
* commit '3a27585df77997b5ea01a086b739ee6866000444':
  Treat document thumbnails as preemptable.
2013-10-23 11:13:01 -07:00
Jeff Sharkey
b3d42635aa Treat document thumbnails as preemptable.
When a more important request comes along, preempt all outstanding
thumbnail requests.

Bug: 11317901
Change-Id: I164fc8d804bb9c471e6da3f8127228043b3ca482
2013-10-23 09:23:13 -07:00
Craig Mautner
73b25d6ac0 am bd0a4143: am b3a08be2: Merge "Use dialog animations for dialog style." into klp-dev
* commit 'bd0a4143302834c3d1a1343e82f6d4da7888308e':
  Use dialog animations for dialog style.
2013-10-14 19:00:47 -07:00
Craig Mautner
d2d76ac6b9 Use dialog animations for dialog style.
Using activity animations on non-fullscreen activities that sit over
a wallpaper activity cause the exiting activity to show up underneath
the next activity. If the next activity happens to be a wallpaper
activity then this will be janky as the exiting activity will go from
on top of the incoming activity to on top of the wallpaper as it
animates away.

Fixes bug 11200253.

Change-Id: I7e81c50cfe7ae106da2d62f5866f43fc046181c5
2013-10-14 15:52:58 -07:00
Baligh Uddin
5ab664c159 Import translations. DO NOT MERGE
Change-Id: I4bdcff01e1271ee4a7695a9bb646cd84530f654e
Auto-generated-cl: translation import
2013-10-10 19:16:51 -07:00
Jeff Sharkey
467b30bb2b am d0da14a9: am aa841672: Merge "Support overriding calling package in Documents." into klp-dev
* commit 'd0da14a92fb63399a1d18ea50f5792bece0ec83b':
  Support overriding calling package in Documents.
2013-10-09 14:04:37 -07:00
Jeff Sharkey
530fcce7ca am 4df901a4: am 7cd3e905: Merge "Drop <meta-data> support for DocumentsProviders." into klp-dev
* commit '4df901a40c5529aee9f5ef4d3b81fdf090b3d57a':
  Drop <meta-data> support for DocumentsProviders.
2013-10-09 14:04:34 -07:00
Jeff Sharkey
15be83612c Support overriding calling package in Documents.
Calling package is only used to pick the stack to restore, not for
security purposes.  This lets other system tools (like Printing)
indicate the real caller.

Bug: 11149540
Change-Id: I155e32577eaeda7dfcb80a7d84ac3b54f281590a
2013-10-09 13:52:26 -07:00
Jeff Sharkey
d2e1e810a7 Drop <meta-data> support for DocumentsProviders.
Prebuilts have finished migrating to new <intent-filter> based
approach.  Also update isDocumentUri() to match new definition.

Bug: 11109484
Change-Id: Ib95e2c3f5a9ff70b8d5e411f68ad49d1990dae8c
2013-10-09 13:31:13 -07:00
Jeff Sharkey
e6ea79b4b1 am 63595859: am e6d419de: Merge "Grab Activity reference before leaving fragment." into klp-dev
* commit '6359585916905f17537e6db5d0cb9eb2dbac00f2':
  Grab Activity reference before leaving fragment.
2013-10-09 00:30:24 -07:00
Jeff Sharkey
78b1370308 Grab Activity reference before leaving fragment.
When creating a new directory, we spawn an AsyncTask and finish the
fragment.  This change keeps an Activity reference to report the
result back to.

Bug: 11137561
Change-Id: Icfccc5e50e8f53a50dced589e1564d64457e0ed0
2013-10-08 17:11:49 -07:00
Jeff Sharkey
9d1383c61c am 5e02e0a9: am bcc77b50: Merge "Add <intent-filter> support to <provider>." into klp-dev
* commit '5e02e0a9e1e075e3d451d929b0a67bf280c432ed':
  Add <intent-filter> support to <provider>.
2013-10-07 15:12:16 -07:00
Jeff Sharkey
f76843d520 am 73c3c65b: am 567fdd9f: Merge "When launched into empty recents, show drawer." into klp-dev
* commit '73c3c65b1bb05754c688a76a1dbc79c0120c0915':
  When launched into empty recents, show drawer.
2013-10-07 15:12:12 -07:00
Jeff Sharkey
bcc77b502b Merge "Add <intent-filter> support to <provider>." into klp-dev 2013-10-07 21:41:45 +00:00
Jeff Sharkey
567fdd9fba Merge "When launched into empty recents, show drawer." into klp-dev 2013-10-07 21:36:25 +00:00
Jeff Sharkey
85f5f81320 Add <intent-filter> support to <provider>.
For the new documents work, we're only interested in the subset of
ContentProviders that actually implement DocumentsContract.  Instead
of returning all providers, add <intent-filter> support to make it
easier to limit the set of returned ProviderInfo.

Define a well-known action for DocumentsProviders, and start using it
when querying for roots.  Continue supporting the old <meta-data>
approach until all apps have been updated.

Bug: 8599233
Change-Id: I05f049bba21311f5421738002f99ee214447c909
2013-10-07 14:19:13 -07:00
Jeff Sharkey
a82c2e24bc When launched into empty recents, show drawer.
Pull out drawer to give users more context about meaningful places
to navigate to.  Also fix bug where restored roots weren't being
highlighted.

Bug: 10852518
Change-Id: Id294f6923477ca4dc505c4b0a21a5bdf8b722cf4
2013-10-07 14:08:20 -07:00
Jeff Sharkey
ab5cbb7bb5 am 0e438c2a: am a27366ef: Merge "Ellipsize titles in middle, otherwise end." into klp-dev
* commit '0e438c2a1b4e2de34702ce8332b3853db703dbdb':
  Ellipsize titles in middle, otherwise end.
2013-10-07 13:21:21 -07:00
Jeff Sharkey
a27366efc4 Merge "Ellipsize titles in middle, otherwise end." into klp-dev 2013-10-07 20:17:54 +00:00
Jeff Sharkey
2c4b99fbe6 Ellipsize titles in middle, otherwise end.
Long document titles can include distinguishing details at the end
of the title, so ellipsize in the middle.  All other details ellipsize
at the end.

Bug: 11081420
Change-Id: I2c266ebc594d2ad383033b435acb8adb5fb823bc
2013-10-07 11:39:07 -07:00
Baligh Uddin
0ea4be04a0 Import translations. DO NOT MERGE
Change-Id: I4365c56d96fc1e1aa97e05d154ce23441c5b1431
Auto-generated-cl: translation import
2013-10-07 10:43:11 -07:00
Baligh Uddin
15800b793b Merge "Import translations. DO NOT MERGE" into klp-dev 2013-10-04 22:53:07 +00:00
Jeff Sharkey
402401e666 am 2dcba613: am 5b491d63: Merge "Custom pressed states, fixed column sizes." into klp-dev
* commit '2dcba613a736b1c0ba2f9c18c32f171f7bbb1a23':
  Custom pressed states, fixed column sizes.
2013-10-04 15:10:16 -07:00
Jeff Sharkey
2dcba613a7 am 5b491d63: Merge "Custom pressed states, fixed column sizes." into klp-dev
* commit '5b491d630b6628a3558cb1135ac1bc242eab3381':
  Custom pressed states, fixed column sizes.
2013-10-04 15:07:13 -07:00
Jeff Sharkey
ca25db0cb3 Custom pressed states, fixed column sizes.
Use custom pressed state assets.  Use fixed column sizes to prevent
truncating of long dates on small screens.

Also tear down any active CAB when switching fragments.

Bug: 11032418, 11028212
Change-Id: I2bf3dc3f693319b4b55cc901ed460f60faceba35
2013-10-04 14:48:08 -07:00
Baligh Uddin
dfe1303d93 Import translations. DO NOT MERGE
Change-Id: Id6fb45a4be5a4e32cd673127862ff413526dcc7b
Auto-generated-cl: translation import
2013-10-04 12:23:39 -07:00
Baligh Uddin
8e68d5fceb Merge "Import translations. DO NOT MERGE" into klp-dev 2013-10-03 03:41:47 +00:00
Baligh Uddin
e2aea6f859 Import translations. DO NOT MERGE
Change-Id: I6630568359b173cd95d9b76743f682c6e92c7371
Auto-generated-cl: translation import
2013-10-02 12:03:19 -07:00
Jeff Sharkey
21d8e96d84 am ef4c3790: am 27d3c0fe: Merge "Isolate calls to each remote DocumentsProvider." into klp-dev
* commit 'ef4c3790e52beab467359f6b5125b66fbe1993ef':
  Isolate calls to each remote DocumentsProvider.
2013-10-02 10:11:18 -07:00
Jeff Sharkey
ef4c3790e5 am 27d3c0fe: Merge "Isolate calls to each remote DocumentsProvider." into klp-dev
* commit '27d3c0fe3775c85c2e25eb84089280cb217799c8':
  Isolate calls to each remote DocumentsProvider.
2013-10-02 09:55:21 -07:00
Jeff Sharkey
6d7de848d7 am 1fc9eb78: am 16326f70: Merge "Fix animations, padding in RTL mode." into klp-dev
* commit '1fc9eb78ab7009250be52a79de5acab108a37312':
  Fix animations, padding in RTL mode.
2013-10-02 09:37:07 -07:00
Jeff Sharkey
7f60e70e81 am 666b998b: am 364fc14f: Merge "Detect wedged ContentProviders, treat as ANR." into klp-dev
* commit '666b998b67fe7bb6fc11dd6d683a18b5690afd39':
  Detect wedged ContentProviders, treat as ANR.
2013-10-02 09:35:14 -07:00
Jeff Sharkey
d01571e6d4 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
2013-10-02 08:54:02 -07:00
Jeff Sharkey
1fc9eb78ab am 16326f70: Merge "Fix animations, padding in RTL mode." into klp-dev
* commit '16326f7085ebb05e4229d96c6e539eb9ecb2d3de':
  Fix animations, padding in RTL mode.
2013-10-01 18:46:08 -07:00
Jeff Sharkey
ee3e1603fd Fix animations, padding in RTL mode.
Show directory animations coming in from left-side when in RTL
language.  Also fix NinePatchDrawable to correctly mirror its padding
when auto-mirrored, and fix InsetDrawable to propagate the layout
direction to the wrapped Drawable.

Bug: 10987190, 11030793
Change-Id: I1213802a07d0c4ced93438df1e6ddf5aed3df677
2013-10-01 16:03:00 -07:00
Jeff Sharkey
666b998b67 am 364fc14f: Merge "Detect wedged ContentProviders, treat as ANR." into klp-dev
* commit '364fc14f544712a2d32cc0f32e84dfe4127376a6':
  Detect wedged ContentProviders, treat as ANR.
2013-10-01 10:31:47 -07:00
Jeff Sharkey
7aa7601c09 Detect wedged ContentProviders, treat as ANR.
All ContentProvider calls are currently blocking, making it hard for
an app to recover when a remote provider is wedged.  This change adds
hidden support to ContentProviderClient to timeout remote calls,
treating them as ANRs.  This behavior is disabled by default.

Update DocumentsUI to use a 20 second timeout whenever interacting
with a storage provider.

Bug: 10993301, 10819461, 10852518
Change-Id: I10fa3c425c6a7225fff9cb7a0a07659028230cd3
2013-10-01 09:50:41 -07:00
Jeff Sharkey
a2c42861a1 am cc637d9a: Merge "New roots UX, async, performance, docs." into klp-dev
* commit 'cc637d9ae5920ac2f685090f595dc1e1643d71cc':
  New roots UX, async, performance, docs.
2013-09-30 17:09:48 -07:00
Jeff Sharkey
fa9c7ec0ee am 10d65592: Merge "Make directories always enabled, for realz." into klp-dev
* commit '10d655927c5c10af0561ecc0961f9a9fcbad89f0':
  Make directories always enabled, for realz.
2013-09-30 17:07:17 -07:00
Baligh Uddin
bb1abd1ce5 Import translations. DO NOT MERGE
Change-Id: Ibf90ac2ca945f9a5e803f3bbfbb5caa69b08a4ce
Auto-generated-cl: translation import
2013-09-30 10:20:46 -07:00
Jeff Sharkey
cc637d9ae5 Merge "New roots UX, async, performance, docs." into klp-dev 2013-09-28 00:27:29 +00:00
Jeff Sharkey
6efba22ce5 New roots UX, async, performance, docs.
Yet another iteration from UX on how roots should be ordered.  Since
we no longer categorize by type, remove from public API.  Updated
asset drop with new dividers.

Update public API docs to be explicit about required columns.  Hide
flags and columns that aren't required for third-party apps.

Move remainder of potentially blocking work to AsyncTasks, including
creating directories, picked root resolution, and creation of new
documents once picked.

Improve performance of layouts by removing baseline alignment and
reduce hierarchy depth.  Set alpha on ImageViews directly to avoid
offscreen rendering hit.

Limit returned recents to 45 days.  Show load in recents when still
waiting for backends.  Show empty message when no recents stacks to
create from.  Use unique key when saving recent stacks.

Bug: 10941423, 10819454, 10964412, 10960718
Change-Id: I08cf589dcda7e203acf67928f4d30322ae36ee94
2013-09-27 17:13:13 -07:00
Jeff Sharkey
10d655927c Merge "Make directories always enabled, for realz." into klp-dev 2013-09-27 02:55:05 +00:00
Jeff Sharkey
3d52dc9c3a Make directories always enabled, for realz.
Bug: 10946731
Change-Id: I3eb132c53e47f31d1d1723ed2262823b54b1fce0
2013-09-26 19:42:52 -07:00
Jeff Sharkey
66ee877f5d am 8c6c0419: Merge "Tighten flags enforcement, API to test Uris." into klp-dev
* commit '8c6c04197e58be6f3e46ba6a38f5d16e4fb091fa':
  Tighten flags enforcement, API to test Uris.
2013-09-26 13:37:21 -07:00
Jeff Sharkey
8c6c04197e Merge "Tighten flags enforcement, API to test Uris." into klp-dev 2013-09-26 20:33:29 +00:00
Jeff Sharkey
ee2f7df9ee Tighten flags enforcement, API to test Uris.
Check and throw if callers request invalid grant flags.  Add API to
test if a Uri is backend by a DocumentsProvider.

Bug: 10919391, 10935608
Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
2013-09-26 13:14:45 -07:00
Jeff Sharkey
cd30bb6c71 am bb77d99c: Merge "Directories are always enabled; update assets." into klp-dev
* commit 'bb77d99c257bc4a3371548c4bc8ba7088fa76005':
  Directories are always enabled; update assets.
2013-09-26 11:00:48 -07:00
Jeff Sharkey
bb77d99c25 Merge "Directories are always enabled; update assets." into klp-dev 2013-09-26 17:58:41 +00:00
Jeff Sharkey
2a030b05a9 Directories are always enabled; update assets.
Fix bug where item enabled state depended on FLAG_SUPPORTS_WRITE;
directories are now always enabled.  Also unifies enabled testing.

Bug: 10903210, 10946731
Change-Id: I241533d273dfe4a2146bb322a8bd93066bf4ef55
2013-09-26 10:54:19 -07:00