DialogFragment takes care of recreation on configuration change, so no
need to recreate it manually.
Bug: 26322214
Change-Id: I7c50a1c5bb1ba9fab34f6e8d31ed1e23e7edfbb7
Previously MtpDocumentsProvider used to remove device info in the
database when the device is closed. It loses a chance that RootScanner
handles the removal of roots. As a result, notifications for root cursor
does not issued.
The CL stops removing device info at MtpDocumentsProvider, and let
RootScanner remove it.
BUG=26321346
Change-Id: I6aec0cf843a1e5c93e7f67a718cabd26841d9799
The test for readEvent cancelling was flakiness because it can
successfully receives an event before the test tries to cancel it.
Change-Id: Ie7625dff53e07b8bc9888da03e78155e683a6d46
location of the user.
Commonly the users prints on a printer that this near the user current
location. Hence if possible we want to show the user printers that he
used before and that are close to him.
Hence store the location of the previous uses of a printer and prefer
printer that are close to the user.
Unfortunately getLastLocation might not report a usable location and it
will take at least 5 seconds until the first usable location arrives. At
this time the user might have already opened the destionation spinner.
It would be unexpected for the printers to suddenly change under the
users finger. Hence it might be that we did first show the printer
without any location information and then once the location is known we
cannot update thedestination spinner anymore.
The select printer activity does not have this issue, hence in the worst
case the user has to enter this activity to select a printer and by then
the location is usually determined.
This is not ideal but better than before.
Bug: 24133609
Change-Id: Ie7d20cf3d9dd163e57903f8f6ecc0b3fd4f4374e
- Stop using deprecated APIs
- Fix all public and some internal javadoc
- Add @Decorations to public APIs
- Some minor cleanup, e.g. don't use variables with overlapping names in same scope
- remove unnecessary properties from manifest (they are set by the build
system)
Change-Id: I0ce8849a516414763fe9de76c3a18ce17d896816
- 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
- Create a new layout for directory items, which have a different
layout (no thumbnail, size or mod_date).
- Add drop shadows.
Also refactor a few things in the DocumentHolder and child classes to
make things more efficient and cleaner.
BUG=24326989,26229570
Change-Id: I05df52b071667190d4c4c671f50d25498383cdaa
The CL lets MountService to observe device FD, and request unmount to
vold when the device FD was closed, or remote application providing
appfuse is crashed.
BUG=25756420
Change-Id: I7990694d32affa7f89e3f40badb25098d74d744d
Previously the while loop condition refers to Thread.interrupted()
wrongly. The Thread.interrupted() flag is cleared when the
InterupptedException is thrown.
BUG=26297698
Change-Id: I113d5c88389d54a4a6e29af2cf9515b1693b59dc
Primary goals of this refactor are to reduce DirectoryFragment bloat,
and to simplify the code (especially the binding code) for the different
layouts.
- Decouple DocumentHolder from DirectoryFragment.
- Move it into its own file.
- Move binding code from DirectoryFragment into DocumentHolder.
- Split DocumentHolder implementation into three separate subclasses,
for grid items, list items, and dividers.
BUG=24326989
Change-Id: I217bf4e5b8e1b33173b8b0275591a8c5d8e9161c
When we dock with Pixel C keyboard we normally expect to find it, and so
we perform a low latency scan (which uses highest duty cycle). But if
keyboard is not charged or if tablet mode trigger misfires (because
there was a magnetic object in proximity?) we may not find the keyboard
and will continue scanning indefinitely, impacting WiFi performance and
draining battery. To avoid this scenario let's stop scan if we do not
find "our" device in 30 seconds.
Also remove STATE_WAITING_FOR_STATE_PAIRED as it was unused.
Change-Id: I4bf1a9a163d3165eaa5e8f1cc2d2938465d454af
(cherry picked from commit 6c12c3a6538591b5fa6e11cb4f583aa494e0ce5c)
Signed-off-by: David Riley <davidriley@google.com>