Commit Graph

7015 Commits

Author SHA1 Message Date
Anthony Hugh
a7f66b7ee8 Merge "Update getUserSwitchability() to handle different user ids and Auto" 2019-10-29 21:08:08 +00:00
Steven Moreland
a462b8b6b9 Merge "ServiceManagerProxy: implement new method" am: 2a6f6ed94b am: 9ab8a0713f am: 1574e4fd4e
am: 156230b3bf

Change-Id: Id21faff58a559d052dfc6da049f6cd445964852d
2019-10-29 09:47:16 -07:00
Steven Moreland
156230b3bf Merge "ServiceManagerProxy: implement new method" am: 2a6f6ed94b am: 9ab8a0713f
am: 1574e4fd4e

Change-Id: I3018e9922154e7a33dd3aa4814d5f80e4118a77a
2019-10-29 09:36:18 -07:00
Steven Moreland
1574e4fd4e Merge "ServiceManagerProxy: implement new method" am: 2a6f6ed94b
am: 9ab8a0713f

Change-Id: I5af655cba2bb416ed517ba722f0f5ec46610c9bc
2019-10-29 09:26:57 -07:00
Steven Moreland
2a6f6ed94b Merge "ServiceManagerProxy: implement new method" 2019-10-29 15:45:43 +00:00
Anthony Hugh
6acda5ef07 Update getUserSwitchability() to handle different user ids and Auto
User switcher is in SystemUI which runs in User 0.
UserManager.getUserSwitchability() currently checks for the
DISALLOW_USER_SWITCH only on the process's user id rather than the
foreground user's id. This is causing a bug where we're using the wrong
user to check for user restrictions.

This CL updates getUserSwitchability to handle different user ids and
updates UserSwitcherController to use the new API.

This also introduces Headless System User support which only runs a
subset of the logic.

Fixes: 143298605
Test: [1] Enable multi-user
[2] Create a new secondary user
[3] Switch to new secondary user (assume to be user 10)
[4] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 1
[5] Can't user switch
[6] adb root && adb shell pm set-user-restriction --user 10 no_user_switch 0
[7] Can user switch

Change-Id: Id039e2afd01a53116700c08177eb4e599a871946
2019-10-28 16:27:40 -07:00
Steven Moreland
2cd23b6a59 ServiceManagerProxy: implement new method
This class is hanging around for UnsupportedAppUsage. Adding additional
method to fix compilation, but it should never be called.

Bug: 135686713
Test: compilation fixed
Change-Id: I58022af86a53239990e057936826d0f1214acc6f
2019-10-28 11:17:15 -07:00
Roshan Pius
848513ebe6 Add a new BatteryStatsManager class
Wifi/telephony mainline modules uses IBatteryStats which is an AIDL &
hence cannot be made a @SystemApi. Create a new manager class to wrap
around this AIDL to expose @System Api.

Bug: 138806762
Test: Device boots up & connects to wifi networks.
Change-Id: Ib8816c3df17ccc562b9664e7bea1ef01ab61f697
2019-10-26 14:43:59 -07:00
Xin Li
d3498e3053 Merge Coral/Flame into AOSP master
Bug: 141248619
Change-Id: Ic0486c8c79d94c9a30efa37676b2f6a94fb7b5fa
Merged-In: Ibe8ff7bdba7a886bd8b91155ae56f087a836981f
2019-10-25 10:27:58 -07:00
Dario Freni
5a89f1a030 Merge "Support non-privileged APKs in APEX." 2019-10-25 09:18:00 +00:00
Howard Chen
f6be0e7f37 Merge "Use new GsiInstallParams struct" am: 7898d33e3a am: 6b1e8cc0ab am: 630b0caad1
am: f5b0ba4072

Change-Id: I1c7b89d1c076473064acd743df12cc9dc0976e8a
2019-10-25 01:10:17 -07:00
Howard Chen
f5b0ba4072 Merge "Use new GsiInstallParams struct" am: 7898d33e3a am: 6b1e8cc0ab
am: 630b0caad1

Change-Id: I97e9c7767a5b3ff60e6533cb9a76ed128b6d606a
2019-10-25 00:57:46 -07:00
Howard Chen
630b0caad1 Merge "Use new GsiInstallParams struct" am: 7898d33e3a
am: 6b1e8cc0ab

Change-Id: Ia84493f02d7db753af1222f9743b84f1be1d9f92
2019-10-25 00:50:48 -07:00
Howard Chen
6b1e8cc0ab Merge "Use new GsiInstallParams struct"
am: 7898d33e3a

Change-Id: I3f05bf9db6e5db4c675791295cc6bffe4098db32
2019-10-25 00:37:53 -07:00
Howard Chen
e176c56f6e Use new GsiInstallParams struct
Bug: 139402092
Test: adb shell am start-activity \
            -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
            -a android.os.image.action.START_INSTALL \
            -d file:///storage/emulated/0/Download/system.raw.gz \
            --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
            --el KEY_USERDATA_SIZE 8589934592

Change-Id: I62330ccbe3c863850b545db5e911196d22f518d7
2019-10-24 21:34:43 +00:00
Dario Freni
c3e1bb7239 Support non-privileged APKs in APEX.
This change adds initial support for scanning APEX directories looking
for APK, and make them available to the system as normal system APKs.
For now privileged apps and resource overlay are not supported, and the
support will be added in a later CL.

Scanning features are inherited from the partition in which the
preinstalled version of a given APEX module is located.

Supports both flattened and un-flattened APEX configurations.

Bug: 138429615
Test: Compiled a test apex with the Snake app installed in it. Verified
app is correctly scanned and usable. Tried also installing the apex in
/vendor and /product.

Change-Id: I8fb91317da0296567403b2b62babbb71e4b48938
2019-10-24 15:51:55 +01:00
Roshan Pius
c03cd01bd7 Merge "UserManager: Add new @SystemApis" 2019-10-23 14:18:38 +00:00
Varun Shah
b53b34487b Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
(cherry picked from commit 5e67462971)
2019-10-22 22:52:49 +00:00
Roshan Pius
f6c8cd3a24 UserManager: Add new @SystemApis
There are already public versions of these APIs which allow
these queries for the calling app's user. Need to expose a version that
allows single instance apps, i.e user 0 (like wifi) to query info for
different users. The exposed APIs are:
a) isUserUnlockingOrUnlocked
b) isSameProfileGroup

Bug: 142024973
Test: Device boots up & connects to wifi networks
Change-Id: I77cd31a2344a6cbb272196523c10ad259aea74ce
2019-10-21 19:48:27 -07:00
Shuo Qian
639d7e6110 Merge "Emergency number database config updater" am: ca0f14ec1a am: 9208fc5a0a
am: a1c6087157

Change-Id: Ie1025f6f8173835d00988e54811f031121f4eab6
2019-10-21 13:49:10 -07:00
Shuo Qian
a1c6087157 Merge "Emergency number database config updater" am: ca0f14ec1a
am: 9208fc5a0a

Change-Id: Id32674a1021f1902444b996b0ee5eb4be5fe30a1
2019-10-21 13:38:20 -07:00
Shuo Qian
9208fc5a0a Merge "Emergency number database config updater"
am: ca0f14ec1a

Change-Id: Ice41292677b52fe62fa860960fe62a29e28068dc
2019-10-21 13:22:50 -07:00
Chris Tate
2ee1955456 Merge "Move UserManagerInternal into services.jar" 2019-10-18 20:29:13 +00:00
Felipe Leme
0af1d367df Merge changes from topic "user_templates" into qt-qpr1-dev
am: 8959c2dd6b

Change-Id: Ifef51d385f3a998ae958214bb8a51c285d7f5d78
2019-10-18 13:08:03 -07:00
Felipe Leme
6400043a6e Added option to pre-create user templates to optimize first user creation time.
am: 7ad2f6bdad

Change-Id: I8594bfe6912e56b32b7cda0ee1a321f098264d5b
2019-10-18 13:07:52 -07:00
Felipe Leme
0b3863f4ac Added new (hidden) UserManager API to get all users, including pre-created ones.
Bug: 140750212
Test: manual verification

Merged-In: Iaef9db6216a7b18bf6f1f3e19f4a7428ec99f1da
Change-Id: Iaef9db6216a7b18bf6f1f3e19f4a7428ec99f1da
(cherry picked from commit 09a7f2df68)
2019-10-18 11:05:09 -07:00
Felipe Leme
7ad2f6bdad Added option to pre-create user templates to optimize first user creation time.
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.

This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).

Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593

Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background

Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
2019-10-18 11:05:06 -07:00
Shuo Qian
2f349da995 Emergency number database config updater
Test: https://paste.googleplex.com/5345498821033984
Bug: 136027884
Change-Id: I0fbd48fe8ef5e008af714312859b513a22679fcb
Merged-In: I0fbd48fe8ef5e008af714312859b513a22679fcb
(cherry picked from commit 8163b80a7e)
2019-10-17 23:42:06 +00:00
Christopher Tate
65fb2e4e40 Move UserManagerInternal into services.jar
Because SettingsProvider needs to call through the IUserManager
interface there is now a method to provide restricted-access information
via that route.  It has the same protection as the implicit local
service call surface that was previously used:  only system-uid callers
can invoke it.

Bug: 140833849
Test: system boots & runs normally
Change-Id: I05823ca57240ab10feb382c45590541212e406c1
2019-10-17 15:23:23 -07:00
Shuo Qian
8163b80a7e Emergency number database config updater
Test: https://paste.googleplex.com/5345498821033984
Bug: 64131637
Change-Id: I0fbd48fe8ef5e008af714312859b513a22679fcb
2019-10-17 14:20:24 -07:00
Chen Xu
3321171cc7 Merge "non-mainline telephony related AIDL refactor/decoupling" 2019-10-17 18:27:13 +00:00
Chen Xu
1f6cfa5399 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-10-16 15:30:24 -07:00
Jon Spivack
1dd86b4020 Merge "Made libbinder's waitForService accessible in java" am: 3ef1b5e544 am: fa830219cd am: 6b8cef41e5
am: 6fd2b9e8e5

Change-Id: If28614029aa7ba2f5ce4358bcd47db3f316c236a
2019-10-11 18:40:48 -07:00
Jon Spivack
6fd2b9e8e5 Merge "Made libbinder's waitForService accessible in java" am: 3ef1b5e544 am: fa830219cd
am: 6b8cef41e5

Change-Id: I8814042dc6f0a86c321b8bad4f89b0ecc12f3407
2019-10-11 18:29:07 -07:00
Jon Spivack
6b8cef41e5 Merge "Made libbinder's waitForService accessible in java" am: 3ef1b5e544
am: fa830219cd

Change-Id: I312f51b6a802754981bf642c587cbbdb3024cfbb
2019-10-11 18:17:45 -07:00
Jon Spivack
fa830219cd Merge "Made libbinder's waitForService accessible in java"
am: 3ef1b5e544

Change-Id: I70972120fcb7dd7cbe664750409bfd00a41e0a62
2019-10-11 18:06:40 -07:00
Jon Spivack
3ef1b5e544 Merge "Made libbinder's waitForService accessible in java" 2019-10-12 00:50:43 +00:00
Jon Spivack
9e45fde5e9 Made libbinder's waitForService accessible in java
waitForService is used to lazily start AIDL services

Bug: 138756857
Test: Manual (tested starting gsiservice with this function)
Change-Id: I7ff16b014052d3845bd4b1baa8fc9843e7975a16
2019-10-11 15:15:02 -07:00
Xin Li
019d9d0bf7 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Jeff Sharkey
588c15e56e Reveal color standard, transfer, and range.
We've already been parsing them for many years, and they're well
defined by other public APIs, so let's reveal them in MediaStore.

Also get some storage-related documentation updated to guide
developers towards replacements in a post-scoped-storage world.

Bug: 140247264, 139185855, 141523097, 139185322
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id39a74a9972a330b3f83913b2eef5100ec59627d
2019-10-10 17:44:57 -06:00
Adam Bodnar
2173ac60d7 Merge "Allow injecting layers by manifest metadata" 2019-10-10 17:31:14 +00:00
Xin Li
8efb8c35f1 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
Change-Id: Ib4566cec52912a8daa86c317fd99d6d60ef1524f
2019-10-10 00:28:04 +00:00
Daniel Colascione
5043f89d50 Merge "Apply JNI optimizations to HwParcel" am: 299036ea2f am: 2e7651e279 am: 3b2f1e2d4d
am: 94e087973f

Change-Id: I90f38dc950e45e8a0c466de1c7c181dad8011a7c
2019-10-08 23:21:33 -07:00
Kevin Hufnagle
74eab9c6cd Merge "docs: Updated SECURITY_PATCH field description" into qt-dev am: 3c92f24adb am: 7b02dd8342 am: 2f57ebf99c
am: 63edc1be29

Change-Id: I3972f680bd7a4a64be15521c96f50a7da16e01eb
2019-10-08 23:18:52 -07:00
TreeHugger Robot
b9a532718a Merge "Rename THREAD_GROUP_BG_NONINTERACTIVE to THREAD_GROUP_BACKGROUND" 2019-10-09 02:38:27 +00:00
Daniel Colascione
94e087973f Merge "Apply JNI optimizations to HwParcel" am: 299036ea2f am: 2e7651e279
am: 3b2f1e2d4d

Change-Id: Icf622444a6148762fff631216fed22d3cb5c0e5c
2019-10-08 17:21:47 -07:00
Daniel Colascione
3b2f1e2d4d Merge "Apply JNI optimizations to HwParcel" am: 299036ea2f
am: 2e7651e279

Change-Id: Ib0f2f227a01e9ec43f3b8a96a5330bf7ae76ec44
2019-10-08 17:09:45 -07:00
Daniel Colascione
2e7651e279 Merge "Apply JNI optimizations to HwParcel"
am: 299036ea2f

Change-Id: Icabf83e888a99f8b2837540f5709c7e72a515fa0
2019-10-08 16:55:34 -07:00
Daniel Colascione
c94b8c3dcc Apply JNI optimizations to HwParcel
This change reduces the JNI overhead of binder calls by about 160ns
per parameter.

Test: boots
Change-Id: Ie3acdbf9f3ad48c884042ada5e63bd9757c6b2e6
2019-10-08 14:12:48 -07:00
Kevin Hufnagle
63edc1be29 Merge "docs: Updated SECURITY_PATCH field description" into qt-dev am: 3c92f24adb am: 7b02dd8342
am: 2f57ebf99c

Change-Id: Ic62dbc5f5dd2e9f97832b501d0e88dd202d0884a
2019-10-08 12:15:13 -07:00