Commit Graph

8213 Commits

Author SHA1 Message Date
Oli Lan
df720dc785 Merge "Wait for available rollbacks in RollbackTest." 2019-08-28 09:24:29 +00:00
Varun Shah
3bade98359 Merge "Update mTransport check before trying to configure." 2019-08-27 16:55:06 +00:00
Oli Lan
0a3c06e9c9 Wait for available rollbacks in RollbackTest.
This changes RollbackTest to retry checks for available rollbacks for
a certain period of time, using a new RollbackUtils method
waitForAvailableRollbacks.

Currently many of the tests in RollbackTest are flaky due to race conditions
between checking for available rollbacks and the installer onFinished callback.
This CL should fix all of those issues.

The previous attempt to resolve this by adding NewRollbacks speculatively to
the results of getAvailableRollbacks was not successful. This CL reverts that
change so that getAvailableRollbacks once again only returns rollbacks that are
actually available.

Bug: 136548146
Test: atest RollbackTest run on cuttlefish on acloud repeatedly
Change-Id: I27e2513b34f49af2f41cd627a5d2550541831e11
2019-08-27 17:04:25 +01:00
Lorenzo Colitti
d50b505965 Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: ac913d725f am: 93d68de285 am: bb0edef6e8
am: 7ea7b0b1f1

Change-Id: Ie87981017bf2d4deef2092407c31fb3df4464dc8
2019-08-27 04:24:55 -07:00
Lorenzo Colitti
7ea7b0b1f1 Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: ac913d725f am: 93d68de285
am: bb0edef6e8

Change-Id: I77ca7b17bea79dee5156839d1164b0fc78b31fe5
2019-08-27 04:12:45 -07:00
Lorenzo Colitti
ac913d725f Merge changes I69cdbb16,I6975e0b7
am: d889cb5098

Change-Id: I3c8ddf7809a0d443587c1c4c06ef56ac302fc80f
2019-08-27 03:31:02 -07:00
Varun Shah
d53955329c Update mTransport check before trying to configure.
Line was too long in previous commit so just updating that fix and
cleaning it up.

Bug: 139554125
Test: atest android.content.ContentProviderTest
Change-Id: Ie63151db35cc47f691b5a4733409c10b1ac4299c
2019-08-26 18:28:12 -07:00
TreeHugger Robot
6ffb81d821 Merge "Fix getting target SDK version for uid in PermissionManagerService." 2019-08-26 17:42:09 +00:00
wangmingming1
71df3da8ae notify netd about uid internet permission changes when package replaced
1. If a previous version of an app doesn't declare internet permission;
2. The User upgraded it to a new version and the new one does declare the
internet permission;
3. The new app are not allowed to access the internet until next boot

Bug: 137864893
Test: Manual, just make sure the onPackageChanged would be executed on package changes
Change-Id: I69cdbb16a027a9c4e974b32371b1f64a23a51a23
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
2019-08-26 09:30:59 +09:00
Lorenzo Colitti
7b0411782a Backport PackageListObserver#onPackageChanged.
Added internally in Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd,
of which this is a partial cherry-pick.

Bug: 137864893
Test: builds, boots
Change-Id: I6975e0b70ded6047e1ac8013a82bc35ff150f03b
Merged-In: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-08-26 09:30:59 +09:00
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
Hai Zhang
053c3a2349 Fix getting target SDK version for uid in PermissionManagerService.
The lowest target SDK version (instead of the highest) should be used
in order to stay compatible with existing older apps.

Bug: 136503238
Test: presubmit
Change-Id: If3b23ae4441166c98934cdd1f4adb7ded714abc3
2019-08-23 15:11:57 -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