Creates a new SystemConfig xml entry which allows a device to whitelist system packages to be installed on users when they are created, based on the type of user. System packages will be installed on users when they are created, or during OTAs, based on this whitelist. The whitelist can be enabled/disabled via a Config resource. For any user type, system packages can be whitelisted or blacklisted. If it is both (for the same user type), the blacklist takes priority. If it is neither, it won't be installed (since it isn't whitelisted). If a system package isn't mentioned in the whitelist file at all, for any user, then its behaviour depends on the Config resource value, which can optionally implicitly whitelist all such apps on all users. For now, the list is mostly empty and the default config is set to be enabled but implicitly whitelist all system packages that are not mentioned. Test: atest FrameworksServicesTests:SystemConfigTest Test: atest com.android.server.pm.UserManagerServicePackageWhitelistTest Test: manually test user 0 by flashall -w and checking packages Test: manually test OTA by setting setprop persist.pm.mock-upgrade 1 Bug: 134605778 Change-Id: Ia098c1f597f66a1c946cfcc9b7771c25e8ceabf7
35 lines
1.5 KiB
XML
35 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2016 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.perftests.multiuser">
|
|
|
|
<uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
|
|
<uses-permission android:name="android.permission.MANAGE_USERS" />
|
|
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
|
|
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
|
|
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
|
|
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
|
|
|
|
<application>
|
|
<uses-library android:name="android.test.runner" />
|
|
</application>
|
|
|
|
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
|
|
android:targetPackage="com.android.perftests.multiuser"/>
|
|
|
|
</manifest>
|