Commit Graph

21232 Commits

Author SHA1 Message Date
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
Courtney Goeltzenleuchter
d49325370b Merge "Make EGL15 class final" 2018-10-26 14:03:26 +00:00
Brad Ebinger
4b81463736 Merge "ImsSsData needs a public constructor for vendors to use" am: a1474266bf am: 207b9dcfbf
am: ee7267f8dd

Change-Id: Ia9ca9493a802b5e79ee7337ddb308b3dd4883114
2018-10-25 20:45:24 -07:00
Tony Zhu
065b19e137 Merge "[Call Screening]Support for carrier call screening app" am: ee31b2214d am: 3cde670dd3
am: 3403275a85

Change-Id: I6a9215503805b6aa42052e42ed0044b9d282ebb6
2018-10-25 20:30:56 -07:00
Hall Liu
0b9ebf1d44 Merge "Add test API to override carrier config" am: a82f952fe7 am: 657e2a925d
am: 19c6fd5ab1

Change-Id: Ie243b230d3f6d8aca5c292ee497d9e4dc060aec0
2018-10-25 19:39:19 -07:00
Nathan Harold
1be1fa0be0 Merge "Add getMobileNetworkOperator to CellIdentityTdscdma" am: ac87c0a884 am: 8dc36336d5
am: 7695b94e10

Change-Id: I2b6a3753b8aaf9e420f114e1c6acc227b38ba8a4
2018-10-25 19:32:53 -07:00
Tyler Gunn
1af91e3de8 Merge "Re-add removed APIs per API council feedback." am: a94a71af13 am: 7085118cfc
am: db0e0f8c57

Change-Id: If4d0ac8815596756774445c558a9456968c4e990
2018-10-25 18:55:47 -07:00
Jeff Sharkey
da3b55a122 Merge "Reroute Uri conversions though MediaProvider." 2018-10-25 16:57:59 +00:00
John Reck
fcf14cfd94 Merge "Add theme & View API to control force-dark" 2018-10-25 16:35:10 +00: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
Brad Ebinger
ee7267f8dd Merge "ImsSsData needs a public constructor for vendors to use" am: a1474266bf
am: 207b9dcfbf

Change-Id: Ia47462edc30809ca90f2955eeef87b0d4ba32a80
2018-10-24 17:59:39 -07:00
Youming Ye
e937fd1ad3 Merge "Revert "Add CarrierConfig to hide "Network default" option in Caller ID setting"" am: 94fe6430ea
am: 555090d597

Change-Id: Id8eb4dee3f864c939226321fce5189d43044d1c5
2018-10-24 17:41:46 -07:00
Tony Zhu
3403275a85 Merge "[Call Screening]Support for carrier call screening app" am: ee31b2214d
am: 3cde670dd3

Change-Id: Ibf5b6439d695a5cf6e2d08422370b26a165012da
2018-10-24 17:25:19 -07:00
Hall Liu
19c6fd5ab1 Merge "Add test API to override carrier config" am: a82f952fe7
am: 657e2a925d

Change-Id: Ic93a7e349e412c84d2c3752d9fe1911e42c08ceb
2018-10-24 16:33:18 -07:00
Nathan Harold
7695b94e10 Merge "Add getMobileNetworkOperator to CellIdentityTdscdma" am: ac87c0a884
am: 8dc36336d5

Change-Id: Ic7d0e0bc7c52a6689fb88e27f5f6d5aa6c75869e
2018-10-24 16:28:49 -07:00
Jean-Michel Trivi
03f51393d8 Offload support for android.media.AudioTrack
Unhide AudioManager method to query whether a given
  format can be offloaded on the device.
Unhide AudioTrack.Builder method to request offload.
Unhide callback for new AudioTrack events and
  associated methods.
Implement registration and callback for stream events.
JNI: configure native AudioTrack for offload.
Remove unused imports.

Bug 113352077
Bug 86837964
Test: "make offline-sdk-docs" and "adb shell clof --source /sdcard/Music/my.mp3"

Change-Id: I565668913076a57ea2c444f1f9268b21024ccde0
2018-10-24 16:10:04 -07:00
Tyler Gunn
db0e0f8c57 Merge "Re-add removed APIs per API council feedback." am: a94a71af13
am: 7085118cfc

Change-Id: Idecba0bbaed7b05dc02ec86788268bc8b945963a
2018-10-24 16:09:16 -07:00
John Reck
a2d20b447a Add theme & View API to control force-dark
Bug: 102591313
Test: CTS android.uirendering.cts.testclasses.ForceDarkTests

Change-Id: I6ba129681aed8e2f3f1b1ac60d458bb5f5393e9b
2018-10-24 10:17:20 -07:00
Brad Ebinger
a1474266bf Merge "ImsSsData needs a public constructor for vendors to use" 2018-10-24 17:08:39 +00:00
Youming Ye
94fe6430ea Merge "Revert "Add CarrierConfig to hide "Network default" option in Caller ID setting"" 2018-10-24 16:26:21 +00:00
Tony Zhu
ee31b2214d Merge "[Call Screening]Support for carrier call screening app" 2018-10-24 15:51:48 +00:00
Courtney Goeltzenleuchter
986992f2cd Make EGL15 class final
Updates from API review feedback.
Bug: 118296391
Test: manually inspect code

Change-Id: If79f03497e77dfce65909a734bafbb6e08c39155
2018-10-24 09:25:55 -06:00
Hall Liu
a82f952fe7 Merge "Add test API to override carrier config" 2018-10-24 00:00:22 +00:00
Nathan Harold
ac87c0a884 Merge "Add getMobileNetworkOperator to CellIdentityTdscdma" 2018-10-23 23:34:26 +00:00
Brad Ebinger
4123f9587d ImsSsData needs a public constructor for vendors to use
Expose Builder for IMS Supp Service APIs as well as clean
up some of the ambiguous int[] usage.

Bug: 117555643
Test: Manual
Change-Id: I5cad08e0a032f4e38a62ac033c01111319cf9fd5
2018-10-23 14:57:59 -07:00
Hall Liu
e5b1fda883 Add test API to override carrier config
Add API surface and AIDL to enable override functionality for CTS

Change-Id: I55328a75f16fe91280530dd348d4a034694be6e9
Fixes: 118184943
Test: manually call api through shell cmd
2018-10-23 13:14:36 -07:00
Courtney Goeltzenleuchter
c9ef3d91e7 Merge "Add EGL15: eglCreateImage, eglDestroyImage" 2018-10-23 17:19:25 +00:00
Joel Galenson
095513c4d9 Merge "Add a new Intent for seeing permission usages" 2018-10-23 16:35:47 +00:00
Courtney Goeltzenleuchter
6e8c60ccc1 Add EGL15: eglCreateImage, eglDestroyImage
Also change eglCreatePlatformPixmapSurface to throw an
unsupported extension rather than call the native function
which will return an error indicating it's unsupported.

Bug: 80297325
Test: atest CtsGraphicsTestCases:EGL15Test
Change-Id: I94f2d39678515fdacf9b2fccd1c531365930ad1b
2018-10-23 07:44:56 -06:00
Weien Wang
0b8b0ef691 Merge "Add new WallpaperInfo attr settingsSliceUri." 2018-10-23 03:02:21 +00:00
Nathan Harold
d285c8eb20 Add getMobileNetworkOperator to CellIdentityTdscdma
For consistency with CellIdentityLte, Wcdma, and Gsm
adding this function. It will aid in future refactors
to possibly create a common interface for these classes.

Bug: 111808089
Test: compilation
Change-Id: Ia6b21bcc368089d8346951ae9476e7eb12a05130
2018-10-22 15:31:08 -07:00
Tyler Gunn
1c285f0ac2 Re-add removed APIs per API council feedback.
Some APIs were removed erroneously in the Q release; these methods were
just deprecated in Q,

Test: Make API, build
Bug: 116801893
Change-Id: I38ddf8bcd9fe39f4ba50bc892ac2f6d20209f7a9
2018-10-22 14:26:19 -07:00
Seigo Nonaka
04aad28f16 Merge "Introduce FontStyle for future extensibility" 2018-10-22 19:29:45 +00:00
Julia Reynolds
48a6ed99f8 Additional functionality for the noti asst
- Allow apps to learn if users chose the importance of a given
channel
- Allow the asst to query channels and channel groups of installed
apps

Change-Id: Ic65dfdc79d5135940c1debb101b849b5837d78b5
Fixes: 118140597
Test: runtest systemui-notification
2018-10-22 12:52:03 -04:00
Weien Wang
4710c04e1f Add new WallpaperInfo attr settingsSliceUri.
Add settingsSliceUri attribute for supporting live wallpaper inline-
control, public for AOSP live wallpaper to use.

Bug: 117200693
Test: atest tests/Internal/src/android/app/WallpaperInfoTest.java

Change-Id: Iffe9fbd9f49daf8a63d5745f91532de13b7288e3
2018-10-22 14:16:55 +08:00
Jeff Sharkey
d2b64d7018 Add ContentProvider.clearCallingIdentity().
ContentProvider has a getCallingPackage() method, which verifies
the remote package name against the current Binder identity.  When a
provider wants to clear that IPC identity, they need to clear both
the Binder state and the ContentProvider.getCallingPackage() state
together, so add methods to facilitate that.

Also fix subtle bug so we don't try translating relative paths.

Bug: 117627072
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ifa3e1f745334abf625fdcc314b308a047c49ce73
2018-10-20 15:14:22 -06:00
Seigo Nonaka
9958c4ab21 Introduce FontStyle for future extensibility
This is a ground work for b/114479228
FontStyle is an argument of the font itemization. Currently Android
system uses weight and italic info for itemizing but maybe we will
use width and oblique style in future.
To be extensible in future, introduce FontStyle.

This CL includes:
- new class FontStyle which holds width and italic at this moment. In
  future, we may add width and oblique. (or grdual italic slant)
- Font class still returns weight/slant since they need to be immutable.
- Moved font weight constants from Font to FontStyle

Bug: 114479228
Test: atest CtsGraphicsTestCases
Change-Id: I0ba717fbf9f90ee6f760c1a0f6eda17b4bef6f43
2018-10-19 14:51:59 -07:00
Youming Ye
cbd0cca984 Revert "Add CarrierConfig to hide "Network default" option in Caller ID setting"
This reverts commit 187c9943ff.

Reason for revert: Slipped off master. Revert and try put it back.

Change-Id: I5823566523346c943c14e91848e7d5de9c14d68d
2018-10-19 21:34:27 +00:00
Brad Ebinger
1f69fd6899 Merge "Expose the empty MmTelCapabilities constructor" am: 7fff7e5eff am: 4e63b90a3b
am: 6984c36cc0

Change-Id: I4fbda78af72724c96ba8d4ec8dfe104f085d5d79
2018-10-19 14:16:22 -07:00
Brad Ebinger
6984c36cc0 Merge "Expose the empty MmTelCapabilities constructor" am: 7fff7e5eff
am: 4e63b90a3b

Change-Id: Iad80098eda2635ea490929e3bab84e7575b08c59
2018-10-19 13:54:58 -07:00
Haoyu Zhang
0a04650e51 Merge "Add textLocale attributes to TextView and TextAppearanceSpan" 2018-10-19 20:30:02 +00:00
chen xu
7f3258ac83 Merge "correct the definition of LISTEN_RADIO_POWER_STATE_CHANGED" am: 2c10a29eaa
am: fd6cccc775

Change-Id: I45f482ad6b57cc3ff7c5f125f5f98f748f54063c
2018-10-19 13:26:32 -07:00
Brad Ebinger
7fff7e5eff Merge "Expose the empty MmTelCapabilities constructor" 2018-10-19 20:20:14 +00:00
Chen Xu
39f0965925 Merge "new SystemAPI for setCarrierDataEnabled" am: 7dd38c2115
am: 6ec00c2584

Change-Id: I83fa3369a48b9cc6bfe962f2ae101f06709793ae
2018-10-19 13:16:05 -07:00
Treehugger Robot
2c10a29eaa Merge "correct the definition of LISTEN_RADIO_POWER_STATE_CHANGED" 2018-10-19 19:19:26 +00:00
Chen Xu
3e2deae2fd Merge "expose some Telephony.Carriers cols system APIs" am: f2e0f57976 am: bb0689b6d5
am: 76819cc048

Change-Id: Ie98dd2591f8f83d00751a6e78af54c06b75314d7
2018-10-19 11:55:25 -07:00
Chen Xu
7dd38c2115 Merge "new SystemAPI for setCarrierDataEnabled" 2018-10-19 18:47:27 +00:00
Chen Xu
76819cc048 Merge "expose some Telephony.Carriers cols system APIs" am: f2e0f57976
am: bb0689b6d5

Change-Id: I39fa9903ca0b3709fe420f80cfa0a3ae32a28537
2018-10-19 11:29:43 -07:00
chen xu
b591f9d2dd correct the definition of LISTEN_RADIO_POWER_STATE_CHANGED
keep the value same as master

Bug: 117930373
Test: telephony unit test
Change-Id: I0bad21eeed2b4667fbb781253828b99332103b31
Merged-in: Id170063bfdb1e3325f67e8680231ab4deda7d65d
2018-10-19 18:18:39 +00:00
Joel Galenson
13096ea738 Add a new Intent for seeing permission usages
This intent is used by the Permissions Hub.

We also give PermissionController the GET_APP_OPS_STATS permission.

Bug: 63532550
Test: Used the Permissions Hub.
Change-Id: If1254f67c12fc5052d6ad5ff8260778a7c59dccc
2018-10-19 10:56:21 -07:00