Commit Graph

8775 Commits

Author SHA1 Message Date
Oli Lan
14f52544cd Merge "Allow ModuleInfo to be retrieved using apex name." 2020-01-22 16:04:36 +00:00
TreeHugger Robot
892e8d8767 Merge "Reset unset app-ops when the admin sets cross-profile packages." 2020-01-22 15:23:02 +00:00
Oli Lan
425dd66c95 Merge "Add ApexContext API including methods to get paths for data directories." 2020-01-22 14:13:41 +00:00
Alex Kershaw
4b0197d8ba Reset unset app-ops when the admin sets cross-profile packages.
When the admin unsets cross-profile packages, reset the
INTERACT_ACROSS_PROFILES app-op back to the default if it is no longer
configurable by the user.

Other minor changes:
- Remove the explicit app-op permission check from
setInteractAcrossProfilesAppOp, since AppOpManager performs that check
when required.
- Fix the broadcasting logic in CrossProfileAppsServiceImpl to correctly
set the component and flags.

Bug: 136249261
Bug: 148010178
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.ManagedProfileCrossProfileTest
Change-Id: Ib8b5f331fb92fc475bc95ad039adf93fac04da37
2020-01-22 13:20:24 +00:00
Alex Kershaw
709517e805 Merge "Add CrossProfileApps#startActivity which takes an Intent." 2020-01-22 07:37:03 +00:00
TreeHugger Robot
eba268395e Merge "Adds a feature flag for Context Hub" 2020-01-22 03:02:58 +00:00
TreeHugger Robot
46b3b3c0c1 Merge "Adding API to check if an icon returned by PackageManager is a fallback icon" 2020-01-22 03:02:07 +00:00
Sunny Goyal
77a2416924 Adding API to check if an icon returned by PackageManager
is a fallback icon

Bug: 141588119
Test: atest PackageManagerTest
Change-Id: I9ae5a74dd0b0c0c49a078d46914986ecb0d27a94
2020-01-21 16:17:49 -08:00
Arthur Ishiguro
05911ee0e9 Adds a feature flag for Context Hub
Bug: 147677675
Test: Compile only
Change-Id: I4d5aa236d86c69605f058e50a4af9db15d04b346
2020-01-21 14:55:00 -08:00
Daniel Bright
e9a4f02315 Merge "Changed ApnSetting mappings to constants" 2020-01-21 21:39:38 +00:00
Jonathan Scott
d72fc8d3db Add CrossProfileApps#startActivity which takes an Intent.
Test: atest com.android.cts.devicepolicy.CrossProfileAppsHostSideTest
Bug: 136249261
Change-Id: I2735dc480126daf457cc1fd09bbeae243d4e3db0
2020-01-21 20:10:36 +00:00
Hui Yu
89582facba Merge "Add new foreground service type camera and microphone." 2020-01-21 18:02:02 +00:00
Kholoud Mohamed
aa85de1781 Merge "Teach permission checker about appop permissions" 2020-01-21 13:39:02 +00:00
TreeHugger Robot
9fdebc8c9e Merge "Reserving an API EXTRA for Data Loader Type in installation." 2020-01-21 13:30:59 +00:00
Oli Lan
407e7ba6df Add ApexContext API including methods to get paths for data directories.
This adds a new ApexContext class as a system API. Methods are included to
obtain paths to the APEX data directories.

In future the aim is for this ApexContext to be provided to code running
within an APEX automatically, so that data directory paths are available
only to the APEX that should access them. For R it is not feasible to
implement this, so for now a factory method is included to create an
ApexContext from the apex (module) name.

See go/apex-context-r for more information.

Bug: 141148175
Bug: 142484007
Test: ApexContextTest added
Change-Id: Iaf90e12383aa219a73a7818dab6cde6a850597ba
2020-01-21 12:20:01 +00:00
kholoud mohamed
30bf54729b Teach permission checker about appop permissions
Changed APIs in PermissionChecker to check if the permission is an appop
permission or a runtime permission and treat it accordingly.

BUG: 140728653
BUG: 136249261
Test: atest PermissionCheckerTest

Change-Id: I742dad5b0e1e9cd65920f0366f1887ab33959f5b
2020-01-21 11:57:58 +00:00
Galia Peycheva
990e8827f0 Merge "Parse minimal post processing xml attribute into ActivityInfo" 2020-01-21 07:23:09 +00:00
Hall Liu
6392e2548d Merge "Add system service for accessing SystemConfig" 2020-01-20 21:34:28 +00:00
Alex Buynytskyy
870b8f9ee5 Reserving an API EXTRA for Data Loader Type in installation.
Test: atest PackageManagerShellCommandTest SplitTests
Bug: b/136132412 b/133435829
Change-Id: I6489be41f8cd61abca2c8a75d39f543f5f23cc92
2020-01-20 12:28:08 -08:00
Galia Peycheva
501b621388 Parse minimal post processing xml attribute into ActivityInfo
Bug: 135116095

Test: m && ./vendor/google/tools/flashall && atest
      CtsWindowManagerDeviceTestCases:MinimalPostProcessingTests

Change-Id: I81179d24ae0b8761fb31655ca242756cbb9e0a26
2020-01-20 19:35:10 +01:00
Alex Buynytskyy
354d6697cd Remove validation of APKs on transfer.
It's unnecessary as it will be done on commit anyway.
This allows to make transfer simple and blocking.

Test: atest PackageManagerShellCommandTest
Bug: b/136132412

Change-Id: Ib017c6dc8a845a7d72898b0c0032c17932375c96
2020-01-20 05:54:40 +00:00
Daniel Bright
d47f1c439d Changed ApnSetting mappings to constants
* Changed ApnSetting to use constants instead of hardcoded strings for clarity.
* Made isDataCapable a public api.
* Removed feature flag android.hardware.telephony.data and opted for a resource
config setting instead.

Bug: 146206136
Test: FrameworkBaseTests, FrameworkOptTests
Change-Id: I19ac83f5865e8763cd9414c41d4609f79d0db164
2020-01-19 14:05:46 -08:00
Oli Lan
8ebc043167 Allow ModuleInfo to be retrieved using apex name.
This adds the apex name (a.k.a. apex module name) to ModuleInfo, and adds a
flag to allow the apex name to be used when calling getModuleInfo.

The existing ModuleInfoFlags was only used for getInstalledModules, so it
has been renamed accordingly.

See go/apex-package-info-discovery

Bug: 141149569
Test: added apex name checks to ModuleInfoProviderTest
Change-Id: I5bcfaa0ef227f3b4eca963e57de4d25c08676c9c
2020-01-18 17:20:35 +00:00
Automerger Merge Worker
9c7b6c8070 Merge "Expose system API EXTRA_REBROADCAST_ON_UNLOCK" am: 027bf28b3a am: 071427f6f6 am: 420b9476dc
Change-Id: Ibcd4b099f99b77a324d6550b2373c38fd2d6c8db
2020-01-18 02:32:35 +00:00
Meng Wang
071427f6f6 Merge "Expose system API EXTRA_REBROADCAST_ON_UNLOCK"
am: 027bf28b3a

Change-Id: I77b80ddd80d2c797d7a492fd361b0d4153c1383a
2020-01-17 18:06:31 -08:00
Treehugger Robot
027bf28b3a Merge "Expose system API EXTRA_REBROADCAST_ON_UNLOCK" 2020-01-18 01:52:58 +00:00
Hui Yu
85679b4d19 Add new foreground service type camera and microphone.
To be used to configure foreground service camera/microphone
while-in-use permission.

For apps with targetSdkVersion R and above, a foreground service
will not be able to access camera/microphone if the foreground service
type is not specified in the manifest and in
android.app.Service#startForeground().

Bug: 136219221
Test: atest android.app.cts.ActivityManagerProcessStateTest

Change-Id: I75c62efca5f07ba1239e21d9a6f6673f822eabba
2020-01-17 16:58:20 -08:00
Meng Wang
13749cb311 Expose system API EXTRA_REBROADCAST_ON_UNLOCK
It's used by system apps - see follow up CL.

Bug: 147912059
Test: make
Change-Id: Id5e803756b8c3235187e13a36b8c197d5269e816
2020-01-17 15:58:04 -08:00
Adrian Roos
72bb1fa6c2 Merge "API: Supress existing inconsistent Context service names"
am: 3b35f3dfef

Change-Id: I93d19a74fc2194b7f088069e3b89a9a28917e54a
2020-01-17 12:48:33 -08:00
TreeHugger Robot
55e4896d52 Merge "Support setting the _PROFILES app-op" 2020-01-17 20:17:37 +00:00
Adrian Roos
df747d155e API: Supress existing inconsistent Context service name, die zweite
Test: make checkapi
Change-Id: Ia1e18570d8ea3c854b615fbaecced768ceb0c728
2020-01-17 16:36:27 +01:00
Adrian Roos
b8cb533fa7 Merge "API: Supress existing inconsistent Context service names" 2020-01-17 12:45:08 +00:00
Adrian Roos
2835792aa7 API: Supress existing inconsistent Context service names
Test: make checkapi
Change-Id: I1f140dc172a405fed52f0f8d6c16f2f730ab89be
Merged-In: I1f140dc172a405fed52f0f8d6c16f2f730ab89be
2020-01-17 12:30:38 +01:00
Adrian Roos
d38f509e90 API: Supress existing inconsistent Context service names
Test: make checkapi
Change-Id: I1f140dc172a405fed52f0f8d6c16f2f730ab89be
2020-01-17 12:21:59 +01:00
Nate Myren
3f26271da4 added methods to @TestApi
Added ActivityManager.switchUser(UserHandle),
Context.startActivityAsUser, and UserHandle.of to
@TestApi

Test: None
Bug: 135282431

Change-Id: Iefbaa3c8f02649dd7d01be3093fa47104b077f58
2020-01-16 22:31:02 +00:00
Anton Hansson
b2f709db1d Add <extension-sdk> manifest tag inside <uses-sdk>
This allows apps to specify the minimum versions they need
of extension sdks, and fails install if they aren't met.

There is additional work required to prevent local rollbacks
from triggering a downgrade of SDK versions after an install.

Bug: 137191822
Test: atest PackageParserTest
Exempt-From-Owner-Approval: PS4 was approved
Change-Id: If61ae6c67ceb752bec6876006a29e52b996901e7
2020-01-16 11:59:52 +00:00
TreeHugger Robot
51ef50530b Merge "PackageManager no longer requires the ExtServices to be a "Shared Library"" 2020-01-16 10:43:40 +00:00
Martin Sundermeyer
8fda7a563c Merge "Add string constants for new Reminder intent." 2020-01-16 09:07:51 +00:00
Xin Li
e13851556b DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Patrick Baumann
e2d9d71c4b Fixes provider authority matching when ';' is used.
Authorities defined in the manifest may support multiple authorities
split by the ';' character. This change adds support for this feature
when calculating visibility.

Bug: 145677500
Test: atest AppSecurityTests
Change-Id: Ifc2ff8ab95ce06502d9bf309c69ccd734526ef94
2020-01-15 23:43:57 +00:00
Evan Severson
4e49a5d0b3 Merge "Add new api to get the button label for background permission" 2020-01-15 17:59:34 +00:00
Martin Sundermeyer
b00f0edf72 Add string constants for new Reminder intent.
Bug: 134556369
Bug: 142085128
Test: n/a

Change-Id: Ide6d74d1a9812231b8e605b5a04a1fab6763bb9a
2020-01-15 18:25:06 +01:00
Tony Mak
216fe08617 PackageManager no longer requires the ExtServices to be a "Shared Library"
BUG: 147663325

Test: Boot
Test: atest cts/tests/tests/os/src/android/os/cts/RequiredComponentsTest.java
Test: mts-tradefed run mts-extservices

Change-Id: I32fcb27e54d50e362b3005dd6d235bcc30a60ac8
2020-01-15 12:59:42 +00:00
Jonathan Scott
805b26acf0 Merge "Allow starting activities across user with INTERACT_ACROSS_USERS." 2020-01-15 12:52:15 +00:00
Evan Severson
cfae44aeec Add new api to get the button label for background permission
This allows apps to get the string used so they can properly instruct
the user on how to grant a background permission.

Test: Manual, multiple languages
Bug: 147440267
Change-Id: Ibdc6563e85cae930c25a9338513f747440fee8b4
2020-01-14 14:39:12 -08:00
Alex Kershaw
6fb8a02bbe Support setting the _PROFILES app-op
Add public broadcast
CrossProfileApps#ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED =
"android.content.pm.action.CAN_INTERACT_ACROSS_PROFILES_CHANGED" and
hidden API CrossProfile#setInteractAcrossProfilesAppOp.

This new hidden API should be used rather than setting the app-op
directly. It ensures that the app-op is set for each user in the profile
group and that the new broadcast is sent when an app's ability to
interact across profiles has changed.

Unit tests are added alongside these changes. CTSVerifier changes should
be subsequently added to enforce the behaviour of the new public
broadcast.

Test: atest frameworks/base/services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose
BUG: 136249261
BUG: 147490565
Change-Id: Iad190a4b972da40bae7ffcf215b8962e8225f4af
2020-01-14 19:18:06 +00:00
Alan Stokes
a9b4a6cdd9 Update API for uninstalled installers.
Expose the initiating package's signing details.

Document that we return the details of the initiating package even if
it has been uninstalled, and under what circumstances we do so.

Test: atest PackageManagerTests PackageVerifierTest
Bug: 134746019
Bug: 146555198
Change-Id: I3a5799a804a955fc52269cfac7e45173f0c06e46
2020-01-14 09:36:49 +00:00
Mark Chien
78231e9282 Merge "Add NETWORK_STACK_SERVICE to SystemServiceRegistry" 2020-01-14 03:06:45 +00:00
Remi NGUYEN VAN
fe1ce1e047 Add NETWORK_STACK_SERVICE to SystemServiceRegistry
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.

Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
Merged-In: I940c62064466c3b3b8d2a195b810e90eaade7e6c
2020-01-14 02:17:54 +00:00
Sarah Chin
6be7ecd54d Merge "Make MmsManager public and @SystemService" 2020-01-13 18:53:31 +00:00