Commit Graph

4415 Commits

Author SHA1 Message Date
Jeff Sharkey
e80ef951cb Merge "APIs for reviewing, listing volumes, hashes." 2018-11-01 20:25:21 +00:00
Jeff Sharkey
0fc74ab226 APIs for reviewing, listing volumes, hashes.
As part of creating a "default gallery" app in Q, we need to define
the expected contract of how recently captured media can be reviewed
by the user.  Mirrored off the existing CAPTURE intents.

The Q storage work will start calculating SHA-1 hashes for each
media item to identify them in a stable way.

API to list all available volume names on the device, which includes
all attached shared storage devices, like SD cards.

Clean up all Uri creation to use Uri.Builder to ensure that incoming
volumeName values are escaped correctly.

Bug: 111268862
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ib7e5bf814b407f4d611767d2a5d26ccfe6d8d034
2018-11-01 11:07:55 -06:00
Risan
7c8506d6c7 Merge "Add a more flexible queryRecentDocuments" am: 627441218d am: a366edd78d
am: 729067376c

Change-Id: Ie1652bc9dfb413fe22962ee66024acd0d44ed127
2018-11-01 07:02:42 -07:00
Risan
729067376c Merge "Add a more flexible queryRecentDocuments" am: 627441218d
am: a366edd78d

Change-Id: Ib746205cd82634d0d7b821db94c8316e8260689c
2018-11-01 06:43:51 -07:00
Treehugger Robot
627441218d Merge "Add a more flexible queryRecentDocuments" 2018-11-01 13:11:09 +00:00
Sergey Vasilinets
1e5b5d0326 Merge "Revert "APIs for reviewing, listing volumes, hashes."" 2018-11-01 12:08:34 +00:00
Sergey Vasilinets
07dfd0a185 Revert "APIs for reviewing, listing volumes, hashes."
This reverts commit b7634f49ae.

Reason for revert: docs build was broken https://android-build.googleplex.com/builds/submitted/5104251/sdk_phone_armv7-sdk/latest/view/logs/build_error.log

Bug: 111268862
Change-Id: I95967186def8a3c81e7a2e0e2915d4280cd78af4
2018-11-01 12:06:56 +00:00
Varun Shah
d7f381524d Merge "Exposes certain Settings fields as SystemApi for SUW." 2018-11-01 00:36:41 +00:00
Risan
6a4a8f6046 Add a more flexible queryRecentDocuments
The existing queryRecentDocuments have a hard limit 64. However, case
like ARC++ wishes to have a more flexible limit that can be passed as an
extra parameter. This new API will gracefully degrade to the old API to
maintain backward compatibility with old providers.

Bug: 111288304
Test: manual test (patched the MediaDocumentsProvider, and test calling
the new API):
1. Test that passing Bundle with QUERY_ARG_LIMIT=5 is honored and
returned is limited to 5.
2. Test that passing null will release the limit to default 64.
3. Test that removing MediaProvider implementation for new method and
implement the old method will automatically redirect the call to old
method (backward compatible with old providers).

Change-Id: I37b1785b94f3e9cf09128fbf1e8779a4447fe7a9
2018-10-31 23:30:35 +00:00
Jeff Sharkey
b7634f49ae APIs for reviewing, listing volumes, hashes.
As part of creating a "default gallery" app in Q, we need to define
the expected contract of how recently captured media can be reviewed
by the user.  Mirrored off the existing CAPTURE intents.

The Q storage work will start calculating SHA-1 hashes for each
media item to identify them in a stable way.

API to list all available volume names on the device, which includes
all attached shared storage devices, like SD cards.

Clean up all Uri creation to use Uri.Builder to ensure that incoming
volumeName values are escaped correctly.

Bug: 111268862
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I460593466d85ff052fd157d8fd784e7ac5b25d78
2018-10-31 21:27:04 +00:00
Varun Shah
76c8e68e74 Exposes certain Settings fields as SystemApi for SUW.
User Setup related fields in Settings indicating the setup
personalization state are now exposed.

Global Settings fields indicating whether the device is in demo mode,
a password is required to decrypt the device, and if mobile data is
enabled for provisioning are now exposed.

Various Secure Settings fields are also now exposed. They indicate
information about  doze, user setup information, lock screen
notification settings, assist gesture setup, and whether a suggested
action was completed.

All of the exposed fields require the WRITE_SECURE_SETTINGS permission.

Bug: 116689780
Test: manual (run setup wizard)
Change-Id: If8a96cca216b1d3e3b9329a3f4695caf9f3f248a
2018-10-30 17:18:44 -07:00
sqian
bf916cd022 Merge "Change package to component for Setting's default call redirection service" am: f67ece13ad am: a6bf55bcc6
am: 5cfa939ba0

Change-Id: Ic799f4b0e42aad5f9446478a1954555b9afbc689
2018-10-30 13:25:37 -07:00
sqian
5cfa939ba0 Merge "Change package to component for Setting's default call redirection service" am: f67ece13ad
am: a6bf55bcc6

Change-Id: Ia1d7455d2663c2942dfb298e9222e6c2b8d98529
2018-10-30 13:10:46 -07:00
Treehugger Robot
f67ece13ad Merge "Change package to component for Setting's default call redirection service" 2018-10-30 19:06:55 +00:00
Phil Weaver
27beee50d3 Make performAccessibilityShortcut a SystemAPI
Also create a new MANAGE_ACCESSIBILITY permission to
perform the shortcut.

Bug: 116118615
Test: make, activate accessibility shortcut
Change-Id: Ic65a0cdf7393429e14cb98f4fb0734d20069b05a
2018-10-30 10:10:41 -07:00
weichinweng
53df942469 Merge "Add CACHED_NAME into call history database when the add call." am: 568faa8ed9 am: 66d504697d
am: aec23b71d6

Change-Id: I7abbb2504d5e228e537ef7562b561674258c7017
2018-10-29 22:56:42 -07:00
weichinweng
aec23b71d6 Merge "Add CACHED_NAME into call history database when the add call." am: 568faa8ed9
am: 66d504697d

Change-Id: Iff5bc13cca9b35c311e05fa71b359702a4f9f556
2018-10-29 22:45:54 -07:00
Treehugger Robot
568faa8ed9 Merge "Add CACHED_NAME into call history database when the add call." 2018-10-30 04:44:35 +00:00
Tony Zhu
a51294bc9e Merge "[Call Screening]Default call screening app setting storage." am: 371786f6b0 am: 56b75cb498
am: 5b3b0ea44b

Change-Id: I32d514581e8fa9403d8412d2cd23fef41860d075
2018-10-29 20:54:24 -07:00
Tony Zhu
5b3b0ea44b Merge "[Call Screening]Default call screening app setting storage." am: 371786f6b0
am: 56b75cb498

Change-Id: I98ac08b917aef63202b006b7440bee4c75ff665f
2018-10-29 20:45:18 -07:00
sqian
28f8a2545d Change package to component for Setting's default call redirection service
Bug: 64959558
Test: Compile
Change-Id: I503b34812869e2b5897033ca765c85fcd4474101
2018-10-29 19:54:13 -07:00
Tony Zhu
371786f6b0 Merge "[Call Screening]Default call screening app setting storage." 2018-10-30 02:43:52 +00:00
Joseph Johnson
367d14a1b5 Merge "Make LAST_SETUP_SHOWN a SystemApi" 2018-10-29 22:03:54 +00:00
Jeff Sharkey
bc2ae00878 Magic to keep "_data" paths working.
As part of the storage changes in Q, we're removing the ability for
apps to directly access storage devices like /sdcard/.  (Instead,
they'll need to go through ContentResolver.openFileDescriptor() to
gain access.)  However, in several places we're returning raw
filesystem paths in the "_data" column.  An initial attempt to simply
redact these with "/dev/null" shows that many popular apps are
depending on these paths, and become non-functional.

So we need to somehow return "_data" paths that apps can manually
open.  We explored tricks like /proc/self/fd/ and FUSE, but neither
of those are feasible.  Instead, we've created a cursor that returns
paths of this form:

/mnt/content/media/audio/12

And we then hook Libcore.os to intercept open() syscalls made by
Java code and redirect these to CR.openFileDescriptor() with Uris
like this:

content://media/audio/12

This appears to be enough to keep most popular apps working!  Note
that it doesn't support apps that try opening the returned paths
from native code, which we'll hopefully be solving via direct
developer outreach.

Since this feature is a bit risky, it's guarded with a feature flag
that's disabled by default; a future CL will actually enable it,
offering a simple CL to revert in the case of trouble.

Bug: 111268862, 111960973
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ied15e62b46852aef73725f63d7648da390c4e03e
2018-10-26 09:32:29 -06:00
tonyzhu
70526c3e95 [Call Screening]Default call screening app setting storage.
Add new string in Settings. To indicate which app is default
call screening, similar to default dialer application setting,
store this in the system settings provider.

Bug: 118416082
Test: atest SettingsBackupTest pass.
Change-Id: I39f81b31a68ee2dbb056ff935f8dea0f51720017
2018-10-26 13:40:45 +00:00
Chong Zhang
d31872bc6a Merge "Color aspects keys information stored database" am: e4c918ba8e am: 89c615866a
am: e8c39f3ba0

Change-Id: I08c65f1b032fe92994202b64900cccc4f61adaef
2018-10-25 21:36:59 -07:00
Chong Zhang
e8c39f3ba0 Merge "Color aspects keys information stored database" am: e4c918ba8e
am: 89c615866a

Change-Id: Ida5168cf1cea927dd79a9c2bacee0a156af60b76
2018-10-24 20:22:18 -07:00
Jeff Sharkey
643e99ef06 Reroute Uri conversions though MediaProvider.
Upcoming changes will prevent apps from reading "_data" columns
directly, which is required to convert between DocumentsProvider and
MediaProvider Uris.  To solve this, delegate the call() through
MediaProvider, where it can perform the "_data" lookup on behalf
of the caller.

Also add new getMediaUri() call to offer symmetry.

Bug: 111960973, 117627072, 110961701
Test: atest android.provider.cts.MediaStoreUiTest
Change-Id: I53c640704d86047d7a4bf1702aca027873395abf
2018-10-24 19:34:09 -06:00
nobuhiko saitou
839cc00889 Color aspects keys information stored database
Add keys for color aspects to VideoColumns in MediaStore.
And standard, transfer and range is stored to database.

Bug: 114329709
Test: put hdr/non-hdr contents and check media db

Change-Id: Id4bf27a35720f5cf5a60f08eb3f30314e1a1a167
2018-10-23 22:03:30 +00:00
Kweku Adams
9b882d88ee Merge "Ability to enter deep Doze immediately in Battery saver." 2018-10-23 17:35:26 +00:00
Kweku Adams
b396ccf969 Ability to enter deep Doze immediately in Battery saver.
This is disabled by default and leaves time (1 min) for processes to
finish running only if there are processes currently running, otherwise,
it goes into deep doze immediately.

Bug: 79955941
Bug: 109934270
Test: Turn on Battery Saver, enable quick doze feature, turn off screen
also run `atest BatterySaverPolicyTest`
also run `atest com.android.server.DeviceIdleControllerTest`
Change-Id: Iec0c8436134e18debfa4c71a8322a6c9cdb10846
2018-10-23 10:32:54 -07:00
weichinweng
fbb5f7b34c Add CACHED_NAME into call history database when the add call.
* For some carkit will get the call history name to show its screen, But
the caller name is not into call history database.
* Add caller name into call history database for the carkit get correct
caller name.

Bug: 111968310
Bug: 117627934
Test: build pass, verify pass, Check call history after received different
type call (save number, not save number, private number)
Change-Id: Ic28320c0184e33aa934a9c9c82a6062f5ef44e2a
2018-10-23 02:20:22 +00:00
Jeff Sharkey
047edaeaa3 Merge changes I86f597f1,I5c9c09dd
* changes:
  MediaStore deprecations for Q.
  Convenience method for obtaining thumbnails.
2018-10-19 15:21:54 +00:00
simplex
9c0878cb4f Make LAST_SETUP_SHOWN a SystemApi
This allows TV Setup to refer to LAST_SETUP_SHOWN.
This is part of the migration of TV Setup into google.

Bug: 117955028
Change-Id: I71a4e276ee4dbcd3c878278d8ce870ede4430a07
2018-10-18 17:10:38 -07:00
Jeff Sharkey
5282796ac3 MediaStore deprecations for Q.
Mark "_data" columns as explicitly deprecated, since they'll only
work for pre-Q apps.

Bug: 111268862
Test: manual
Change-Id: I86f597f1245cc255f6ee114957829763b1a76e4c
2018-10-18 14:56:28 -06:00
Jeff Sharkey
4e5efa3186 Convenience method for obtaining thumbnails.
Obtaining a thumbnail for a Uri requires opening it with the slightly
obscure openTypedAssetFileDescriptor(), passing in "image/*" with the
right Bundle of EXTRA_SIZE to hint the target area on screen, and
defensively scaling any returned results.

This is pretty tedious to get right, so offer a convenience method
that does all this for the developer.  Internally uses ImageDecoder
to follow best-practices, and replaces older getDocumentThumbnail()
implementation by delegating to this one.

A future CL will teach ImageDecoder about how to read any embedded
EXIF thumbnails, including any required rotation.

Bug: 111268862
Test: atest FrameworksCoreTests:android.content.ContentResolverTest
Change-Id: I5c9c09ddf9b480f3b5c6ade0a078cccb68de2f2b
2018-10-18 14:32:51 -06:00
TreeHugger Robot
a02e61107f Merge "Temporarily revert device identifier access check to previous behavior" 2018-10-18 15:59:18 +00:00
Michael Groover
9db22c7a89 Temporarily revert device identifier access check to previous behavior
If a calling package does not meet the new requirements for device identifier
access the calling package and method will be logged and the previous
READ_PHONE_STATE permission check will be performed to grant access to the
requested identifier. This is to prevent additional breakage for apps that
currently require device identifiers but have not yet been granted the
privileged permission or carrier privileges.

Bug: 117585389
Test: cts-tradefed run cts -m CtsPermissionTestCases \
      -t android.permission.cts.TelephonyManagerPermissionTest
Test: Manually invoked an app targeting pre-Q and verified access
      to device identifiers with the READ_PHONE_STATE permission.

Change-Id: I03339486a2d6971b93472479b79959c888beba1e
2018-10-17 18:05:46 -07:00
Matt Pape
ba266c7b7f Merge "Add a new config table to the settings provider for remotely configured parameters. This includes the minimum number of changes necessary to make the table work, but no API surface yet." 2018-10-17 22:02:14 +00:00
Matt Pape
1b31a331b0 Add a new config table to the settings provider for remotely configured parameters. This includes the minimum number of changes necessary to make the table work, but no API surface yet.
Test: local tests

bug: 113100523

Change-Id: I47f89f5e6657a2a347e62cb40924bba4547f7dd9
2018-10-17 09:58:32 -07:00
TreeHugger Robot
38d0bd0634 Merge "Set EXTRA_USER instead of EXTRA_USER_ID for ACTION_SHOW_ADMIN_SUPPORT_DETAILS" 2018-10-17 00:26:37 +00:00
Cody Northrop
ebe6a56f80 Revert "Revert "Rootless GPU Debug for GLES""
This reverts commit 2653e624dc.

Exempt-From-Owner-Approval: This restores a commit that was already
approved and rolled back for unrelated reasons in frameworks/native.

Test: cts-tradefed run singleCommand cts -m CtsGpuToolsHostTestCases
Test: Chromium starts up
Test: CtsDeqpTestCases:include-filter:dEQP-EGL.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES2.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES3.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES31.*
Bug: 110883880
Bug: 117609555
Change-Id: Iab23a5d598986ba34c0ba62dc78299d022924cd9
2018-10-16 18:51:28 +00:00
Cody Northrop
2653e624dc Revert "Rootless GPU Debug for GLES"
This reverts commit f41625936f.

Exempt-From-Owner-Approval: Reverting
Bug: 110883880
Test: Chrome no longer crashes
Change-Id: I70c9d4a0376b27059e7759e1b6283903c0cf168b
2018-10-12 21:34:15 +00:00
Philip P. Moltmann
c54c36dcc7 Set EXTRA_USER instead of EXTRA_USER_ID for ACTION_SHOW_ADMIN_SUPPORT_DETAILS
Test: Built
Bug: 116798569
Change-Id: I60e8e9613c20d860ff8fda682e9f754ee66dcbef
2018-10-10 15:51:47 -07:00
Cody Northrop
f41625936f Rootless GPU Debug for GLES
This commit adds the ability to enable debug layers for OpenGL ES.

Similar to Rootless Debug for Vulkan, layers can be loaded from the
APK or base directory of selected debuggable applications.

Layers will only be loaded when developers opt-in via settings for a
target application.

A separate application can now be specified as an additional location
for layer discovery.

Example usage:

  adb shell settings put global enable_gpu_debug_layers 1
  adb shell settings put global gpu_debug_app <target_app>
  adb shell settings put global gpu_debug_layers layer1.so:layer2.so
  adb shell settings put global gpu_debug_layer_app <layer_app>

Test: cts-tradefed run singleCommand cts -m CtsGpuToolsHostTestCases
Bug: 110883880
Change-Id: I16df1951be0c06c80a445991e3e6d1636222b17b
2018-10-10 14:50:25 -06:00
sqian
241c69b1ce Merge "Add Call Redirection Default Application in Settings" am: b7c0727c15 am: 936791f536
am: 846b2d1920

Change-Id: Ib86bc25d77275a814752bad4f0d2800182ab150b
2018-10-09 12:00:01 -07:00
sqian
846b2d1920 Merge "Add Call Redirection Default Application in Settings" am: b7c0727c15
am: 936791f536

Change-Id: Ibf6554de156ec0e4d7fa9dc46eb8eee216857188
2018-10-09 11:47:46 -07:00
sqian
936791f536 Merge "Add Call Redirection Default Application in Settings"
am: b7c0727c15

Change-Id: Iae885868a4e985822eac0e4134b16224ee8237f6
2018-10-09 11:36:25 -07:00
Treehugger Robot
b7c0727c15 Merge "Add Call Redirection Default Application in Settings" 2018-10-09 18:06:05 +00:00
sqian
97b6b00255 Add Call Redirection Default Application in Settings
Bug: 64959558
Test: compile
Change-Id: Iddac4d5b202db5a88aa82fd9ea4df89544b94b71
2018-10-08 16:38:41 -07:00