When requesting thumbnails, check if their dimensions are larger
than requested, and downscale to avoid memory pressure. Load them
async and with LruCache.
Extend MatrixCursor so that RowBuilder can offer() columns without
requiring they know the projection map. This makes it easier to
respond to query() calls, where the remote side controls the
projection map. Use it to handle custom projections in external
storage backend.
Update date/time formatting to match spec.
Bug: 10333418, 10331689
Change-Id: I7e947a8e8068af8a39b55e6766b3241de4f3fc16
In some cases, we end up being called by code that doesn't have a valid
Context. It got away with this historically because it wasn't formatting
times (just dates), so it never went down a path that tried to query the
user's 12/24-hour preference. This patch just ensures that we don't try
to get the preference unless we actually need it.
Bug: 10339015
(cherry picked from commit 8d8ef00c8276200f108433922761401817fd9a50)
Change-Id: If074a67fa52943c0ec7bb5c5bbe5a11f54fb1f97
When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed. To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.
The writer end of a pipe or socket can closeWithError() to send a
message to the reader end. When the reader encounters EOF, they
call checkError() to detect if any error occured. This also detects
the case where the remote process died without sending a success
message.
This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.
Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.
Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
- put am/pm on the left side of hours for hu, zh, ja and ko Locales
- use the hours/minutes separator from the Locale (fi, sr, ...)
- updated layouts (better for Arabic, Farsi and Hebrew)
- support double digits format for 12h and single digit format for
24h (it, ja, vi, ...)
- fix setIs24HourView(boolean) behavior: do not lose the current hour
value when switching from 12h to 24h
Change-Id: If66cb6f802d894f0a2357b43eede6854791f3b67
Previously, a running transition on a scene root would simply
be canceled when a new transition was started. This would result in
abrupt scene changes, especially in generic use cases where apps/widgets
would spawn multiple transitions in successive rendering frames due to
small changes in view properties.
The new approach is to check all running animations against new transitions.
If there are overlapping properties that are being set to different values,
the new animations win and the old ones are canceled. If the end values are the
same, the new animations are noop'd and the old ones are allowed to continue
as-is.
There was also improvement to capturing state while other transitions are
running, necessary in this new world where old transitions are allowed to
continue running. Now, transitions are pause()'d while values are captured,
then resume()'d after capturing is done. This allows the system to see what the
real view properties are, instead of the mid-animation values.
Change-Id: I8e77fb9c1967087a682bb26a45763005f5ca9179
Moves most of the drag-to-open behavior into ListPopupWindow's
particular implementation of ListView. Uses hidden View API for
forwarding events between different windows.
Overflow menu opens on first touch, closes on touch end outside
the overflow button. Clicks that occur during drag-to-open mode
result in alpha animation of the selector drawable.
BUG: 9437139
Change-Id: I70f540555a03450638a27880b3ae3b031ca6e2ed
Create documents manage mode to support Downloads and transient
storage devices. Locks user into requested backend root, and forces
file sizes on and sorting by last modified.
Separate API constants for Documents versus Roots, and give concrete
MIME types for roots.
Treat null sizes as unknown. Documents are always enabled in list
so that divider is drawn. Mark external storage file as writable.
Bug: 10329983, 10332993, 10332952
Change-Id: I05f4fdf5b04041a38e1ba7fb30202a3b0c615bf6
Document browser now takes over all GET_CONTENT requests that request
openable Uris. It shows both storage backends and includes other apps
that respond to GET_CONTENT. Only grants transient read permissions.
Better guarding against throwing storage backends. Send sort order
and local-only hinting to backends.
Require that OPEN/CREATE_DOC users include openable category.
Bug: 10330112, 10329976, 10340741, 10331689, 10329971
Change-Id: Ieb8768a6d71201816046f4a4c48832061a313c28
Flags to indicate write support, and to indicate that a grid view is
preferred. Method to inform system that any root caches should be
invalidated. Methods to mark a Uri as requesting "local only" data.
Helper method for document creation.
Bug: 10330069, 10330108, 10330210, 10329976
Change-Id: I6ce6160f6ce6621e6ea05848a31bbbcb84587671