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
When the system language is changed by the Settings app, we need to call
LocaleList.setDefault() to change the default locale list
since components like TextView should be able to assume that
LocaleList.getDefault() returns the latest system locale list.
BUG: 26731035
Change-Id: I482567476e1b14cd9b4716343183627f81d96ace
- We should be retrieving the first stack task for calculating the
thumbnail transition, regardless of whether it is freeform or not.
Bug: 26739531
Change-Id: I27037a480201396011d7f9b8d094b4d9afe66f0e
Bug: 26584230
activateTexture(0) was accidentally refactored into
Texture::upload. Only OffscreenBuffer intended for the
texture unit to change
Change-Id: I5dbfc3eab8843733084ce1ce38a0a946abf0e05b
Also updates nullability annotations for methods called during touch
dispatch. Verifies that TouchTarget and HoverTarget are not recycled
multiple times.
Bug: 26611563
Change-Id: Ica5ff18e18b325b12fe72b8ca145443b25625fe4
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
The new command works as "bmgr backupnow [list of packages]"
This change should be submitted after ag/834173
Change-Id: Ie1cdd18a38653dd71a1d499620dd2afec3cbbb24
Since the WebView loading mechanism is global - it doesn't differ
between different users, a user for which the current WebView provider
is uninstalled won't be able to fetch any information about the current
provider without passing a certain flag (MATCH_UNINSTALLED_PACKAGES) to
the package manager.
Bug: 26677081
Change-Id: Id1b86164bb22fc7285d292da1b1115fb25e4d226
This impementation includes HCE(Host-based Card Emulation) for NFC-F
which emulates NFC Forum Type 3 Tag on a smartphone.
Signed-off-by: Daisuke Ito <DaisukeE.Ito@jp.sony.com>
Yoshinobu Ito <Yoshinobu.Ito@jp.sony.com>
Change-Id: I1618a7fba801e0705ff3cc078206a1446b3dd56d
My previous commit [1] introduced a new XML attribute "languageTag" for
subtypes but forgot to initialize InputMethodSubtype object with that
attribute. As a result, InputMethodSubtype#getLanguageTag() has always
returned null even if "languageTag" attribute is specified.
[1]: I77db5b99a7cf745d800db75baf135bb60ad04820
8d6eeb01df72891acd3aa75e64aa1595a41cc96e
With this CL, InputMethodSubtype#getLanguageTag() starts returning the
value specified in the XML resource.
Bug: 22859862
Change-Id: I251d3d999afd13c0d618f2cb59e8ed3d47f21c98