The Storage Access Framework currently provides an
API (OPEN_DOCUMENT_TREE) that lets the user pick a directory to be used
by the application. Although this APIs is very powerful (for example, it
allows the user to create sub-directories, delete and share files,
etc...), it's too complex for simpler use cases like a camera
application trying to have access to the standard Pictures directory.
The new API (OPEN_EXTERNAL_DIRECTORY) simplifies this scenario by
letting the application select a standard, pre-defined directory (as
defined by android.os.Environment). The user still needs to grant access
to the requested directory, but the resulting UI will be simpler and
more straightforward.
Usage example:
// ...
int requestCode = 42;
Intent intent = new Intent(Intent.ACTION_OPEN_EXTERNAL_DIRECTORY);
intent.setData(Uri.fromFile(
new File(Environment.getExternalStorageDirectory(),
Environment.DIRECTORY_PICTURES)));
startActivityForResult(intent, requestCode);
// ...
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != Activity.RESULT_OK) {
return;
}
Uri uri = data.getData();
int modeFlags = data.getFlags()
& (Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
getContentResolver().takePersistableUriPermission(uri, modeFlags);
}
BUG: 23011462
Change-Id: Ie832026532f74e681ef220b761667eb66ff3c8b0
Service Workers are not tied to WebView instances so currently
there is no mechanism to capture callbacks originating from
within Service Workers.
This patch adds the necessary classes to capture callbacks
and allows to set settings specifically for Service Workers.
The main idea is that to control service workers the embedding
app would obtain an instance of ServiceWorkerController using
ServiceWorkerController.getInstance() first. After that it would
be able to set a custom ServiceWorkerClient and change
ServiceWorkerWebSettings via the controller object.
BUG: 22709088
Change-Id: I0eb17be46b767851676b77a94757771611fa3a1b
usage while running in background.
The new API is 'int getRestrictBackgroundStatus()' and returns the
following values:
- RESTRICT_BACKGROUND_STATUS_DISABLED: no restrictions
- RESTRICT_BACKGROUND_STATUS_WHITELISTED: restriction but app is
whitelisted
- RESTRICT_BACKGROUND_STATUS_ENABLED: full restriction
The proper way to interprete these values for using metered networks
while running on background is:
- When disabled, there is no restriction and the application could use the
metered networks freely.
- When whitelisted, the application can use the metered network, but should try
to minimize the usage.
- When enabled, the application should not try to use metered networks at
all, since the usage will be denied.
BUG: 26451391
Change-Id: If07d42bb88e4c02802df0234861f38aef2cfead7
Adding a policy for profile owners to set the background color of the
confirm credential screen for the managed profile.
Bug: 26638631
Change-Id: Iea36b94c5a42b6ae12cc36921ec5f840306e81a1
Introduce new methods and classes for the audio recording
configuration update and query API.
Callback registration supports a Handler.
Bug 22876530
Change-Id: I819ad464f095d970b5d1d8a3781fcf8dbb310424
During the initial attempt to support automatic language switching in
LatinIME, it turns out that the current EditorInfo#locales is difficult
to use and even confusing in some situations. Based on that
experience, this CL changes as follows:
* Rename EditorInfo#locales to EditorInfo#hintLocales:
This is mainly to avoid possible confusion when to set this. We want
to make it clear that having non-empty LocaleList there is a clear
signal that the user would switch to certain languages regardless of
the currently selected input method subtype.
* Make EditorInfo#hintLocales nullable:
Previously marshaling EditorInfor causes NPE when
EditorInfo#hintLocales is null. This CL relaxes such a restriction.
* Introduce TextView#{set, get}ImeHintLocales():
In the previous implementation [1], we just copied
TextView#getTextLocales() into EditorInfo. This is, however, does not
work well because it is no more or less than the default value. If
LatinIME supports automatic language switching, having the default
value in EditorInfo actually means that whenever you focus in a new
text field, the keyboard language is reset to the default locale.
In order to make this "hint" useful for IME developers, this "hint"
should be specified only when the application developers are confident
to do so.
[1]: I738ffaaf07091d8b980f8bfc6e16227fcb85a96a
0445fdf321e74044dc9f3719922fc8ff4923fdf4
Bug: 22859862
Change-Id: I0a730011874ea8d01e50624ed3f1ecd197d05f94
Introduces a way to request immediate backup for list of packages
and receive callbacks on backup progress.
Bug: 25688526
Change-Id: Ib826933d44f4ebf2b981f8be366215b2d37847e2
Allow launchers to read ApplicationInfo from LauncherApps
to support suspended flag.
Provide callback to launchers via LauncherApps for suspend
/unsuspend broadcasts.
Change-Id: I772a121c45f60f926e8343bb6f181bef4e8929d3
Bug: 22665752
Token binding protocol is the next generation channel-ID protocol,
currently it is a draft in IETF
https://tools.ietf.org/html/draft-ietf-tokbind-protocol-03
Add the api as a system api (will be public once the draft finalizes)
Change-Id: If971cc7e6d14f15c778b9b027df9fc48dac0160c
Send a protected broadcast to registered receivers only
when packages get suspended.
Bug: 22776761
Change-Id: I043053ed45bdc202ead18518a0c1e39cce47947c
When an application is no longer interested in
communicating with a tag, but the tag is kept in
range of the device for a long amount of time, we
will burn a lot of power keeping the connection
to it alive.
Instead, allow the app to signal it's "done" with
the tag, which allows us to put the controller
in a low-power mode. This will save power in scenarios
such as an NFC tag embedded in a car dock or
wireless charging dock.
Bug: 26426491
Change-Id: I7a0149ede46e0c7610b06ed1776344b772677350
New API for an app to request creating a new user with
a given user name and seed account information for the
SetupWizard to use when that user is switched into.
Also adds system APIs to read the seed account data from
UserManager.
Bug: 22776757
Change-Id: I0bc3f11ee19c15e0ee2a908c88d98b13296cc30d
Adding AudioRouting (Java) interface for routing control
in AudioTrack and AudioRecord.
Deprecating current (Marshmallow) Routing APIs in
AudioTrack and AudioRecord.
Adding package-private constructors to AudioTrack and AudioRecord
to connect to native player/recorder.
Bug: 23899814
Change-Id: I7df7a687fbd56a34c1f5769ffe005eba2a059505