Commit Graph

8178 Commits

Author SHA1 Message Date
TreeHugger Robot
cf2efde135 Merge "Use PlatformConfig to gate behavior" 2019-08-15 19:08:35 +00:00
Patrick Baumann
dfb121d705 Use PlatformConfig to gate behavior
This change moves away from AppOps and explicit targetSdk
checks in favor of PlatformConfig.

Test: atest AppsFilterTest
Test: adb shell device_config put package_manager_service package_query_filtering_enabled true && atest AppEnumerationTests
Fixes: 139348423
Bug: 136675067
Change-Id: If0af198c86210c05c2e10b71f7ae6dc0b7a3ea9a
2019-08-15 09:26:14 -07:00
Oli Lan
860666d431 Merge "Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK." 2019-08-15 09:11:22 +00:00
TreeHugger Robot
426b942eb1 Merge "Fixed SystemServiceRegistry to return a null AppPredictionManager when the service is not defined." 2019-08-15 07:36:07 +00:00
Felipe Leme
6378bd40dd Fixed SystemServiceRegistry to return a null AppPredictionManager when the service is not defined.
Test: manual verification
Test: atest CtsAssistTestCases

Fixes: 139416391

Change-Id: Ieb2ae3f39bd42dc077ed3db1c6acdf429a39d519
2019-08-14 18:15:50 -07:00
Kevin Hufnagle
1710da095c Merge "Revert "docs: Added desc. of launcher app criteria in Q"" into qt-dev am: 81d74c6c72 am: 4125bd9b25 am: e6d042dbb3
am: e4ae9c050f

Change-Id: I5a26521c8f8b779d2c380d5375efeccfad5d4567
2019-08-14 18:06:02 -07:00
Kevin Hufnagle
e4ae9c050f Merge "Revert "docs: Added desc. of launcher app criteria in Q"" into qt-dev am: 81d74c6c72 am: 4125bd9b25
am: e6d042dbb3

Change-Id: I3a672fe776956617f8090a095098fc3f7641f322
2019-08-14 17:55:58 -07:00
Kevin Hufnagle
f7a6e1f5c8 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev am: a5e5c177d1 am: 5f38478989 am: 81fc14bb79
am: 9b16c56b15

Change-Id: I8c7f2ccccd4a86a09346584386112a30879ff65d
2019-08-14 14:16:57 -07:00
Kevin Hufnagle
5f38478989 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev
am: a5e5c177d1

Change-Id: I1ce3cc6a79415f1168d514c702b5d4ff673f257e
2019-08-14 13:16:39 -07:00
Kevin Hufnagle
7ae4cbeeda Revert "docs: Added desc. of launcher app criteria in Q"
This reverts commit 786f22e416.

Reason for revert: Need further feedback from SMEs

Bug: 130352392

Change-Id: I51b3bd19e27d28fe3aea300893da50bbf889ec73
2019-08-14 19:35:23 +00:00
Roshan Pius
07820f85ac Merge changes from topic "wifi_mainline_apk_separation"
* changes:
  Sysui/WifiTracker: Changes to support late starting wifi service
  WifiManager: Retrieve IWifiManager service lazily
  WifiStackClient: Register wifi API services from system_server
  Mainline wifi stack module
  NetworkStackClient: Refactor network stack process interaction
2019-08-14 19:33:10 +00:00
Oli Lan
48f3cf476c Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
This changes RollbackManagerServiceImpl to use the list of installed users
that is passed in to snapshotAndRestoreUserData for the purpose of snapshotting.

With this change, it is no longer necessary for the list of installed users to be
added as an extra to the ENABLE_ROLLBACK intent, so that extra
(EXTRA_ENABLE_ROLLBACK_INSTALLED_USERS) is removed.

Bug: 139181444
Test: atest RollbackTest
Test: atest AppDataRollbackHelperTest
Change-Id: Iffd63977a7498e3cba20d2039af623c921d38f57
2019-08-14 10:36:48 +01:00
Felipe Leme
e5434c301b Initial implementation of system service optimizations for different type of users.
On R, we want to optimize boot time by not starting system services for some types of users,
like a headless system user (which is the case for Automotive)

As a "guinea pig", it optimizes VoiceInteractionService for headless system user, so the 3rd-party app
service is not bound for user 0 (and hence its process is not launched).

This change improves boot time on Automotive in about 100ms.

Test: atest CtsVoiceInteractionTestCases CtsAssistTestCases # on walleye and Automotive
Test: manual verification on logcat

Bug: 133242016
Fixes: 137878080

Change-Id: Ib0a902855e32691a1d00bfa77ee82c8e2430977c
2019-08-13 10:10:53 -07:00
Kevin Hufnagle
786f22e416 docs: Added desc. of launcher app criteria in Q
As of Android Q, an app is included in the return value of
LauncherApps#getActivityList() unless it fulfills specific criteria.
This CL describes the conditions necessary for an app's activities
to *not* appear in the list.

Test: make ds-docs -j32

Bug: 130352392
Change-Id: Iad888a7a7f47d090da1b143ac152705577144d20
2019-08-12 16:52:41 -07:00
Adam Bookatz
47e4c8e094 Merge "UserInfo: FULL and SYSTEM flags" 2019-08-12 16:18:24 +00:00
Roshan Pius
6f5338dd8f Mainline wifi stack module
a) Moved wifi service to a separate APK
b) Use the IWifiStackConnector to load the wifi stack from
SystemServer (similar to network stack).
c) Create a new WifiStackClient interface for system server to interact
with the wifi stack (under new services/wifi folder). Note: This not planned
to be updated via wifi-sdk Apex.
d) Add priv-app permissions for the new wifi stack APK.

Bug: 113174748
Test: Device boots up & connects to wifi networks, hotspot toggle, etc.
Test: Will send for regression tests
Change-Id: I54b3a11ed30668bad5a387370484b2bb0eabca5f
Merged-In: I54b3a11ed30668bad5a387370484b2bb0eabca5f
2019-08-12 07:22:56 -07:00
Oli Lan
9654d80a74 Merge "Clean up generatePackageInfoFromApex() API" 2019-08-12 10:07:44 +00:00
Bookatz
75f0a07f44 UserInfo: FULL and SYSTEM flags
Introduces two new UserInfo flags:

SYSTEM - refers to the system user, i.e. user 0. Although
UserManagerService already knows which user is the system, this flag
will be useful in other contexts.

FULL - refers to a non-profile human user.

Right now, for every user, one of the following flag combos are true:
SYSTEM (user 0 on a headless-user-0 device)
SYSTEM | FULL (user 0 on a regular device)
FULL (secondary user)
MANAGED_PROFILE (profile users)

Test: Manual verification via "pm list users" of new flags when adding a new user
Test: Manual verification via "pm list users" of new flags for pre-existing users
Test: Later cls will test the functionality as it is introduced
Bug: 134605778
Change-Id: Ife92bfa8a91cc4567d825da8e6a1b3894b088b22
2019-08-09 17:20:26 -07:00
Jeff Sharkey
8cfff7b8b2 Merge "Enable transport logging based on isLoggable()." 2019-08-09 20:52:39 +00:00
Oli Lan
c2c7a22333 Clean up generatePackageInfoFromApex() API
This changes the API for generatePackageInfoFromApex in PackageParser
in response to review suggestions made in ag/6701090.

The method is renamed to generatePackageInfo with a PackageParser.Package
parameter (as well as an ApexInfo and flags). The implementation is combined
with the main generatePackageInfo method. Callers are changed to perform
the parsing themselves, including the collection of certificates if
necessary.

Note: the method signature and implementation had already changed since
ag/6701090, so the suggestions from that CL may not apply directly.

Bug: 129261524
Test: atest PackageParserTest
Test: atest CtsStagedInstallHostTestCases
Change-Id: I495539679812110f89d5e3d93f2622ba2dab36c0
2019-08-09 15:18:50 +01:00
Jeff Sharkey
22e834f385 Enable transport logging based on isLoggable().
Instead of creating a new public API that requires developers to call
it, offer to enable transport logging based on the class name.

Bug: 137890034
Test: manual
Change-Id: Iea2a24310bd100be62a5c525108d17bafe7d11ea
2019-08-08 15:21:35 -06:00
Jeff Sharkey
7d6fd4b82a Expand ContentProviderOperation to support call().
ContentProviderOperation has long supported basic operations like
insert(), update(), and delete(), but it was never extended to
support the general-purpose call() method.

This change adds support for call(), including configuration of the
extras Bundle using back-references to other operations.  In
addition, the output Bundle from call() can be used for
back-references from other operations.

Clean up how back-references are handled internally; we now store
either a literal value in each slot, or an explicit BackReference
instance which we can "instanceof" check to resolve when needed.

Also add withExceptionAllowed() capability, which can be used to
catch and report the failure of a single operation while allowing
any subsequent operations to proceed.  Adds various nullability
annotations to reflect the behavior of all existing logic.

Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1744bf8fc1ad048aa96460d487c2867c4c81d7b3
2019-08-08 14:40:29 -06:00
Jeff Sharkey
6304d7b894 Add nullability annotations for current behavior.
No behavior changes.  This paves the way for a future CL that is
will be adding a handful of new APIs.

Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1a6f53e79009ba88b13844a6c8ca8c09e33ee5b2
2019-08-08 14:27:38 -06:00
Brad Ebinger
c2b7f6cab3 Merge "Fix lint error getSystemService for EuiccManager" am: 97245795e7 am: 3856b9e7d4 am: 3a2c7a7fa3 am: 00de76a6c1
am: a2877f69b1

Change-Id: I71a800d70bf2892200fe40d22bbcadff07f6521a
2019-08-01 16:54:14 -07:00
Brad Ebinger
3a2c7a7fa3 Merge "Fix lint error getSystemService for EuiccManager" am: 97245795e7
am: 3856b9e7d4

Change-Id: I17624a0938e42d1d071cda76fb36c8c979ef622d
2019-08-01 16:15:14 -07:00
Brad Ebinger
3856b9e7d4 Merge "Fix lint error getSystemService for EuiccManager"
am: 97245795e7

Change-Id: I5b42feafdfd0c88daeb502d0f2602d072028850d
2019-08-01 16:02:21 -07:00
Brad Ebinger
97245795e7 Merge "Fix lint error getSystemService for EuiccManager" 2019-08-01 22:06:44 +00:00
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
hyunhae.lee
75fdafaafb Fix lint error getSystemService for EuiccManager
EuiccManager was open to public API.
However @ServiceName does not have Context.EUICC_SERVICE.
It makes lint error when calling getSystemService.

Test: Build
Change-Id: I2e28725b1ad4c07ada4e3181fa9a8a41789680f6
2019-07-19 22:42:18 +09: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