1) Fixing orientation of test devices to their natural orientation
(Phone is usually portrait, and most big tablets are landscape). We
unfreeze the orientation at tearDown because if we don't, the device
will be permanently locked to that orientation.
2) Adding closerDrawer() to FileManagementUiTest and RootsUiTest.
Bug: 30190207
Change-Id: Iec90ee8d46fef1acbf5b04fe718810edbf99da0c
(cherry picked from commit 73a59e9a02f09e61037e4fb8275d283f3861fe90)
Couple of things this CL did:
1. Refactored ViewScroller to a separate file, renamed to
"ViewAutoScroller"
2. New interfaces called UIDelegate and CalculationDelegate such that
classes can provide necessary information for smooth scrolling
3. DirectoryDragListener implementation of #2's interface in order to
have auto scrolling when user's cursor is near top/bottom of screen
Currently since the status bar, action bar, and menu bar don't have a
drag listener, we don't get a callback on them, and thus we lose the
ability to get positions/scroll if user flings too quickly to those
areas. There might be some way to circumvent this since hovering over
these areas get a DRAG_EXIT event, but that should be 1) a separate
discussion and 2) a separate CL in my opinion.
Bug: 28696867
Change-Id: I61eba93aa60efd1638b3c0cd79db3f0d083b5e6d
(cherry picked from commit ad3a323585e43d06f632d85759beaf670f541997)
1. testDeleteDocument_Cancel seems to pass far more often than
testDeleteDocument, which always errors out due to not able to find the
menu item. This is to combine the tests so we don't lose coverage, but
also have less noise in APCT until we figure out what's going on.
2. We have regression currently on our jank tests. Per Guang's
suggestion, we are going to try freezing device orientation to see if it
helps.
Bug: 30190207
Change-Id: Ibdfdb75471b3220faaa9e8abef03df489ff185c3
When an activity gets a callback for onContextItemSelected, it first
gets dibs on handling it, and then it propagates the call to -every-
fragment it is tied to. This poses a problem since RootsFragment and
DirectoryFragment don't necessarily handle each other's menu items well,
which can cause NPEs. This is some temporary fix for it.
Bug: 30092676
Change-Id: I3f268c9c9580504b78581ad92a24c9a99c4a0daf
(cherry picked from commit 3e1699f3a3f3d0378d758e3b0d430165867eb89e)
Pull event handling logic out of MultiSelectManager into UserInputHandler.
Pull out a couple common test support classes.
Change-Id: I8958fec9cda05f52192a07a682c318e049871a8d
When the EditText is empty, pressing backspace on soft/hardware keyboard
will call on the EditText's OnKeyListener. Since we don't handle
backspace, it will then bubble up to Activity-level, which will then pop
the document stack due to the feature of using backspace as navigation.
This will trap the call correctly if the EditText is empty.
Bug: 30066261
Change-Id: I231507b9469bfa52478872491f1d2713a1ac58ba
But separate mouse and touch handling into independent (internal) handlers.
Ensure we don't do band select on right click + drag.
Bug: 29575607, 29548676
Change-Id: I247e3ba002751f2cda010125e0e7b4bdd745ac23
* Implement ring buffer to cope the challenge of deleting file clips
* Fix a bug to allow concurrent read on the same clip file
Change-Id: I53450d94ee881966d5631f0dc6edcb0fdd8ff9d5
These items were suppose to be invisible for DocumentsActivity ... I
forgot to assert them that way.
Bug: 30071769
Change-Id: I842f5bfb2492d31e0837c6ea6cc78d9867bb0a1b
(cherry picked from commit c986d4cedce43c31c5c4f30cb24f402e1c66fead)
1. Added Eject Icon for Roots that support eject
2. Added Context Menu for RootsFragment (Settings and Eject)
Bug: 29584653
Change-Id: I97f582de05763e3f0327bc0d2dc6d4e2222e047c
(cherry picked from commit d96661f8b0f613b40f2bdfc178bbe06022b5f76c)
This allows the MIME type icons to be used in other system apps.
In this instance, the StorageManager app needs to show file icons
for a given file. By moving the icon mapping into a static library,
we can avoid duplicating the mapping and resources.
Bug: 29826961
Change-Id: Ic2dc7970cc5a5ca430e33425eb9f1ecbd733fe9a
Properly assigns the app's colors for primary, primaryDark, accent, etc
to the colors used by the framework.
Moves a couple colors that are alternate shades of the accent color
into the framework for ease of overlaying.
Deletes a few unused colors as well.
Finally, fixes a bug where colorControlActivated was not being
properly set due to the theme depending upon AppCompat. To
workaround this undefined behavior, we explicitly set
colorControlActivated to colorAccent which is what the framework
sets it to.
Change-Id: Ie0cba19b1b83a21f65692102df91bf4daf27dc44
Fixes: 29581883