Commit Graph

8202 Commits

Author SHA1 Message Date
Anna Trostanetski
a6fe3996e1 Merge "Rename android.compat.IPlatformCompat" am: ee716a23a2 am: 81af0fc8bb am: 20f25166c3 am: 884ef46cdc
am: 8649477e74

Change-Id: I1722a3c2fc9444b4e05932bb287d5ccd389f1493
2019-08-24 01:40:24 -07:00
Anna Trostanetski
8649477e74 Merge "Rename android.compat.IPlatformCompat" am: ee716a23a2 am: 81af0fc8bb am: 20f25166c3
am: 884ef46cdc

Change-Id: I11d25c6de70389b9f8fb74b914a247bca224e631
2019-08-23 22:04:54 -07:00
TreeHugger Robot
903102c430 Merge "Don't refer to DeviceIdle from SystemServiceRegistry" 2019-08-23 15:38:42 +00:00
Anna Trostanetski
81af0fc8bb Merge "Rename android.compat.IPlatformCompat"
am: ee716a23a2

Change-Id: I88fd93b46bcaa5ed782c407f2a9e9469fb0f5f0e
2019-08-23 02:26:15 -07:00
Jeff Sharkey
7b28a9f743 Merge "Public APIs for ID-specific Uris, misc items." 2019-08-23 04:24:31 +00:00
TreeHugger Robot
a68d535199 Merge "Defined a more generic way to let services "opt-out" from certain user types." 2019-08-22 20:59:41 +00:00
Jeff Sharkey
ec19e9b107 Public APIs for ID-specific Uris, misc items.
We have getContentUri() for entire collections of items, but we
only have ID-specific overloads for some of the MediaStore classes;
let's get them all added for consistency.

Remove primary/secondary directory logic, which was replaced by
new RELATIVE_PATH column before Q launched.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: Iae4e7fe57adff071c35af459e31223a1fd05fef2
2019-08-22 14:43:24 -06:00
Felipe Leme
501a514ba7 Defined a more generic way to let services "opt-out" from certain user types.
SystemService now defines a isSupported(UserInfo), which is used by SystemServiceManager to
skip the service for the unsupported types.

Also added a new argument to SystemService.onSwitch() to indicate which user is
being switched from.

Finally, also fixed VoiceInteractionManagerService so it doesn't start for headless user 0.

Test: manual verification
Test: atest CtsVoiceInteractionTestCases CtsAssistTestCases # on automotive and walleye

Bug: 133242016
Bug: 137878080

Change-Id: Ife4bd875f412f85cccf9c9fd03115abd238d7eab
2019-08-21 15:15:30 -07:00
atrost
a6a4d60ae0 Rename android.compat.IPlatformCompat
To com.android.internal.compat.IPlatformCompat. This solves a java9
issue because libcore exported api has the same package android.compat.

Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make framework
Change-Id: I0918344f670669cecb04f1e9e54dbcb471b587d5
2019-08-21 17:07:11 +01:00
Joanne Chung
14275a9388 Merge "Move disable autofill from AutofillManagerService to AutofillOptions." 2019-08-21 06:29:18 +00:00
Anna Trostanetski
911c6ffd6a Merge "Start platform compat service eariler." into stage-aosp-master am: 4535b04b33 am: f3fe588229
am: 0755524354

Change-Id: Ic4c4d904df1484844fbaea740674ace0be1d0491
2019-08-20 02:53:39 -07:00
Jeff Sharkey
7585618d96 Merge "Check for mTransport before trying to configure." 2019-08-20 01:03:27 +00:00
Jeff Sharkey
316a617795 Check for mTransport before trying to configure.
Bug: 139554125
Test: atest FrameworksCoreTests:android.content.ContentProviderTest
Change-Id: I4a2d78de257cb898b75543dcbfde4b6317b3393f
2019-08-19 16:04:57 -06:00
atrost
499d4bff66 Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.
Bug: 137769727

Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
Merged-In: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 16:10:47 +00:00
atrost
8266ae32ba Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.
Bug: 137769727
Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
Merged-In: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 16:10:31 +00:00
TreeHugger Robot
4742ee7b19 Merge "Update ContentProvider#checkUser access." 2019-08-19 14:22:14 +00:00
atrost
de54a8ac4c Start platform compat service eariler.
It's needed by ActivityManager and PackageManager.
Also use a constant in Context for the name.

Test: flashed device with ag/9025572 and ag/9204795 and the platfrom
compat was accessible.

Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
2019-08-19 12:26:24 +01:00
Varun Shah
af8cfe34cd Update ContentProvider#checkUser access.
Packages with INTERACT_ACROSS_USERS_FULL can now access
ContentProvier#checkUser.

Bug: 139188114
Test: atest ContentProviderTest
Change-Id: Ie71387a26da66ebe34f296476c284c33abba6368
2019-08-16 16:39:21 -07:00
Oli Lan
0672808c27 Include NewRollbacks in result of getAvailableRollbacks.
This CL adds NewRollbacks to the return value of getAvailableRollbacks,
as long as the PackageRollbackInfo is complete (i.e. there is one for
each child session in the install).

Including these should avoid the potential race condition between the
install finishing and getAvailableRollbacks being called which affected
some of the tests. This means that the draining of the handler that was
previously added to getAvailableRollbacks can now be removed.

In order to avoid a similar race condition when rollbacks are expired, this
change also cancels corresponding NewRollbacks when expireRollbackForPackage
is called.

Bug: 136241838
Bug: 136548146
Test: atest RollbackTest
Test: manual local test with delay added to onFinished in the service callback
Change-Id: I015ee5925e38118c40f4b9e145f78fb12c0e2890
2019-08-16 17:52:50 +01:00
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
Felipe Leme
fcee9fb574 Fixed SystemServiceRegistry to return a null AppPredictionManager when the service is not defined.
am: 87c5855e17

Change-Id: I207ddf77599d9a12609c7b297a58c8ce1b6eab17
2019-08-15 02:09:58 -07: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
87c5855e17 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-15 06:03:24 +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
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -07: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
Makoto Onuki
7d6d9ca359 Don't refer to DeviceIdle from SystemServiceRegistry
In preparation of mainline.

Test: atest cts/tests/tests/batterysaving/src/android/os/cts/deviceidle/DeviceIdleTest.java
Bug: 137763703

Change-Id: Id3088ba65682722ff4c2808bdc86a0ade18a4ab5
2019-08-13 13:28:27 -07: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
Joanne Chung
9e247b1564 Move disable autofill from AutofillManagerService to AutofillOptions.
Bug: 125007037
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ib139cffaced15f5a458cb07e8b6cc1502492c9a5
2019-08-12 19:04:52 +08: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