summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace usages of deprecated Resources.getColor() and getColorStateList()Alan Viverette2015-03-181-1/+1
| | | | Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
* Remove unused imports in frameworks/base.John Spurlock2015-02-282-4/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Move Documents action bar update even later.Jeff Sharkey2014-11-241-1/+1
| | | | | | | | | | | | At some point Activity started restoring the Toolbar/ActionBar title during onPostCreate(), which would clobber some of the setup we just finished doing. To fix, move our update to be even later in the restore lifecycle. Also fix grid item widths for small screen devices. Bug: 17428127 Change-Id: I258121b6a6eec5924f92b02290a67d3ae7dd9cf6
* Recent directories can't show file size.Jeff Sharkey2014-10-241-2/+4
| | | | | | | Don't show the toggle to the user, which can avoid crashing. Bug: 17942524 Change-Id: Iaedd61b7c69e14b57508cb9865d1e0124ca2e505
* DocumentsUI: Add content description for nav.Jeff Sharkey2014-10-131-0/+2
| | | | | Bug: 17922955 Change-Id: I44c0107d8dd03aab36da55deeb864e328b492124
* Manage mode shouldn't block for other providers.Jeff Sharkey2014-09-101-3/+6
| | | | | | | | | | | | When loading DocumentsUI in management mode (for Downloads), we normally focus on a single authority and let the other providers keep loading async. However, when one of the providers kicks a change notification, we end up blocking the main thread. Simple fix is to move the blocking into the AsyncTask. Bug: 17452691 Change-Id: Ie5212ad825b7df719690b29941c9ae9ba2cabe4b
* Final pass at Material DocumentsUI.Jeff Sharkey2014-08-295-32/+37
| | | | | | | | | Now with treatment for disabled and selected grid items. Inverts text and icons in selected drawer items. Follows upstream color changes to accent color. Disables some verbose logging. Bug: 15836082, 17281688 Change-Id: I97a1c055a2f1a537388a8f5669147618e9698870
* Make sure we're obtaining themed drawables correctlyAlan Viverette2014-08-143-19/+14
| | | | Change-Id: I446a3492f7bf5a897c5d698e61327af4b7840d85
* Move DocumentsUI settings into overflow menu.Jeff Sharkey2014-08-084-54/+58
| | | | | | | Also use different strings based on device type to make clearer. Bug: 13437894 Change-Id: I4053780de2c7197fb45cc53aee7659e9d0d75c0a
* Separate MIME icons for some office formats.Jeff Sharkey2014-08-081-10/+19
| | | | | Bug: 12548097 Change-Id: I11808854e0a4fae2636a04f75599e022b4a8440f
* More material updates to DocumentsUI.Jeff Sharkey2014-08-085-39/+49
| | | | | | | | All assets cut as alpha variants so we apply desired tinting at runtime. Small script to automatically generate XML resources. Bug: 15836082, 16658537 Change-Id: I803b3f0bf6f121194a5445fd1c6600fabaf28f60
* Use system collator for display names.Jeff Sharkey2014-08-062-12/+37
| | | | | | | | Continue sorting directory names first, but use system collator in case-insensitive ordering. Bug: 13545569 Change-Id: I24b314c9ef42f397bc96f474d9593bdefc0061d1
* Light icons for DocumentsUI.Jeff Sharkey2014-07-304-3/+27
| | | | | | | | In some cases we want to show light variants. Also tweak drawer sizes and grid padding. Bug: 15836082 Change-Id: Ic6459ff0533a7d346c03db5d7deb3d6da42e7649
* Latest DocumentsUI material asset drop.Jeff Sharkey2014-07-291-0/+2
| | | | | Bug: 15836082 Change-Id: Ifdd8a42a963071f1c958d56b3f835228f257cf9a
* More DocumentsUI material iteration.Jeff Sharkey2014-07-293-118/+90
| | | | | | | | | | | | | | Move to using Toolbar for all actions. Drawer contains its own Toolbar with separate title, and hamburger is always visible. Change drawer items to match spec. Switching to Toolbar allows us to remove nasty dialog-on-tablet hacks, yay! This also means we can finally get real IME resizing support. Move to using elevation for all shadows; this removes more nasty hacks around drawing directory shadows. Bug: 15836082 Change-Id: Iba70b898f385a7debd8aabfc98ff39d20bca860d
* First pass at Materializing DocumentsUI!Jeff Sharkey2014-07-286-36/+45
| | | | | | | | | | | | | | | Initial Material asset drop, which still needs some tweaking. Moved back to framework list item selectors, giving us ripples. Using accent color overlay for activated items. Align all items to new Material grid, including insetting list divider and resizing list items on wide screens. Fix obscure RTL drawing bug. Still lots of work left. Bug: 15836082 Change-Id: I729cc7dcb0271ee62b55d1e036fc28427fc0dd3d
* Refactor directory API to "opening document tree."Jeff Sharkey2014-06-093-23/+25
| | | | | | | | | Cleans up API so it consistently refers to opening or working with a subtree of documents. Also separates isChildDocument() support from the concept of directory tree selection. Bug: 15429194 Change-Id: Ice66a751ff4bd0cc4d34c44c5da13a0dc4186dc9
* am ddba067f: am f521ee6f: am e3e2c471: Merge "Set ActionMode title to the ↵Jeff Sharkey2014-05-101-0/+2
|\ | | | | | | | | | | | | number of selected files" * commit 'ddba067f0fa1560ce3e1aff58d512824ac2e2d7d': Set ActionMode title to the number of selected files
| * am e3e2c471: Merge "Set ActionMode title to the number of selected files"Jeff Sharkey2014-05-101-0/+2
| |\ | | | | | | | | | | | | * commit 'e3e2c471b2504335e99ed15975c3c5c9dfbf2795': Set ActionMode title to the number of selected files
| | * Set ActionMode title to the number of selected filesStefan Wysocki2014-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | After change of orientation ActionMode is recreated without previously set title. It needs to be updated in onCreateActionMode callback. Change-Id: If5f36e8ad6d1b5cf04ed242611fd037969d73517
* | | Add directory selection to DocumentsProvider.Jeff Sharkey2014-04-224-276/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new ACTION_PICK_DIRECTORY that allows users to grant access to an entire document subtree. Instead of requiring grants for each individual document, this leverages new prefix URI permission grants by defining new "via"-style URIs: content://com.example/via/12/document/24/ This references document 24 by using a prefix grant given for document 12. Internally, we use isChildDocument() to enforce that 24 is actually a descendant (child, grandchild, etc) of 12. Since this is an optional API, providers indicate support with Root.FLAG_SUPPORTS_DIR_SELECTION. Extend DocumentsUI to support picking directories. Expose createDocument() API to work with returned directories. Offer to canonicalize via-style URIs into direct URIs, generating exact permission grants along the way. Override openAssetFile() to pass through CancellationSignal. Move testing code into ApiDemos. Bug: 10607375 Change-Id: Ifffc1cff878870f8152eb6ca0199c5d014b9cb07
* | | resolved conflicts for merge of e0b14ea7 to masterKenny Root2013-12-132-5/+5
|\ \ \ | |/ / | | | | | | Change-Id: Ie018d3e2eba1eb2d655c153880e1951b68c2bd51
| * | am 37c69fdd: Merge "Use java.util.Objects instead on internal API"Kenny Root2013-12-132-5/+5
| |\ \ | | |/ | | | | | | | | | * commit '37c69fdd826f3973966430adc1abfbefc19bc16e': Use java.util.Objects instead on internal API
| | * Use java.util.Objects instead on internal APIKenny Root2013-12-132-5/+5
| | | | | | | | | | | | | | | | | | | | | Not needed since java.util.Objects implements all the needed functionality. Change-Id: Icd31d49a9801d1705427f028e9ac927d58e7d34c
* | | Remove unused imports from frameworks/base.John Spurlock2013-11-203-4/+0
|/ / | | | | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* | Mask OOBE when filtering recent documents.Jeff Sharkey2013-11-182-1/+5
|/ | | | | | | | | | There is a data ownership issue related to recent documents Cursors, and the loader and UI threads can end up traversing the same Cursor at runtime. This change masks OOBE crashes caused by this race until we have time to fix cleanly. Bug: 11736668 Change-Id: I2039a5edcf341fcaedacc2f08bde96fc5a271782
* Suppress OperationCanceledException logging.Jeff Sharkey2013-10-291-1/+4
| | | | | | | | These exceptions are normal when an app has cancelled an outstanding thumbnail request. Bug: 11385378 Change-Id: I8aed5721b447cda5baf447ac7afd627aa1062863
* Guard against missing document columns.Jeff Sharkey2013-10-292-11/+11
| | | | | | | | When filtering and sorting, guard against missing columns to avoid crashing entire app. Bug: 11377065 Change-Id: I04f035c918d743bcc84592f05e3ef9ad0ebfadce
* Use inotify to update DocumentsUI.Jeff Sharkey2013-10-251-4/+1
| | | | | | | | | | | | | While user is actively looking at a directory, subscribe to inotify events and notify of content changes to trigger requeries. Reference count the observers, since multiple cursors are regularly open during requeries. Fix leaking cursors on activity rotation; crazy loader ID generation is no longer needed. Bug: 10999396 Change-Id: Iddeb08a056fee80c93df8499874705bcd213a1e2
* Extra to always show advanced devices.Jeff Sharkey2013-10-252-2/+8
| | | | | | | | Also always lower-case extension to extract MIME type correctly, we may want to fix in MimeUtils at some point. Bug: 11354402 Change-Id: I77d0c06a663cd0c4320c41553ff1980b6f9a7778
* Remove persisted stacks when app removed/cleared.Jeff Sharkey2013-10-242-1/+178
| | | | | | | | When an app's data is cleared, or it's uninstalled, remove any persisted stacks. Bug: 11355566 Change-Id: I4e5cf0ec710591ad62f1ad52c2e358616631af41
* Long-press on GET_CONTENT app shows its details.Jeff Sharkey2013-10-231-0/+32
| | | | | | | Matches ResolverActivity behavior. Bug: 11319259 Change-Id: Id7f2a73b225e4cfd9bdef3b1c7cecb77d9bd2b90
* Show spinner while waiting for mutations.Jeff Sharkey2013-10-233-1/+30
| | | | | | | | When mutation operations are waiting for a storage backend, show a spinner in place of the save button. Bug: 11333249 Change-Id: I2b620b4532ad977a2b60d4bdc5caa55f89021456
* Update roots when data cleared, refresh UI.Jeff Sharkey2013-10-233-2/+11
| | | | | | | | Data cleared usually means accounts went away, so kick off roots refresh. Also update any visible UI after a refresh finishes. Bug: 10899793 Change-Id: Id68c80b5e635e358cfd75f4961ce13cd1c7c5f82
* Treat document thumbnails as preemptable.Jeff Sharkey2013-10-232-6/+58
| | | | | | | | When a more important request comes along, preempt all outstanding thumbnail requests. Bug: 11317901 Change-Id: I164fc8d804bb9c471e6da3f8127228043b3ca482
* Support overriding calling package in Documents.Jeff Sharkey2013-10-091-3/+8
| | | | | | | | | 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
* Drop <meta-data> support for DocumentsProviders.Jeff Sharkey2013-10-091-10/+0
| | | | | | | | Prebuilts have finished migrating to new <intent-filter> based approach. Also update isDocumentUri() to match new definition. Bug: 11109484 Change-Id: Ib95e2c3f5a9ff70b8d5e411f68ad49d1990dae8c
* Grab Activity reference before leaving fragment.Jeff Sharkey2013-10-081-12/+12
| | | | | | | | | 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
* Merge "Add <intent-filter> support to <provider>." into klp-devJeff Sharkey2013-10-071-33/+48
|\
| * Add <intent-filter> support to <provider>.Jeff Sharkey2013-10-071-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "When launched into empty recents, show drawer." into klp-devJeff Sharkey2013-10-073-3/+16
|\ \ | |/ |/|
| * When launched into empty recents, show drawer.Jeff Sharkey2013-10-073-3/+16
| | | | | | | | | | | | | | | | | | 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
* | Custom pressed states, fixed column sizes.Jeff Sharkey2013-10-041-0/+4
|/ | | | | | | | | | 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
* Isolate calls to each remote DocumentsProvider.Jeff Sharkey2013-10-026-52/+147
| | | | | | | | | | | | | | | | | | | | 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
* Fix animations, padding in RTL mode.Jeff Sharkey2013-10-011-1/+1
| | | | | | | | | | 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
* Detect wedged ContentProviders, treat as ANR.Jeff Sharkey2013-10-018-55/+143
| | | | | | | | | | | | | 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
* New roots UX, async, performance, docs.Jeff Sharkey2013-09-2713-193/+408
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Make directories always enabled, for realz.Jeff Sharkey2013-09-261-5/+5
| | | | | Bug: 10946731 Change-Id: I3eb132c53e47f31d1d1723ed2262823b54b1fce0
* Tighten flags enforcement, API to test Uris.Jeff Sharkey2013-09-261-0/+7
| | | | | | | | 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
* Directories are always enabled; update assets.Jeff Sharkey2013-09-261-20/+25
| | | | | | | | 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