summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src/com
Commit message (Collapse)AuthorAgeFilesLines
* Fix NPE in DocumentsUI when rotate UI before format as internalScott Mertz2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the device is rotated, the action bar may not have already been installed (because such installation is done in onCreateOptionsMenu). Protect against this case. 1.Settings->Storage and USB->SD Card Settings->turn the handset to landscape mode->Format as internal storage. 2.Move data to new storage->Tap Move later 01-03 14:06:34.156 7709 7709 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.android.documentsui.DocumentsToolBar.hasExpandedActionView()' on a null object reference 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at com.android.documentsui.BaseActivity$SearchManager.cancelSearch(BaseActivity.java:758) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at com.android.documentsui.DocumentsActivity.onBackPressed(DocumentsActivity.java:518) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at com.android.documentsui.DirectoryFragment$4$1.run(DirectoryFragment.java:315) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5461) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 01-03 14:06:34.156 7709 7709 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) FEIJ-1160 Change-Id: I7269ff5b9c189fd1fa4d0716b2d4cbc837349dc5
* DocumentsUI : Hide advanced menu option when in forced modeDanesh M2016-06-141-1/+2
| | | | | | | | | When in EXTRA_SHOW_ADVANCED is set, don't show the menu option to toggle it since it is a no-op FEIJ-1079 Change-Id: I0d2ea026736cb7131f451d39e2e662d0c2ae436f
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-073-4/+39
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into cm-13.0 Android 6.0.1 release 3 Change-Id: I59b9e5a943e0860d43bcfb36ee0e8b8b072412ea
| * Block directory selection in openable modes.Jeff Sharkey2015-11-091-1/+16
| | | | | | | | | | | | | | | | When picking documents to return to apps requesting CATEGORY_OPENABLE we can't let the user select directories. Bug: 25455200 Change-Id: I8076883ee5b019eab4d2adb841952865f21e413e
| * Add locking when mutating RecentTasks.Jeff Sharkey2015-10-191-2/+12
| | | | | | | | | | | | | | | | Otherwise there is a really rare race condition where we try tearing down the tasks while we're still setting them up. Bug: 25078914 Change-Id: Icf89241f9abec3fadc8606cfb4fbc029bbe91515
| * Hold wake-lock during copy operations.Jeff Sharkey2015-10-021-1/+11
| | | | | | | | | | | | | | | | If the CPU goes to sleep during the copy, certain devices will collapse the USB OTG power domain, which can cause user data loss. Bug: 24574575 Change-Id: I8e26caac8784490d2dee324b38e6085cd55eb8bb
* | DocumentsUI: Fix NullPointerException in DocumentInfoShufeng Hou2015-10-261-2/+4
|/ | | | | | | Add null pointer check for cursor to avoid crash during stability test. Change-Id: Ia715345365468f1cb10850d21386c9117885fb23 CRs-Fixed: 927937
* Only send EXTRA_STACK for private intent.Jeff Sharkey2015-07-151-4/+5
| | | | | | | | Since it's a private Parcelable class, we can't send it to other third-party apps, since they won't know how to unpack it. Bug: 22255387 Change-Id: Ie2ea6cf72b733bd122eb3581a5df295cec608425
* If user ejects a storage from details, take user to...Makoto Onuki2015-07-012-0/+26
| | | | | | | | | | | | | | | | | | | | ... the storage list view 1. Change to ExternalStorageProvider When available volumes have changed, it now notifies on "content://com.android.externalstorage.documents" rather than on "content://com.android.externalstorage.documents/root/", because it'll also affect "content://com.android.externalstorage.documents/document/*/children". 2. Change to DocumentUI - DirectoryLoader now won't crash when a provider returns null. - DirectoryFragment now closes itself (i.e. emulate a back press) when a load failed. - It now correctly reloads contents when a volume is ejected thanks to 1. Bug 21472170 Change-Id: Icf4bbc2ebb9067313dbbb67083cd4115b0a75c58
* Remove default activity title to prevent talkback from...Makoto Onuki2015-06-231-0/+3
| | | | | | | | | | | reading the wrong title. We get a title from DocumentProvider with an async task, and by the time we get it, it's *usually* too late and talkback end up reading the default title. Bug 20041072 Change-Id: I7686fe4ae4c157ebfc07bd8b895c4cfdf99c057a
* Merge "Remove the action bar icon when there is no drawer enabled." into mnc-devTomasz Mikolajewski2015-06-181-10/+7
|\
| * Remove the action bar icon when there is no drawer enabled.Tomasz Mikolajewski2015-06-121-10/+7
| | | | | | | | | | | | | | | | | | Keep the hamburger menu though if the drawer is visible and unlocked. TEST=Tested manually on both tablet and phone form factors. BUG=18685509 Change-Id: Ie6f8d7064da99d2dc34315ccb92ab4db6ee321b6
* | Allow to customize title of the dialog.Tomasz Mikolajewski2015-06-171-7/+12
| | | | | | | | | | | | | | | | TEST=adb shell am start -a android.intent.action.OPEN_DOCUMENT -e android.intent.extra.TITLE 'Upload!' -t "text/plain" BUG=19150996 Change-Id: Ibded6cfaa2de3698c5eada154efbee2b323464d4
* | Finish when browsed root goes away.Jeff Sharkey2015-06-161-1/+16
| | | | | | | | | | | | | | | | If we're browsing a specific root, and that root went away, typically due to formatting. Bug: 21831184 Change-Id: Ie07607a81e32a7d82c88ad382658a471d47b905d
* | Merge "Selected count string needs plurals." into mnc-devJeff Sharkey2015-06-111-4/+3
|\ \
| * | Selected count string needs plurals.Jeff Sharkey2015-06-111-4/+3
| |/ | | | | | | | | Bug: 21717427 Change-Id: Ie0db8ac30244b022ca5838969fb085230bfc4499
* | Update visibility of the stack dropdown list after the search view is collapsed.Daichi Hirono2015-06-113-7/+106
|/ | | | | | | | | | | | Previously we hid the stack dropdown list just before the action bar is collapsed. Then the dropdown list gets back to be visible when the action bar is collapsed. The CL updates visibility of the stack dropdown list just after the action bar is collapsed. BUG=20945584 Change-Id: Iaf5055bce101f8134accd311829e50f441ddc98b
* Merge "Enable apps to exclude their own roots from the DocumentsUI roots ↵Ben Kwa2015-06-104-4/+49
|\ | | | | | | list." into mnc-dev
| * Enable apps to exclude their own roots from the DocumentsUI roots list.Ben Kwa2015-06-104-4/+49
| | | | | | | | | | | | | | | | | | | | - Add DocumentsContract.EXTRA_EXCLUDE_SELF (boolean extra) - Add code to DocumentsActivity to cache the providers of the calling app if EXTRA_EXCLUDE_SELF is set on incoming Intents. - Add code to RootsCache to exclude roots from the calling app. - Add code to allow only system apps to use EXTRA_PACKAGE_NAME. Change-Id: Ia7cc2a1a297676c7b26f6e583042a4607d8c9a4e
* | Ensure that the copy notification is always cancelable.Ben Kwa2015-05-271-5/+5
|/ | | | | | | | | | If the CopyService dies or is stopped for whatever reason, the cached "current" job ID will go to null. In that case, the cancel intent will be ignored, and the copy notification can never be dismissed. Adding a null check to the handleCancel method of CopyService fixes this. BUG=21365043 Change-Id: I0615328f6033a313fec79f8b63291c7f7373ea0f
* [mnc-dev] Hide list/grid menu items for copy dest action...in mnc-dev!Steve McKay2015-05-211-1/+3
| | | | | | BUG=21259006 Change-Id: Ic31dfa1a1cffa4340769c08db3e3cb3fb46e31d5 (cherry picked from commit e04e02d027b731448d68995a202c8867c4985fa3)
* DocumentUI: Plish the design of footer bottons.Daichi Hirono2015-05-182-31/+38
| | | | | | | | | * Remove the directory name from "pick" button. * Allign buttons at right. * Fix bug that the pick button turns to be hidden after screen rotation. BUG=20285152 Change-Id: I909d52f341bf67c5627431a354a9b0ccec152a05
* Delete StandaloneActivity from M (DO NOT MERGE)Steve McKay2015-05-113-324/+14
| | | | | | | The activity is already disabled by default. Fix an issue where copy support error handling was attempting to invoke StandaloneActivity. Change-Id: If15c312a183cae1b2a84517e7f7b3123c11bd619
* Clean up error handling in CopyService.Ben Kwa2015-05-051-7/+5
| | | | Change-Id: I87b9f2c2cfddc222fbee64578b0a1349508a244f
* Cherry pick beefed-up error handling in the CopyService from master. DO NOT ↵Ben Kwa2015-05-041-10/+21
| | | | | | | | | | | | | MERGE Send copy errors to the destination provider. Big overhaul of tests to make them simpler. Test that errors during copying are detected and partial copies are cleaned up. Test that copying empty directories works properly. Change-Id: I3fe0e73bdc92c2b6f522857ca5631f6d03d5a666 (cherry picked from commit dae8c378d6c680ae9efa8e1202d9bc92fb0dfb11)
* Ensure sort menu is shown as needed.Steve McKay2015-05-043-42/+38
| | | | | | This also hoists common code for options menu setup into BaseActivity. Change-Id: Ie87b8188a6c142b2312c92dc0d0bd550f0b1e59f
* Merge "Update strings for the copy error dialog to match the latest specs."Tomasz Mikolajewski2015-04-231-2/+0
|\
| * Update strings for the copy error dialog to match the latest specs.Tomasz Mikolajewski2015-04-231-2/+0
| | | | | | | | Change-Id: I9adeff3e7e9435237b4b3337e4c687eec39b0335
* | Implement retrying copying in case of an error in DocumentsUI.Tomasz Mikolajewski2015-04-234-32/+54
|/ | | | Change-Id: I9ed1eb624aa30fb7e65d4d424ebd988dfc06d030
* DocumentsUI: Stop to override fixed size of dialog in CreateDirectoryDialog.Daichi Hirono2015-04-232-10/+5
| | | | | | | | | | | Previously CreateDirectoryDialog overrides fixed size defined in the application theme. As a result, the dialog is shown as vertically long. The CL specifies explicitly specifies the default theme for dialog when creating the dialog to stop override the application theme. BUG=20239384 Change-Id: I7227bd91705c32f5196b666bbe94ff32b5cb4af8
* Update activities to clear search term when a root that doesn't support ↵Steve McKay2015-04-223-26/+42
| | | | | | | | search is selected by the user. BUG=20495230 Change-Id: Iee2e2bd80dea6d368cad0911117e3759bdfe37d9
* Merge "Reduce code duplication between DocumentsActivity and ↵Steve McKay2015-04-228-1242/+753
|\ | | | | | | StandaloneActivity."
| * Reduce code duplication between DocumentsActivity and StandaloneActivity.Steve McKay2015-04-228-1242/+753
| | | | | | | | | | | | | | Ensure StandaloneActivity has toolbar management consistent w/ DocumentsActivity. Introduce a separate SearchManager class since there seemed to be a sufficient body of logic and state to warrant the separation. Change-Id: I87d9da40095c6de575b124005ca34a8c0b0b4b35
* | Disable copying from Recents.Ben Kwa2015-04-221-1/+2
|/ | | | | | | | | | | Recents view contains a whole bunch of content aggregated from potentially many different sources. Dealing with all these in a single copy operation can be complex, so for simplicity, copying from recents view is disabled. BUG=20487641 Change-Id: I6052e62ee0446da7741f13abfed97044e147dd7d
* DocumentsUI: Save source file list into BaseActivity.State.Daichi Hirono2015-04-202-4/+8
| | | | | | | | This is needed so that the activity does not lost the list on screen rotation. BUG=20283251 Change-Id: I8f971bab0a0ce2066fd5fea29b98b355cb948ea6
* Merge "Enable the copy feature."Jeff Sharkey2015-04-191-5/+1
|\
| * Enable the copy feature.Ben Kwa2015-04-161-5/+1
| | | | | | | | Change-Id: Ie0636895f2b2fe6550eb68042295daf76bbbd7fe
* | Merge "Fix cancellation of copy jobs."Ben Kwa2015-04-161-1/+2
|\ \
| * | Fix cancellation of copy jobs.Ben Kwa2015-04-161-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | Add FLAG_CANCEL_CURRENT to the pending intent for cancellation, to prevent reuse of previously created cancellation intents. Previously created intents have non-matching job IDs, which causes the cancellation intent to be ignored. BUG=20221969 Change-Id: Ie0afcc6af53a550b44bc4b2f3d48942cdb092a65
* | DocumentsUI: Hide pick button of copy destination picker for read only ↵Daichi Hirono2015-04-151-2/+3
|/ | | | | | | | directory. BUG=20238336 Change-Id: Ia2a0ef2889a2153d99c0f305deda151a04483173
* Merge "DocumentsUI: Use system cancel string resources."Daichi Hirono2015-04-151-1/+1
|\
| * DocumentsUI: Use system cancel string resources.Daichi Hirono2015-04-151-1/+1
| | | | | | | | | | | | BUG=None Change-Id: I989e28ad4729176d66b1b333f242470129d139fa
* | DocumentsUI: Move intent related constants to BaseActivity.DocumentsIntent.Daichi Hirono2015-04-153-14/+16
|/ | | | | BUG=None Change-Id: I81d367d5f8d727a5fa76bc22b2fe871ae441dbcf
* Merge "DocumentsUI: Filter out downloads root if the source documents ↵Daichi Hirono2015-04-154-0/+22
|\ | | | | | | include directory."
| * DocumentsUI: Filter out downloads root if the source documents include ↵Daichi Hirono2015-04-154-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | directory. This is the short term solution for the downloads root, which does not support directory creation. For the long term solution, we need to add a flag to Root model to check if the root support directory creation or not. BUG=20186663 Change-Id: I15c4795892f38e3f968776f732a6f2160ae775fc
* | Merge "Add an initial version of the copy failure dialog to DocumentsUI."Tomasz Mikolajewski2015-04-153-4/+133
|\ \
| * | Add an initial version of the copy failure dialog to DocumentsUI.Tomasz Mikolajewski2015-04-153-4/+133
| |/ | | | | | | Change-Id: Ibdfde661aa5b636570c017d3d00565c193d595a3
* | DocumentsUI: Polish buttons of copy destination dialog.Daichi Hirono2015-04-152-7/+38
|/ | | | | | | | | * Add cancel button to directory picker dialog. * Turns "select" label to "copy to" label for copy destination picker. BUG=20170953 Change-Id: I66214804aed75a6fccc716d1a01163c634e73d7f
* DocumentsUI roots can have settings.Jeff Sharkey2015-04-121-1/+12
| | | | | | | | | | Roots use a flag to indicate they have settings, and DocumentsUI offers to launch towards someone who handles a new Settings intent. Slight rename of browse intent for clarity. Bug: 19993667 Change-Id: I86302ec1cfac5e435d8bc5701bdb85fb9b0dcbae
* DocumentsUI: Add new private intent action to select copy destination.Daichi Hirono2015-04-134-15/+48
| | | | | | | | | | | | | The CL adds INTENT_ACTION_OPEN_COPY_DESTINATION, and implements the behavior to respond the intent action. The directory picker: * filter out read only roots * return document URI instead of document tree URI for the intent action. BUG=b:20146034 Change-Id: I96c565100c3cdaa57cc7abd8cf6d895d148941a7