summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2015-08-27 14:28:09 -0700
committerVadim Tryshev <vadimt@google.com>2015-08-28 11:57:17 -0700
commit8786f3cfa8344fea2c9c1e3c485cefb6b8184e26 (patch)
tree1139472b6c14b3697efb7addfe4febf8c0715b04 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent6c0773ec7dc7f6a024b9dde5641fd442cb4a7cc1 (diff)
Clarifying and stabilizing drag & drop
The existing Shelf DND crashes if profile or app removal happens while dragging from outside of shelf. This is because in this case shelf temporary adds a null placeholder enter to the model, and doesn’t check for nulls in user-removed and app-removed callbacks. Adding checking for nulls. In addition, since adding nulls muds the contract between the shelf view and its model, I’m getting rid of adding null entries to the model. Nulls are used on the view side, but never leak to the model. Because of that, the state of the view (which may have nulls) and the mode may not match each other during the drag, I introduce storing app data in views, as a tag. Null tag means a drag placeholder. Now that the state of the model doesn’t always follow the state of the shelf via add/remove operations, it makes sense to introduce set-all/get-all calls in the model, instead of add/remove/get(i) calls. Again, all these changes, even though relatively massive, add clarity into the view/model contract by eliminating strange states where the model can have nulls in certain positions. Also fixing a case when removing an app while dragging it happily creates an icon. Bug: 20024603 Change-Id: Ie4e617ccf9278708d64ee100265a4858d1227aed
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions