Commit Graph

8787 Commits

Author SHA1 Message Date
Adrian Roos
d7d9c3e354 Merge "Introduce WindowContext API" 2020-01-23 13:19:08 +00:00
Automerger Merge Worker
b864dc150e Merge changes from topic "connectivity-diagnostics-system-server" am: 9cd249c11a am: 45e0caf5dc am: 1544e76f76
Change-Id: If70281f2989778896eb34ac65bcfe0215393ef60
2020-01-23 03:41:09 +00:00
Cody Kesting
45e0caf5dc Merge changes from topic "connectivity-diagnostics-system-server"
am: 9cd249c11a

Change-Id: I48a9f1f734b5e2dd4f7ed91c052cec5c8c62c076
2020-01-22 19:10:05 -08:00
Andrii Kulian
4a31697319 Introduce WindowContext API
Test: atest WmTests CtsWindowManagerDeviceTestCases
Bug: 128338354
Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
2020-01-22 18:30:29 -08:00
Dianne Hackborn
6a79f29ce0 Merge "Initial impl issue #143085640: Per-process network access control" 2020-01-23 00:44:14 +00:00
Sam Lin
cc6db40d86 Merge "Add Vulkan dEQP level feature flag" 2020-01-23 00:18:54 +00:00
Alastair Donaldson
8af0b970cb Add Vulkan dEQP level feature flag
This change adds a feature flag that specifies the date associated
with the Vulkan dEQP tests that a device claims to pass.

Bug: 136573508

Change-Id: I0cec29fe5f69f228faaa2298b7f5b65bcf988dba
2020-01-22 22:19:55 +00:00
Alex Kershaw
ba014acec8 Add TestApi to get UserHandle from URI.
I've added this to ContentProvider since it's where all of the existing
hidden logic where userinfo = userid lives.

Bug: 136249261
Test: atest CtsProviderTestCases:android.provider.cts.DocumentsContractTest
Change-Id: I3a815f2c8dd738140aec6937ce0d3b763bf49fba
2020-01-22 18:07:18 +00:00
TreeHugger Robot
177318a092 Merge "Change method to PackageManager#getBackgroundPermissionOptionLabel" 2020-01-22 18:06:29 +00:00
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
Evan Severson
d60c78511d Change method to PackageManager#getBackgroundPermissionOptionLabel
Feedback advised renaming getBackgroundPermissionButtonLabel to
getBackgroundPermissionOptionLabel. Also update javadoc for this
method.

Fixes: 147907758
Test: Compile
Change-Id: Iaafef7c6e70538fe878db82c900d87ac668591bf
2020-01-21 16:23:51 -08: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
Cody Kesting
b125776009 Add ConnectivityDiagnosticsManager to System Server.
ConnectivityDiagnosticsManager should be accessed through
Context#getService. In order for this to be possible, it needs to be
defined as a service inside SystemServiceRegistry.

Bug: 146444622
Test: compiles.
Test: CTS testing in aosp/1211164
Change-Id: I6fe29441ecc9967a04ceb394b3bbe54830bef079
2020-01-21 08:31:56 -08: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
Dianne Hackborn
f6729fae47 Initial impl issue #143085640: Per-process network access control
Add new manifest tags for declaring processes that an app
will use.  While declaring these processes, one can specify
specific permissions that will be denied to that process.
Doing so will result in any gids associated with that permission
from being given to that process, and any permission checks
that include a pid (which is not all of them) will fail when
checking a permission for that process.

For now, we limit these declarations to only the internet
permission, since we really need to do a lot of auditing to
determine how many other permissions can be denied (based on
how many permission checks for it are including the pid).
That said, this is explicitly not a security guarantee, so it
isn't a problem if there are ways around it (the process could
always IPC to another of the app's processes to do the same
thing).

One thing to be done is have the parser enforce that once an
app declares processes, it can only run things in those processes
and no others.

At this point the code is not yet tested at all.  That will be
coming in later.  This gets the APIs and various infrastructure
in place.

Bug: 143085640
Test: not yet tested

Change-Id: I27e8d0c811a5004fe251883f243517bb00d32d67
2020-01-16 23:16:52 -08: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