History log of /frameworks/base/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.java
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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.java
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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.java
c89cc4419ece41015196e31ff8d144c45a9e356e 16-Nov-2015 Steve McKay <smckay@google.com> Merge "Add test size annotations to docsui tests."
53c774b5727a1e352540a8b07836da7e6745a87c 12-Nov-2015 Steve McKay <smckay@google.com> Add test size annotations to docsui tests.

Required by APCT.

Bug: 25152838
Change-Id: I18629036a7b290719d8faf326117e25b52f0ae07
/frameworks/base/packages/DocumentsUI/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.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/tests/src/com/android/documentsui/dirlist/MultiSelectManagerTest.java