Commit Graph

8150 Commits

Author SHA1 Message Date
TreeHugger Robot
b502f1718c Merge "Adds queries tag to manifest" 2019-07-25 13:38:34 +00:00
Patrick Baumann
a4ffb4567e Adds queries tag to manifest
This change adds support for a new <queries> tag as a child of the
<manifest> tag, allowing a package to declare the intents it intends to
use to query for other apps on device.

Bug: 136675067
Test: build and boot
Change-Id: Ic8b40cabddee4b6404c220901efeaae680661c0c
2019-07-24 15:24:03 -07:00
Jack Yu
be3a809735 Merge "Create feature flags for OMAPI readers supportiveness" am: 65e73f09fd am: 3e2865f585 am: 4fffc3ebd8 am: 649b9abeb9
am: f7b43be529

Change-Id: I420f4f8336fd554e7276305c8dd85c020dacd80e
2019-07-24 07:45:34 -07:00
Jack Yu
4fffc3ebd8 Merge "Create feature flags for OMAPI readers supportiveness" am: 65e73f09fd
am: 3e2865f585

Change-Id: I1c86601d6ee02619ee0d0cdad7cefd51e2a95989
2019-07-24 07:17:16 -07:00
Jack Yu
3e2865f585 Merge "Create feature flags for OMAPI readers supportiveness"
am: 65e73f09fd

Change-Id: I72b65959dab75fcca8566d6eecd7a730ef044d94
2019-07-24 07:02:39 -07:00
Treehugger Robot
65e73f09fd Merge "Create feature flags for OMAPI readers supportiveness" 2019-07-24 13:33:45 +00:00
Jack Yu
18c7630c3d Create feature flags for OMAPI readers supportiveness
Bug: 131062577
Test: CTS OMAPI
Change-Id: I20c1159489ea0bd5cc9fb651914d6bfd2a6b25ca
2019-07-23 17:38:13 +08:00
Mathew Inwood
3020e050d0 resolve merge conflicts of 9acd72c60b to stage-aosp-master
Bug: None
Test: TH
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I5bc6b8c20bda03b3760f13f747b1e2069bfd9ac1
2019-07-22 09:29:24 +00:00
Varun Shah
10909fd386 Merge "Add OnSharedPreferencesClearListener for Editor#clear." 2019-07-20 10:51:01 +00:00
Eric Jeong
e7ead1ba88 Add isHeadlessSystemUserMode() to UserManager
- isHeadlessSystemUserMode() returns whether the device is running with
headless system user (go/multi-user-headless-user0)
- RoSystemProperties.MULTIUSER_HEADLESS_SYSTEM_USER is replaced by
isHeadlessSystemUserMode()

Bug: 137755681
Test: Bluetooth service and Network policy manager should work fine with
headless system user. A profile user should be created with headless
system user.

Change-Id: Ic48d98426f7a5ea47dde2008ae51f78855f622e6
2019-07-19 15:10:04 -07:00
Shafik Nassar
963c5337c8 Merge "Make setRequestDowngrade @TestApi" 2019-07-19 08:42:32 +00:00
Mathew Inwood
be2b0a71d7 Compatibility API implementation for app processes.
Pass the set of disabled changes from the system server into the app in the
bindApplication() call. Use this to instantiate an implementation of
Compatibility.Callbacks() to implement the API.

Test: Manual.
Bug: 135010838
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I2fcf25264c62acc801f9e62967072cd04e4641e7
2019-07-18 15:50:26 +00:00
Mohammad Samiul Islam
8df6f16038 Merge "Add .apex suffix to apex files during validation" 2019-07-18 13:09:11 +00:00
Mathew Inwood
a1b39023d8 Compatibility API implementation for app processes.
Pass the set of disabled changes from the system server into the app in the
bindApplication() call. Use this to instantiate an implementation of
Compatibility.Callbacks() to implement the API.

Test: Manual.
Bug: 135010838
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I2fcf25264c62acc801f9e62967072cd04e4641e7
2019-07-18 11:09:29 +01:00
TreeHugger Robot
c3edd4a600 Merge changes from topic "providers"
* changes:
  Move few remaining permission methods
  Move providers to permission manager
2019-07-18 01:06:34 +00:00
Eric Jeong
6c8693e5dc Merge "Add condition to check if a user can have profile user" 2019-07-18 00:21:47 +00:00
Todd Kennedy
c5b0e860a4 Move few remaining permission methods
This should be the last method movement. More work needs to
happen with the intenral APIs between the permission manager
and the package manager. There is still a lot of package
manager internal logic inside the permission manager.

Bug: 135279435
Test: atest PermissionUpdateListenerTest
Test: atest android.content.pm.cts.PackageManagerTest
Test: atest android.permission2.cts.RestrictedPermissionsTest
Change-Id: Iec118d198cb4ce3c4789991ddbdd2928dbc4bf6f
2019-07-17 15:29:42 -07:00
TreeHugger Robot
89a82157ab Merge "Remove @Deprecated && @removed method in ClipData." 2019-07-17 20:18:16 +00:00
Eric Jeong
da1aa8f747 Add condition to check if a user can have profile user
- In Auto, headless system user is used, instead of split system user.
- When a profile user is being created based on a normal user, the normal
user should not be a system user if headless system user is enabled.
- We could consider defining isHeadlessSystemUser in UserManager.

Bug: 137195727
Test: Creating profile user in Android Auto should work in hawk_md
environment.

Change-Id: I47192d8f92320296d4220ded285a36b376e6d971
2019-07-17 16:55:55 +00:00
Mathew Inwood
085b1a5c44 Merge "Compatibility API implementation for app processes." 2019-07-17 14:07:41 +00:00
Jeongik Cha
168267660f Merge changes from topic "system_ext"
* changes:
  Consider overlay in system_ext as system's
  Support /system_ext partition
2019-07-17 10:24:58 +00:00
Todd Kennedy
583378df9c Move providers to permission manager
Bug: 135279435
Test: atest PermissionUpdateListenerTest
Test: atest android.content.pm.cts.PackageManagerTest
Test: atest android.permission2.cts.RestrictedPermissionsTest
Test: atest TeleServiceTests
Test: atest DataConnectionTest
Change-Id: Ife563589929b2662c60e1a0ab0ec8f6a2d7e4c12
2019-07-16 13:09:33 -07:00
Jeff Sharkey
ee50d80842 Merge "Detailed ContentProvider permissions checks." 2019-07-16 15:03:32 +00:00
Mathew Inwood
80652db77e Compatibility API implementation for app processes.
Pass the set of disabled changes from the system server into the app in the
bindApplication() call. Use this to instantiate an implementation of
Compatibility.Callbacks() to implement the API.

Test: Manual.
Bug: 135010838
Change-Id: I2fcf25264c62acc801f9e62967072cd04e4641e7
2019-07-16 11:58:49 +01:00
Brad Ebinger
55f7a2c065 Merge "Make RcsMessageStore a top level API" am: bac258f22e am: 53f6c34039 am: 36cc070c24
am: 545a4c369e

Change-Id: I8588b6035f16ed52da6b5e61675a266998e748a1
2019-07-12 15:33:27 -07:00
Brad Ebinger
36cc070c24 Merge "Make RcsMessageStore a top level API" am: bac258f22e
am: 53f6c34039

Change-Id: Id6eba925aef3a1af812039372bf5e2e87fcbb35e
2019-07-12 15:01:58 -07:00
Brad Ebinger
53f6c34039 Merge "Make RcsMessageStore a top level API"
am: bac258f22e

Change-Id: If235ead8a75dc080e1e129d83bf7f24c3c996d8c
2019-07-12 14:53:26 -07:00
Brad Ebinger
bac258f22e Merge "Make RcsMessageStore a top level API" 2019-07-12 21:40:40 +00:00
TreeHugger Robot
ad98910522 Merge "Check resource type, not directory for colors" 2019-07-12 20:45:54 +00:00
Jeff Sharkey
9edef25ede Detailed ContentProvider permissions checks.
The new MediaProvider design has an internal dynamic security model
based on the value stored in OWNER_PACKAGE_NAME, so the OS always
needs to consult the provider when resolving Uri permission grants.

Blocking calls from the system process like this are typically
discouraged, but this is the best we can do with the limited time
left, and there is existing precident with getType().

For now, use "forceUriPermissions" as a proxy for determining when
we need to consult the provider directly.

Bug: 115619667
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I1d54feeec93fbb4cf5ff55240ef4eae3a35ed068
2019-07-12 09:27:41 -06:00
Mohammad Samiul Islam
ad7e270673 Add .apex suffix to apex files during validation
Previously, the apex file being installed was moved into the staging
directory as same name provided during installation, due to which, when
the source apex file of installation did not have .apex suffix in its
file name, it failed validation in apexd. Now, if an apex file does not
have proper suffix, it will be concatenated during validation in
PackageInstallerSession.

Bug: 124837227
Test: atest CtsStagedInstallHostTestCases
Test: atest StagedInstallTest#testInstallStagedApexWithoutApexSuffix
Change-Id: Ice41f601dc42736ca0cdf2bad0817f0c00f50648
2019-07-12 11:46:34 +01:00
Brad Ebinger
0e93d73053 Add CAPABILITY_EMERGENCY_PREFERRED in PhoneAccount
Allow Telephony to mark a SIM PhoneAccount as
emergency preferred, meaning that Telecom will
override a user's PhoneAccount preference for
emergency calls if the PhoneAccount has the
CAPABILITY_EMERGENCY_PREFERRED capability.

Bug: 131203278
Test: Manual testing, Telecom/Telephony unit testing
Merged-In: If70d917cfb3d825f375d282012b8788d69a2f144
Change-Id: I88b8bbfa444f5445b2f0d6a1542c6406a19b240f
2019-07-11 17:55:37 -07:00
Todd Kennedy
c971a45e65 Move grant/revoke permission APIs
These were the last few APIs that used the permission callback.
Completely remove it from the package manager and full implement
in the permission manager.

Bug: 135279435
Test: atest PermissionUpdateListenerTest
Test: android.content.pm.cts.PackageManagerTest
Test: android.permission2.cts.RestrictedPermissionsTest
Change-Id: Iab7c20215c907f4718f78a98fb96afec9fef6780
2019-07-11 14:14:02 -07:00
Todd Kennedy
7e3dd3afe2 Move whitelist permissions to permission manager
Also while doing this, it made sense to move the permission change
listener to the permission manager [it resulted in fewer hacks to
get the two sides to talk to one another].

Bug: 135279435
Test: atest PermissionUpdateListenerTest
Test: android.content.pm.cts.PackageManagerTest
Test: android.permission2.cts.RestrictedPermissionsTest
Change-Id: Ie08701dfe999cd435335103f4b4daeaa0b31ef10
2019-07-11 14:14:02 -07:00
Todd Kennedy
ca1ea17a3e Move check permission methods
Bug: 135279435
Test: atest android.content.pm.PackageManagerTests
Test: atest CtsCameraApi25TestCases
Change-Id: Id96093e4106edcd5302fd8aaa020d1ab83f68258
2019-07-11 14:14:02 -07:00
Todd Kennedy
230c0a7e60 Move permission flag methods
Bug: 135279435
Test: atest android.content.pm.cts.PackageManagerTest
Test: atest android.permission2.cts.RestrictedPermissionsTest
Change-Id: I3a5a7d8d3a3ba9d0b3e0e62d178a18903a94ec26
2019-07-11 14:13:53 -07:00
Nate Myren
1a8d1110c0 Merge "Permission flag updates now notify listeners" 2019-07-10 16:03:07 +00:00
Mathew Inwood
2be379300d Merge "Add trackingBug to API used by chromium vebview." am: c25ad64386 am: 53507c3423 am: 737a7a0e4f
am: b6bb42b7b8

Change-Id: Idf261a366b38172a61649c0e72a51f99e6443840
2019-07-10 07:01:36 -07:00
Mathew Inwood
737a7a0e4f Merge "Add trackingBug to API used by chromium vebview." am: c25ad64386
am: 53507c3423

Change-Id: Iaa8be1cd02acfb8b271179aba0a2ceef2cd87e56
2019-07-10 06:39:08 -07:00
Mathew Inwood
53507c3423 Merge "Add trackingBug to API used by chromium vebview."
am: c25ad64386

Change-Id: I45a07ef1d02e4c18dc63bc3333bb0fcf40aa9da5
2019-07-10 06:27:13 -07:00
Treehugger Robot
c25ad64386 Merge "Add trackingBug to API used by chromium vebview." 2019-07-10 12:59:59 +00:00
TreeHugger Robot
b5f6854778 Merge "Fix potential double destroy of AssetManager" 2019-07-10 04:56:18 +00:00
TreeHugger Robot
f59b0456ef Merge "Re-hide ApplicationInfo.volumeUuid." 2019-07-10 01:38:30 +00:00
Ashley Rose
43f7c8ee54 Check resource type, not directory for colors
Previously, Resources#getDrawable() would fail when trying to load a
ColorStateListDrawable from a ColorStateList defined in a resources
directory with a qualifier.

Bug: 137141830
Test: atest android.content.res.cts.ResourcesTest
Change-Id: I2ad57dd7cfa30de64653805d4ea209388ff90f41
2019-07-09 20:14:17 -04:00
Jeongik Cha
9ec059ac1d Support /system_ext partition
This commit is mainly from I7a6a30bf8e8db9f2738594d187bb9148f138b8da, so
test cases and features are mostly same.

We change product_services partition name to "system_ext" because this
partition's purpose changes.

 - installing a RRO package for framework from /system_ext/overlay
 - installing apps from /system_ext/app
 - installing priv-apps from /system_ext/priv-app
 - installing permissions from
   /system_ext/etc/[default-permissions|permissions|sysconfig]

Bug: 134359158
Test: `mma` under frameworks/base/tests/[libs|privapp]-permissions
      adb sync && adb reboot
      adb shell cmd package list libraries
        => confirmed com.android.test.libs.system_ext library
      adb shell cmd package dump \
        com.android.framework.permission.privapp.tests.system_ext
        => confirmed that the package is a priv-app

Change-Id: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
2019-07-09 23:55:37 +09:00
Nikita Ioffe
0ad641f9f6 Merge "Rename ApexInfo.package{Name,Path} to module{Name,Path}" into stage-aosp-master
am: 6a36ad8b7e

Change-Id: Idabee06e646addd278b0f47224da9a6401a81036
2019-07-04 08:48:49 -07:00
Nikita Ioffe
f585ed0459 Use ApexInfo.moduleName
See another CL in the topic

Bug: 132428457
Test: builds
Change-Id: I87ba3fb539d0761c515adc8e2d2acc8dfc5e6a9a
Merged-In: If0bd3d368c7373ab0028211a8a4246a9821893af
2019-07-04 15:46:08 +00:00
Mathew Inwood
7bcc174a0e Add trackingBug to API used by chromium vebview.
Bug: 136728678
Test: m
Change-Id: Ia7ff4b258ac24d6ebd165be3f294fc1500cc7fb6
2019-07-04 11:42:48 +01:00
Riddle Hsu
cfa2284cd8 Fix potential double destroy of AssetManager
Assume there is a XmlBlock [X] created by a AssetManager [A]
([A] will have mNumRefs = 2). After [A].close is called
(mNumRefs = 1) and then both [X] and [A] are going to be GCed,
if [A].finalize is called first (nativeDestroy), the later
[X].finalize will invoke [A].xmlBlockGone that triggers the
second nativeDestroy of [A] and leads to crash.

By clearing the mObject in AssetManager.finalize, the
decRefsLocked from other paths won't call nativeDestroy again.

Bug: 136721562
Test: atest AssetManagerTest
Test: Build and install CorePerfTests
      adb shell am instrument -w -r --no-hidden-api-checks -e class \
      android.app.ResourcesPerfTest#getLayoutAndTravese,android.graphics.perftests.RenderNodePerfTest \
      com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner

Change-Id: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
2019-07-04 16:10:08 +08:00
TreeHugger Robot
f10a78ceaf Merge changes from topic "perm_query"
* changes:
  Move add/remove permission
  Move permission info queries
2019-07-03 19:46:44 +00:00