4759c9f03f476e34f9716c88bc1bcbd7ba07907c |
|
14-Apr-2016 |
Tomasz Mikolajewski <mtomasz@google.com> |
Cancel band selection on directory change. This is a workaround for N. Ideally we should keep the band selection, as directory may change very often, eg. during loading, or downloading a file (every second). Bug: 27224277 Change-Id: I40cfb12c4f7928c4e0d6e675e91ba30ab3a6ab52
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
5e02d303c07d428970e25b315061c61287df153d |
|
11-Apr-2016 |
Tomasz Mikolajewski <mtomasz@google.com> |
Do not allow to select non-selectable items via mouse. Bug: 28101625 Change-Id: I9f6cd4e259f7860bbc6c74c4d24c43e2c3ba1047
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
0e6b84ff6391ca6019be4d3ee96cd61821b16e74 |
|
11-Apr-2016 |
Tomasz Mikolajewski <mtomasz@google.com> |
Do not crash when trying to select unselectable items with keyboard. Bug: 28103071 Change-Id: I6e9bc918433eee4b1309ccf8ea597ea774e5559e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
4f89b6c6b876a240ec5440f62c854c5ded214f05 |
|
09-Apr-2016 |
Steve McKay <smckay@google.com> |
Use writeStringList for selection parceling. Bug: 27208679 Change-Id: Id0506e49254e0b3fcddb7d3f92717da0a95f2f6d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
c29fd8d149eab691db867e07c6d1e22140f3ad6b |
|
14-Mar-2016 |
Ben Kwa <kenobi@google.com> |
Fix band selection problems. BUG=27364174 BUG=27645942 Change-Id: Ib14680db708f1ddf1f5dc9dff8b93b655fa3f123
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
a1f7680f535a30aa816d129c072870031c8a2eb6 |
|
25-Feb-2016 |
Steve McKay <smckay@google.com> |
Update preconditions to be asserts... Which are now supported by Jack. Retain a few preconditions checks that enforce contract. Disable the one assert we had...because it failed in tests. Change-Id: I2f6cb01e1af1534be4428ce4a3ee625a163dd163
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
2fbb40eebd508b67e53f5a8590caf57a53cfb25d |
|
19-Feb-2016 |
Steve McKay <smckay@google.com> |
Add CREATOR class to Selection. Bug: 27236334 Change-Id: I5f50cd63b850785194fec2db3eb68e40aa7af34f
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
893390bd580eca39ecd693cb0d76c7bc9b36a11d |
|
17-Feb-2016 |
Aga Wronska <agawronska@google.com> |
Directory fragment refactoring. First attempt to to refactor fragments handling, state and app lifecycle. The goal was to simplify code by using android built lifecycle mechanism, eliminate bugs caused by multiple creation of the fragment, see the performance impact and give some fundament for refactoring of fragments and activities in the app. Search view manager: * Remove curentSearch from state * Restore search from saved state (ex. after rotation) * Rename file to give the better overview of its purpose Directory fragment: * Store selection state in a bundle * Remove double creation of fragment * Use loaders to reload content when possible * Keep info about state inside the object * Refactor available types of fragment to be normal and recents * Make search type a mode possibly available in all types * Remove search being invoked from refresh method * Do search by reloading fragments content instead of recreation as an example Other: * Fix window title maybe Bug: 26968405, 27101786 Change-Id: I58f36cd0a3e3a6ec98996cd8aac16e10e425e1fe
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
83df50f9971d79fcffe78a9ea1a9eeebcea996bc |
|
10-Feb-2016 |
Ben Kwa <kenobi@google.com> |
Allow multiple range selections using the shift key. - Introduce an API on MultiSelectManager for starting/ending range selections. - Navigation with the shift key pressed extends the current range selection (or starts a new one, if one isn't in progress). - Navigation without the shift key pressed will end the current range selection. BUG=27124371 Change-Id: Ieddf3ee816812bf5210463536fe63179ef1809ad (cherry picked from commit 09792ef1506f4cbd944e16651508be435d92c5be)
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
7ed21c2f00bf416bc59c114f74793ef55ec6ffb7 |
|
10-Feb-2016 |
Steve McKay <smckay@google.com> |
Don't die if dirKey hasn't been set in Selection. Some times the raw selection in State can be saved....raw. Change-Id: Ibf4efab31fffc99baa25ba415f8b53c110aa81f3
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
e852d93e1d8a56f68ca24cabd5c5ae6d5091f2c3 |
|
09-Feb-2016 |
Steve McKay <smckay@google.com> |
Preserve selection across device rotation. Also, update Selection model to use a discrete provisional selection, rather than a superset "total" selection Bug: 27075323 Change-Id: I855e6b66010b3cdd599cc0a9f0046a7efadca5fe
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
3182a92a1687051f5e4ceaee5dd9cebafb7a7758 |
|
02-Feb-2016 |
Ben Kwa <kenobi@google.com> |
Merge "Refactor key handling and selection."
|
6792489dc490eb029469f73490a560c76e84dc98 |
|
27-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Refactor key handling and selection. - Pull key handling code out of the MultiSelectManager. - Tighten up the semantics around range selection: - Create an API on MultiSelectManager for handling multi-select. - Make the range selection more opinionated (e.g. more state checks), to simplify the design and code. BUG=25195767 Change-Id: I4bbe446ed3059150499db3d28e581b2e68405266
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
d4d0e7085a863b0878a328f2c447f69018f3d826 |
|
01-Feb-2016 |
Ben Kwa <kenobi@google.com> |
Don't clear the selection when directory contents change. Update the selection to remove IDs that no longer exist, but don't clear it - doing so causes the selection to vanish whenever the underlying directory contents change, which is disruptive to the user. BUG=22765812 Change-Id: Ice6ae54d0748cf842addf1342541ae7759435811
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
29852339f1b6df7b3a0437db4ab9a49682a25d4b |
|
22-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Merge "Fix band selection problems."
|
22f479dad33deb86ee8efbce0c577e03d510da39 |
|
21-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Fix band selection problems. - Remove whitespace from the GridModel, which isn't set up to deal with it. - Use absolute column bounds whenever translating the band rectangle into column indices. This necessitates additional binary searching, but is necessary when columns aren't fully populated, which happens with the new grid layout. BUG=26512327 Change-Id: I5016d5de8f00c366f575f0722739007ac1612923
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
0436a757211bd5b485ba5e484ee37082c59e1c47 |
|
15-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Rework selection handling for items in the DirectoryFragment. - Remove the gesture detector from the MultiSelectManager, and consolidate gesture detection and event dispatch logic in DirectoryFragment.GestureListener. - Route single-tap events through the DocumentHolder, so that it can apply view-specific logic, like making a tap on the item's icon select rather than activate. - Consolidate event handling logic in the ItemEventListener. - Add new unit tests for DocumentHandler. BUG=24326546 Change-Id: Id15cdd11b13e4c063c1baff95aa8ee09c190d6c3
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
2ad82149165fe8a50f0a0d8272c9176a4ebd14ec |
|
08-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Merge "Fix shift-selection."
|
2613802d4b9b72f8f9a84ca2712f7cf143575b05 |
|
08-Jan-2016 |
Ben Kwa <kenobi@google.com> |
Fix shift-selection. The shift-selection code was failing to correctly anchor the selection prior to shifting focus. This meant that the first shift-navigation event (i.e. starting from non-selection mode) would not select the right set of stuff. BUG=26459949 Change-Id: I62ed959fb549198c503cfd2131d2499f9a61f7e5
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
8d7bf9487bf3ba5bafd05f0bdc06687485ce630c |
|
30-Nov-2015 |
Ben Kwa <kenobi@google.com> |
Switch to smooth scrolling when zooming to home/end. Smooth scrolling fires off a full complement of scroll state changes, which enables the code to more accurately detect when a scroll is finished. BUG=24865658,25632648 Change-Id: Ib902836fdb4a76612d3bbfc4d30d5b0b249301a5
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
44408260ba99eea55f7c0ec02778bb13d83c3262 |
|
06-Jan-2016 |
Steve McKay <smckay@google.com> |
Don't proxy calls to DocumentsAdapter in MultiSelManager. We were bouncing calls out to the adapter pulled from RecyclerView, but the adapter is easy to write a test double for and we can readily inject the adapter when needed at runtime. Eliminates unnecessary indirection. Also, protect against failure when documents can't be loaded for delete. Change-Id: Ief6585bf2e3e4fd407d801d485a9d7cd888b8500
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
955e46d004cf484267aef6181722ac19ffaf073d |
|
05-Jan-2016 |
Steve McKay <smckay@google.com> |
Fix event relay to correctly dispatch events. This fixes: - UI to show selection which was broken in ag/838866 - Delete undo, which throws IOB exception when undoing a a full delete of all entries. Change-Id: Idbb43510974e130d283313602a71ac15ad10aadf
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
ef16f5f41106eaa89e5fdf0958e408a6faf7a5f4 |
|
23-Dec-2015 |
Steve McKay <smckay@google.com> |
Move Adapters to their own classes. Move section break support into a separate wrapper class. Fix issue where intermediate directory updates were briefly showing hidden files. Add a rudimentary test for ModelBackedDocumentsAdapter. Bug: 26293561, 26383237, 26293561, 26309025 Change-Id: I1fa489b110754d8801091b2009caebe9d2278701
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
20887030e8c6105c97286653244d5c3801324194 |
|
23-Dec-2015 |
Ben Kwa <kenobi@google.com> |
Fix various band select instabilities. - Guard against OutOfBoundsExceptions by checking for RecyclerView.NO_POSITION before attempting to retrieve model IDs in various places. - Fix a spot where the default return value of SparseIntArray.get (i.e. 0) was causing item 0 to incorrectly get selected. BUGS=26249027,26309874 Change-Id: I08d2e8c90bdd40a4738bdcf357de31e8fe6ddecf
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
c72a2cb899acf5562288675435b08d91ccf8019d |
|
17-Dec-2015 |
Ben Kwa <kenobi@google.com> |
Implement bucketed sorting in DocumentsUI. Change the sort code in the Model to bucket items into two separate categories (folders and documents) and then sort the two buckets separately. Add code to the adapter to insert a visual break in the UI, between folders and documents. Change-Id: I759fedcef829aba9ad61554326489a9e62641cc7
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
fcb54d8be7777b899d4d2da31419591b12a765d6 |
|
11-Dec-2015 |
Ben Kwa <kenobi@google.com> |
Wrap up the stable ID refactor. - Rationalize band selection: make it internally a range selection operation, that translates positions to IDs only when updating the Selection. - Clean up TODOs and comments. - Fix selection adjustment when things are removed from the view. Change-Id: If917eb9dd18e755c5a0ce83c84409902c4ef3d2e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
db65cd5e48e847e99cc64bf79a2fb7fe3bbfd31a |
|
09-Dec-2015 |
Ben Kwa <kenobi@google.com> |
Fix file deletion after the move to Model IDs. - Add methods to the DocumentsAdatper to hide and unhide files. This removes that burden from the Model. - Remove clunky markForDeletion/finalizeDeletion and all related code from the Model. Replace with a straight-up delete method. - Modify deletion code in the DirectoryFragment. Deletion now looks like: - user presses delete - DocumentsAdapter hides the deleted files - If the user presses cancel, the DocumentsAdapter unhides the files. - If the user doesn't cancel, Model.delete is called to delete the files. - Fix deletion-related Model tests. BUG=26024369 Change-Id: I02e2131c1aff1ebcd0bdb93d374675fd157d7f51
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
743c7c2f0f57b4cef7cc11154b2e804a7eb33177 |
|
02-Dec-2015 |
Ben Kwa <kenobi@google.com> |
Transition selection to use Model IDs. This CL transitions the MultiSelectManager to (mostly) use Model IDs. - Add the ability to retrieve all model IDs for the current directory, from the model. - Add a map in the DocumentsAdapter that maps from adapter position to model ID. - Make the adapter listen for model updates, and update its internal map of positions to model IDs appropriately. - Use the aforementioned map when binding ViewHolders. - Get unit tests to compile; get as many tests passing as possible at this point. Tests related to deleting things won't work right now. Still to do: - Add code to the adapter to sort and group items. After this is done, SortingCursorWrapper will no longer be needed. - Add code to the adapter to deal with item addition/removal. After this is done, the pending-deletion code in the model can be removed. - Rationalize position-based vs model-based selection. Some code in the MSM (in particular, code dealing with range selection) is still position-based. It's becoming clear that it doesn't make sense for range selection to be ID-based, since "range" is a concept that only makes sense in the context of items that are positioned in the UI. Will need to iterate more on the position-based code to make sure it makes sense. BUG=26024369 Change-Id: I767cde2d888c101aaf83b59155b14634a236164b
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
57a93babd76fd4c6519f26dbed6f91aeeb7a5ebb |
|
11-Nov-2015 |
Steve McKay <smckay@google.com> |
Handle shift+arrow correctly in single select mode. Bug: 25603626 Change-Id: I2f71152b303ac218ecec59e8200acf8a716ea0ee
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
aaee6aff52e8ba5b9b0104582d381a48869667af |
|
05-Nov-2015 |
Ben Kwa <kenobi@google.com> |
Clean up some unnecessary imports. Change-Id: I10560826cbf3b2ae151f9fe7294560bf7e0f1911
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|
f862155e3476f8d9644d57072a6d92375bde628e |
|
04-Nov-2015 |
Steve McKay <smckay@google.com> |
Move DirectoryFragment and family to dirlist pkg. Stuff was getting out of control in the main package. Change-Id: Ia06ba96f5bbe13388d51e6ad52a9dac76af97cc0
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java
|