summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-05Merge cherrypicks of ['googleplex-android-review.googlesource.com/22357084'] ↵android-13.0.0_r45android-13.0.0_r44android-13.0.0_r43android13-qpr2-s11-releaseandroid13-qpr2-s10-releaseandroid13-qpr2-releaseAndroid Build Coastguard Worker
into tm-qpr2-release. Change-Id: I27cb9a6ad2101c0019b6feb8a8273fb6b66298b2
2023-04-05Revert "Prevent sharesheet from previewing unowned URIs [RESTRICT AUTOMERGE]"Mark Renouf
This reverts commit cef32a8b8ad109cd3066e4ad249fadbb72aa5574. Reason for revert: incomplete cherry pick Bug: 276129326 Bug: 261036568 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2864439551d1c86636ecfd3fa466328512b9ead5) Merged-In: I493c610e60bb3c60851d09c85340822039723829 Change-Id: I493c610e60bb3c60851d09c85340822039723829
2023-03-28Merge cherrypicks of ['googleplex-android-review.googlesource.com/21159680', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/21266934', 'googleplex-android-review.googlesource.com/21389013', 'googleplex-android-review.googlesource.com/21422765', 'googleplex-android-review.googlesource.com/21238189', 'googleplex-android-review.googlesource.com/21568941', 'googleplex-android-review.googlesource.com/21534012', 'googleplex-android-review.googlesource.com/21649216', 'googleplex-android-review.googlesource.com/21688022'] into tm-qpr2-release. Change-Id: I3293f67075d99e736cae14b81f8cbcf47569f858
2023-03-28DO NOT MERGE Isolated processes must fail registering BRs.Mugdha Lakhani
Broadcast Receivers should not be allowed to be registered by isolated processes. Bug: b/263358101 Test: atest SdkSandboxRestrictionsHostTest (cherry picked from commit 43b8a91b0584dd1c6a136702e68e1f0cd519cb51) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d752ea5f24ce50f407504ce99f56535d4cece8e2) Merged-In: I5bb2ee3ce8a447105a18851fdffa5a769cc3fe49 Change-Id: I5bb2ee3ce8a447105a18851fdffa5a769cc3fe49
2023-03-28enforce stricter rules when registering phoneAccountsThomas Stuart
- include disable accounts when looking up accounts for a package to check if the limit is reached (10) - put a new limit of 10 supported schemes - put a new limit of 256 characters per scheme - put a new limit of 256 characters per address - ensure the Icon can write to memory w/o throwing an exception bug: 259064622 bug: 256819769 Test: cts + unit (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b07326f1fb3d0e42a6bab902c271974c42d93c06) Merged-In: Ia7d8d00d9de0fb6694ded6a80c40bd55d7fdf7a7 Change-Id: Ia7d8d00d9de0fb6694ded6a80c40bd55d7fdf7a7
2023-03-28Prevent sharesheet from previewing unowned URIs [RESTRICT AUTOMERGE]Mark Renouf
Bug: 261036568 Test: manually via supplied tool (see bug) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cef32a8b8ad109cd3066e4ad249fadbb72aa5574) Merged-In: Iee1a75ef6ecbf471badeb42d8ebea11e74d884c1 Change-Id: Iee1a75ef6ecbf471badeb42d8ebea11e74d884c1
2023-03-28Limit the number of shortcuts per app that can be retained by systemPinyao Ting
This is a second attempt at fixing the issue, the previous CL ag/20642213 was reverted because it simply throws an exception when the limit is reached, which causes apps to crash since chat apps tends to be sending large amount of conversation shortcuts and they have no way to know how many of these shortcuts are still cached by the system. Instead of throwing an exception, this CL simply removes excessive shortcuts to avoid crashes. Currently there is a limit on the number of shortcuts an app can publish in respect to each launcher activity. This CL further implements a global maximum of total number of shortcuts that can be retained for an app to mitigate from any potential system health issue. When the global maximum is reached, ShortcutService will proactively removes shortcuts from system memory. Cached shortcuts are removed first, followed by dynamic shortcuts, using last updated time as tie-breaker. This CL additionally addresses an unexpected flow where re-publishing previously removed shortcuts that are still retained by the system could cause the total number of shortcuts to exceed previously set limit. Bug: 250576066 233155034 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a6e7958ab84edbd9e5f4653d4d1f56a7438cd7dc) Merged-In: I001c7a87b62aefa9487bf8efaf3cd02d7cb21521 Change-Id: I001c7a87b62aefa9487bf8efaf3cd02d7cb21521
2023-03-28Checks if AccessibilityServiceInfo is within parcelable size.Daniel Norman
- If too large when parsing service XMLs then skip this service. - If too large when a service attempts to update its own info then throw an error. Bug: 261589597 Test: atest AccessibilityServiceInfoTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:553232c29079fbeab28f95307d025c1426aa7142) Merged-In: Iffc0cd48cc713f7904d68059e141cb7de5a4b906 Change-Id: Iffc0cd48cc713f7904d68059e141cb7de5a4b906
2023-03-28FIx occlusion status mismatch issue when screen turns off and on quicklyIssei Suzuki
When KeyguardController detects occlude status change while the keyguard is shown, it requests (UN)OCCLUDE app transition and PhoneWindowManager defers committing the occlude state. However KeyguardController and PhoneWindowManager use different predicates to decide if keygaurd is shown or not. In case the predicates return different value, occlude state in KeyguardController and PhoneWindowManager remain inconsistent. Test: manual 1. set secure lock method (pattern) 2. launch calculator app 3. push power button to screen off 4. just before the screen turns off, push power button to screen on again Bug: 232002936 (cherry picked from commit b71c7b40e7d0ade68e1d1a0ee93c8370edf6e415) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b323776b1b205a4b266e16fbdc4095871cc4d9ec) Merged-In: I4cd7e62e6800897cce50a5376495c499a0b9ad10 Change-Id: I4cd7e62e6800897cce50a5376495c499a0b9ad10
2023-03-28Re-enforce MANAGE_ACTIVITY_TASKS for applySyncTransactionChris Li
The conditional permission was introduced for TaskFragmentOrganizer, but not really needed. Remove the conditional check. Bug: 259938771 Test: pass existing tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:65ac64c3476f42f8437481bff77485f53ab4f391) Merged-In: I666b9ee6b6076766513b97e675fdbaa002428601 Change-Id: I666b9ee6b6076766513b97e675fdbaa002428601
2023-03-28[RESTRICT AUTOMERGE][pm] still allow debuggable for system app downgradesSongchun Fan
Turns out we do have internal tests that downgrades system apps, so adding this exception to allow for that. BUG: 267232653 BUG: 256202273 Test: manual (cherry picked from commit ceeca68b8c3f0ed8427b0212f63defe2f075146e) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3a04799f68de6b77fc89faddda032b1031551e78) Merged-In: Ie281bbdc8788ee64ff99a7c5150da7ce7926235e Change-Id: Ie281bbdc8788ee64ff99a7c5150da7ce7926235e
2023-03-28[RESTRICT AUTOMERGE][pm] prevent system app downgrades of versions lower ↵Songchun Fan
than preload Also remove misleading commandline output. BUG: 256202273 Test: manual 1. Install preload system app v90, reboot 2. (W/O data, W/ Flag, 90->80 NOK) adb install -d ~/Downloads/PrivApplication_80.apk Performing Streamed Install adb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_80.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: System app: com.example.privapplication cannot be downgraded to older than its preloaded version on the system image. Update version code 80 is older than current 90] 3. (90->100) Install data app v100 4. (W/ data, W/O Flag, 100->90 NOK) adb install ~/Downloads/PrivApplication_90.apk Performing Streamed Install adb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_90.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 90 is older than current 100] 5. (W/ data, W/ Flag, 100->90 downgrade OK) adb install -d ~/Downloads/PrivApplication_90.apk Performing Streamed Install Success 6. (90->100) Install v100 6. (W/data, W/ Flag, 100->80 NOK) adb install -d ~/Downloads/PrivApplication_80.apk Performing Streamed Install adb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_80.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: System app: com.example.privapplication cannot be downgraded to older than its preloaded version on the system image. Update version code 80 is older than current 90] (cherry picked from commit a4484d7f1be1fa413258fe18644d61f85611f586) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d7c72817477b7b76ea41a55067057872d5b434bf) Merged-In: I5a8ee9e29a3a58f6e3fd188e0122355744b8b0ce Change-Id: I5a8ee9e29a3a58f6e3fd188e0122355744b8b0ce
2023-02-27Merge cherrypicks of ['googleplex-android-review.googlesource.com/21465508'] ↵android-13.0.0_r42android-13.0.0_r41android-13.0.0_r40android-13.0.0_r39android-13.0.0_r38android13-qpr2-s9-releaseandroid13-qpr2-s8-releaseandroid13-qpr2-s7-releaseandroid13-qpr2-s12-releaseAndroid Build Coastguard Worker
into tm-qpr2-release. Change-Id: I439b5fb2d7b53b72aebb358631c3e1ea4d99ead5
2023-02-27Revert change that would detectFp when FP is locked outBeverly
This reverts commit ff09044d12f936bab51ed9e7d33016616ce9e87e in addition to partially reverting ag/20141372. Reason for revert: b/269574598 Change-Id: Iea66d7782b3365dea827b854783aeddaa5c6699c (cherry picked from commit 63e446209d59a264a2abcf45630f80153c48e409) Merged-In: Iea66d7782b3365dea827b854783aeddaa5c6699c
2023-02-17[coastguard skipped] Merge sparse cherrypicks from ↵Android Build Coastguard Worker
sparse-9608475-L41300000958690509 into tm-qpr2-release. COASTGUARD_SKIP: Iea66d7782b3365dea827b854783aeddaa5c6699c COASTGUARD_SKIP: I1db552e1b2fc400a0c6e25cb308d947688e1e4e9 Change-Id: I2f24a4f0520fef12814d7f08cd44f5325b6ba40a
2023-02-17Merge cherrypicks of ['googleplex-android-review.googlesource.com/21465508'] ↵android-13.0.0_r34android13-qpr2-s2-releaseAndroid Build Coastguard Worker
into sparse-9608475-L41300000958690509. SPARSE_CHANGE: Iea66d7782b3365dea827b854783aeddaa5c6699c Change-Id: I1db552e1b2fc400a0c6e25cb308d947688e1e4e9
2023-02-17Revert change that would detectFp when FP is locked outBeverly
This reverts commit ff09044d12f936bab51ed9e7d33016616ce9e87e in addition to partially reverting ag/20141372. Reason for revert: b/269574598 Change-Id: Iea66d7782b3365dea827b854783aeddaa5c6699c (cherry picked from commit 63e446209d59a264a2abcf45630f80153c48e409) Merged-In: Iea66d7782b3365dea827b854783aeddaa5c6699c
2023-02-17[coastguard skipped] Merge sparse cherrypicks from ↵Android Build Coastguard Worker
sparse-9595452-L55900000958663479 into tm-qpr2-release. COASTGUARD_SKIP: I744b6d718affa4026a676f92b76c016b36d07592 COASTGUARD_SKIP: Iea66d7782b3365dea827b854783aeddaa5c6699c Change-Id: Id0fbc60e1aec414a4b76821afa473a9a17107541
2023-02-17Merge cherrypicks of ['googleplex-android-review.googlesource.com/21465508'] ↵android-13.0.0_r35android13-qpr2-s3-releaseAndroid Build Coastguard Worker
into sparse-9595452-L55900000958663479. SPARSE_CHANGE: Iea66d7782b3365dea827b854783aeddaa5c6699c Change-Id: I744b6d718affa4026a676f92b76c016b36d07592
2023-02-17Revert change that would detectFp when FP is locked outBeverly
This reverts commit ff09044d12f936bab51ed9e7d33016616ce9e87e in addition to partially reverting ag/20141372. Reason for revert: b/245778799 Change-Id: Iea66d7782b3365dea827b854783aeddaa5c6699c (cherry picked from commit 7fd68c74a7fd46c9f460593aa54d03c1d60016fb) Merged-In: Iea66d7782b3365dea827b854783aeddaa5c6699c
2023-02-14Merge cherrypicks of ['googleplex-android-review.googlesource.com/20064089', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/20831956', 'googleplex-android-review.googlesource.com/20828777', 'googleplex-android-review.googlesource.com/20642112', 'googleplex-android-review.googlesource.com/20709903', 'googleplex-android-review.googlesource.com/20899934', 'googleplex-android-review.googlesource.com/20920023', 'googleplex-android-review.googlesource.com/20322503', 'googleplex-android-review.googlesource.com/20953243', 'googleplex-android-review.googlesource.com/21129648', 'googleplex-android-review.googlesource.com/21005178', 'googleplex-android-review.googlesource.com/21414918'] into tm-qpr2-release. Change-Id: I3a0d202607b0a89e6f6bf1b5dea1d14cfe773339
2023-02-14Make DialogLaunchAnimator.showFromDialog more lenientJordan Demeulenaere
Before this CL, calling DialogLaunchAnimator.showFromDialog from a Dialog that was not shown using DialogLaunchAnimator (i.e. it was shown using Dialog.show()) would crash. This CL changes that so that we show the dialog normally instead. Bug: 267387248 Test: DialogLaunchAnimatorTest Change-Id: I52f475822cde1162575f6b09b0abe1c77ca132a4 (cherry picked from commit dc5b50c35def901c810149d7095fc861019b5e69) Merged-In: I52f475822cde1162575f6b09b0abe1c77ca132a4 (cherry picked from commit 42fac0d7833a619d16f44d010f9da32fc98ece9b) Merged-In: I52f475822cde1162575f6b09b0abe1c77ca132a4
2023-02-14[RESTRICT AUTOMERGE] Fix bypass BG-FGS and BAL via package manager APIsRhed Jao
Opt-in for BAL of PendingIntent for following APIs: * PackageInstaller.uninstall() * PackageInstaller.installExistingPackage() * PackageInstaller.uninstallExistingPackage() * PackageInstaller.Session.commit() * PackageInstaller.Session.commitTransferred() * PackageManager.freeStorage() Bug: 230492955 Bug: 243377226 Test: atest android.security.cts.PackageInstallerTest Test: atest CtsStagedInstallHostTestCases Change-Id: I9b6f801d69ea6d2244a38dbe689e81afa4e798bf (cherry picked from commit 03b77aee350696781b4d7a61768a172bedc3ac73) Merged-In: I9b6f801d69ea6d2244a38dbe689e81afa4e798bf
2023-02-14Fix bypass BAL via LocationManager.requestFlushKate Montgomery
Bug: 235823542 Test: atest LocationProviderManagerTest and manual tests Change-Id: I2a0fa7b99c3ad5ae839d8018ec70cb5c26e33240 (cherry picked from commit 7d43a5bcb2e13dcf118364a574f8c5610606e36e) Merged-In: I2a0fa7b99c3ad5ae839d8018ec70cb5c26e33240
2023-02-14[RESTRICT AUTOMERGE] Limit length of the name in <uses-permission>Jackal Guo
To mitigate a boot loop with a huge name string, this CL restricts the max length of the name in <users-permission> attr. Bug: 259942609 Test: manually using the PoC in the buganizer to ensure the symptom no longer exists. Change-Id: I35dde9d6bea9eb7c1b81e8cbadeeb908b3fb713f (cherry picked from commit de8ef32d020ce4efe5dcaae09c9b8e0cf7efb2db) Merged-In: I35dde9d6bea9eb7c1b81e8cbadeeb908b3fb713f
2023-02-14DO NOT MERGE: Context#startInstrumentation could be started from SHELL only now.Jing Ji
Or, if an instrumentation starts another instrumentation and so on, and the original instrumentation is started from SHELL, allow all Context#startInstrumentation calls in this chain. Otherwise, it'll throw a SecurityException. Bug: 237766679 Test: atest CtsAppTestCases:InstrumentationTest Merged-In: Ia08f225c21a3933067d066a578ea4af9c23e7d4c Merged-In: I1b76f61c5fd6c9f7e738978592260945a606f40c Merged-In: I3ea7aa27bd776fec546908a37f667f680da9c892 Change-Id: I7ca7345b064e8e74f7037b8fa3ed45bb6423e406 (cherry picked from commit a3e618a77be56e87224814c0706774fe52a6741f) Merged-In: I7ca7345b064e8e74f7037b8fa3ed45bb6423e406
2023-02-14Lower per-app NotificationChannelGroup limit.Ioana Alexandru
A higher limit can be abused to cause PDoS. For the rationale behind choosing 6000 as the max value, see http://b/261723753#comment20. Test: atest PreferencesHelperTest Bug: 261723753 Change-Id: I3f3a99765c161369e1b026686a0e5f0c83ed839e (cherry picked from commit 86441bd5c07c65021728748472fa6a28eaf162d0) Merged-In: I3f3a99765c161369e1b026686a0e5f0c83ed839e
2023-02-14Encode Intent scheme when serializing to URI string RESTRICT AUTOMERGEWinson Chiu
Avoids deserialization error when the scheme contains a reserved character. Bug: 261858325 Test: atest android.content.cts.IntentTest#testEncoding Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470 Change-Id: Ic34b3f796b762763db5aa7b5d7c109ae70607470 (cherry picked from commit 0d561708bc4c83cabb6c4c0f404e522b6491ec07) Merged-In: Ic34b3f796b762763db5aa7b5d7c109ae70607470
2023-02-14Fix checkKeyIntentParceledCorrectly's bypassHao Ke
The checkKeyIntentParceledCorrectly method was added in checkKeyIntent, which was originaly only invoked when AccountManagerService deserializes the KEY_INTENT value as not NULL. However, due to the self-changing bundle technique in Parcel mismatch problems, the Intent value can change after reparceling; hence would bypass the added checkKeyIntentParceledCorrectly call. This CL did the following: - Ensure the checkKeyIntent method is also called when result.getParcelable(AccountManager.KEY_INTENT, Intent.class) == null. - Migrate to the safer Bundle.getParcelable(String, Class<T>) API call in AccountManagerService. Bug: 260567867 Bug: 262230405 Test: local test, see b/262230405 Test: atest CtsAccountManagerTestCases Merged-In: I7b528f52c41767ae12731838fdd36aa26a8f3477 Change-Id: I7b528f52c41767ae12731838fdd36aa26a8f3477 (cherry picked from commit 3723f400e2f7f6b72be5d76ae6058e2be579b002) Merged-In: I7b528f52c41767ae12731838fdd36aa26a8f3477
2023-02-14Checking if package belongs to UID before registering broadcast receiverKunal Malhotra
Test: manual testing done on device by installing test APK and checking if receiver can register Bug: 242040055 Change-Id: Ia525f218a46f8bf7fff660cec0d6432f09fdf24d Merged-In: Ia525f218a46f8bf7fff660cec0d6432f09fdf24d (cherry picked from commit 790a8d0dd329460bc60456681cb446accf2a27e0) (cherry picked from commit e94b6b90ca8ecd21f731cf7a68537bdc8610abf7) Merged-In: Ia525f218a46f8bf7fff660cec0d6432f09fdf24d
2023-02-14Strip part of the activity info of another uid if no privilegeLouis Chang
The activity info could be from another uid which is different from the app that hosts the task. The information should be trimmed if the caller app doesn't have the privilege. However, removing the entire info may result in app compatibility issues. So, only swiping the info that are sensitive to empty string. Bug: 243130512 Test: verified market app locally Test: atest RecentTasksTest Change-Id: I5b6775dd3c4e2ccdacd30741884d336b2eaa70da (cherry picked from commit 5ba72200f6a66b5da48c9c3abd103a73aea1ef95) Merged-In: I5b6775dd3c4e2ccdacd30741884d336b2eaa70da
2023-02-14Revert "Trim the activity info of another uid if no privilege"Louis Chang
This reverts commit 401e782b244bf84fd5aab371f60c2e52d6226fb3. Reason for revert: apps crashed due to the top activity info trimmed Bug: 264269392 263434196 263438172 Change-Id: I0ad9d0e5659eb9d1c5ac6469ef37ab0cd7f6106a (cherry picked from commit 27bc3e93eb0f767a98af38e4c454187c31472428) Merged-In: I0ad9d0e5659eb9d1c5ac6469ef37ab0cd7f6106a
2023-02-14Trim the activity info of another uid if no privilegeLouis Chang
The activity info could be from another uid which is different from the app that hosts the task. The information should be trimmed if the caller app doesn't have the privilege. Bug: 243130512 Test: verified locally Test: atest RecentTasksTest Change-Id: Ia343ac70e5bb9aeae718fca6674e1ca491a14512 (cherry picked from commit 401e782b244bf84fd5aab371f60c2e52d6226fb3) Merged-In: Ia343ac70e5bb9aeae718fca6674e1ca491a14512
2023-02-02Merge cherrypicks of ['googleplex-android-review.googlesource.com/19829996'] ↵android-13.0.0_r37android-13.0.0_r36android-13.0.0_r33android-13.0.0_r32android13-qpr2-s6-releaseandroid13-qpr2-s5-releaseandroid13-qpr2-s1-releaseAndroid Build Coastguard Worker
into tm-qpr2-release. Change-Id: I042b10ae9f7bd15df457864df9545ff3c584da9a
2023-02-02Validate package name passed to setApplicationRestrictions. (Reland)Oli Lan
This adds validation that the package name passed to setApplicationRestrictions is in the correct format. This will avoid an issue where a path could be entered resulting in a file being written to an unexpected place. Bug: 239701237 Merged-In: I1ab2b7228470f10ec26fe3a608ae540cfc9e9a96 Change-Id: I56c2fc14f906cdad80181ab577e2ebc276c151c1 (cherry picked from commit 1b9b59c63bffc675a042cba6cd666831abef2c3e) Merged-In: I56c2fc14f906cdad80181ab577e2ebc276c151c1
2023-01-28Merge cherrypicks of ['googleplex-android-review.googlesource.com/21091394', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/21116839'] into tm-qpr2-release. Change-Id: I3a1a2ca5006b81b4c3bef31af915be727da22db6
2023-01-28DO NOT MERGE ANYWHEREBehnam Heydarshahi
Revert "Change volume ringer icon based on device config" This reverts commit 903b3025a7e5caaddae848376bd12b62e698315c. Reason for revert: b/261809910 fixing for qpr2 Change-Id: Ica3ef9df1470fd2b5e20fc8caa3bdf6647a21426 (cherry picked from commit 1bdb0b76bfa439abf6cddb11e752aec3499d8f03) Merged-In: Ica3ef9df1470fd2b5e20fc8caa3bdf6647a21426
2023-01-28DO NOT MERGE ANYWHEREBehnam Heydarshahi
Revert "Add flag to separate notification audio and ui" Revert submission 20180104-flag_for_b38477228 Reason for revert: b/261809910 fixing for qpr2 Reverted changes: /q/submissionid:20180104-flag_for_b38477228 Include only in tm-qpr2-release because fix forward is already submitted to tm-qpr-deb at ag/20806122 Change-Id: I35549d7b7b41632c857bdbdda02ddb7220208243 (cherry picked from commit 9fcce567af715a80929a4bbbdfdffa3410ae0d8e) Merged-In: I35549d7b7b41632c857bdbdda02ddb7220208243
2023-01-24Merge cherrypicks of ['ag/20690268', 'ag/20877927', 'ag/20965081'] into ↵Android Build Coastguard Worker
tm-qpr2-release. Change-Id: I9e4cdb6a9a8b795c6edae0ac52b693020f5f8eee
2023-01-24Send system user broadcasts in headless system user mode.bkchoi
In headless system user mode, USER_STARTING, USER_STARTED, and USER_SWITCHED broadcasts were not sent for the system user. It had caused issues for other parts of the system which are expecting such broadcast messages. For example, VpnManagerService expects USER_STARTED event for system user but was not receiving it. This change will only affect headless system user mode. No behavior changes for phones. Bug: 263439429 Bug: 242195409 Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest Change-Id: I4a101418c10a2c959c2bfae01b95863aebd521e8 (cherry picked from commit ba0f9f3ad2de99e8f96075db4571e6bf25d6c310) Merged-In: I4a101418c10a2c959c2bfae01b95863aebd521e8
2023-01-24Fix QS header constraints so status icons are now ellipsized where thereAnton Potapov
is lack of space. Previously: There was a chain [date]-[space]-[status icons]-[battery]. That's why we should add bias and space to make it working. But there're several problems with this: 1) app:layout_width="WRAP_CONTENT" + app:layout_constrainedWidth=”true" != app:layout_width="0dp" + app:layout_constraintWidth_default="wrap". The first one gets view expanded like it's MATCH_PARENT. 2) I've found out that wrapping views in constraint layout 2.0.0 may not always work as expected with app:layout_constrainedWidth=”true" (the view get's stretched as it's match_parent). layout_constraintWidth_max="wrap" should've help with this, but motion layout can't parse this attribute in constraint set. That's why my solution is to reimplement the layout a little bit This behavior is reported here: https://github.com/androidx/constraintlayout/issues/713 Now: [date] and [battery] are constrained to the sides and [status icons] occupy the whole space between them. [date] is always WRAP_CONTENT because there's always some space and we want to show it. [battery] and [status icons] are wrap content with constraints restrictions to make them fill all the space left Test: manual: phone + tablet Fixes: 260364389 Change-Id: I4d54b795cc4e96f6c204f2f00aff7607572d9aa3 (cherry picked from commit 675ff0fe3756eb07baffba4bfc18b5bd2c289b01) Merged-In: I4d54b795cc4e96f6c204f2f00aff7607572d9aa3
2023-01-24Fix work tile setup when adding work profileAnton Potapov
Test: Auto + manual - Add work profile -> QS tile is added - Remove work profile -> QS tile is removed - Reboot the device -> QS tile is in place - Reorder tiles, reboot the device -> order is persisted Fixes: 234639083 Change-Id: I4481a3f28f9d1f0c30618afaf78179e0033f50fb (cherry picked from commit a240e7eebe6fc81f123150a362c493a6f93b9d2c) Merged-In: I4481a3f28f9d1f0c30618afaf78179e0033f50fb
2023-01-20Merge cherrypicks of ['ag/20941605', 'ag/20946885'] into tm-qpr2-release.Android Build Coastguard Worker
Change-Id: I2f86b8635384aa2a07f47149f3257eb36ef98b9e
2023-01-20Revisit how launch animations handle View visibilityJordan Demeulenaere
This CL refactors the way the ActivityLaunchAnimator and DialogLaunchAnimator handle the visibility of the animated View when that View implements LaunchableView. Before this CL, a View that is animated would always end up being VISIBLE, even if something made that View INVISIBLE or GONE before or during the animation. That is because our animation code would sometimes change the visibility of the View, using View.setVisibility. After this CL, when animating a LaunchableView, all the visibility changes made to the animated View are done using View.setTransitionVisibility instead. That way, a LaunchableView can track all calls to View.setVisibility only and restore the last visibility that was set on the View at the end of the animation. Doing so ensures that all calls made to View.setVisibility have the expected result once the animation is done. Bug: 264728445 Test: DialogLaunchAnimatorTest Change-Id: I5848d42ef94952ecf058d4e895164389e37e0311 (cherry picked from commit 9ecb3db788b9f6be586c0f4f90c19d6337a7cd1b) Merged-In: I5848d42ef94952ecf058d4e895164389e37e0311
2023-01-20Use the correct FGS View when animating into a dialogJordan Demeulenaere
This CL fixes the View that is used when showing the Foreground Services dialog. Test: Click the FGS button when the Security button is also shown. Bug: 264728445 Change-Id: Id686279bbfc1e47e28da894342688d44183ebf42 (cherry picked from commit 0e7b6e534c1a818d1539e12d2febe2d26b7fa026) Merged-In: Id686279bbfc1e47e28da894342688d44183ebf42
2023-01-17Merge cherrypicks of ['ag/20961401'] into tm-qpr2-release.Android Build Coastguard Worker
Change-Id: Iad419a04b3c6bdba832006413e8503473b3b6054
2023-01-17[Status Bar] Append "__external" to external icons.Caitlin Shkuratov
Bug: 255428281 Bug: 265307726 Test: manual: (1) Be in silent mode. (2) Make a phone call. (3) Mute the phone call. -> Verify that *both* silent *and* mute icons appear in the status bar. Verify that they can each be toggled independently without affecting each other. Test: atest StatusBarIconControllerImplTest (verified that all added tests would have failed without the changes in this CL) Change-Id: I54cebf7b9b96c1b333f1f2a9ca3d427e9e765790 (cherry picked from commit afd1fc252bcb0336b300da71178b716767c82f9a) Merged-In: I54cebf7b9b96c1b333f1f2a9ca3d427e9e765790
2023-01-11Merge cherrypicks of ['ag/20911782', 'ag/20911787', 'ag/20928109', ↵Android Build Coastguard Worker
'ag/20931541', 'ag/20946106'] into tm-qpr2-release. Change-Id: I3b539e4fe213b68109336c1ff1f69640e1dbd30e
2023-01-11Revert "Ensure that only SysUI can override pending intent launch flags"Winson Chung
This reverts commit c4d3106e347922610f8c554de3ae238175ed393e. Reason for revert: b/264884187, b/264885689 Change-Id: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba (cherry picked from commit 7bb933f48ff15d8f08d2185005b7b3e212915276) Merged-In: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba
2023-01-11Revert "Add dumpsys logs to debug lockscreen stack height"Lyn Han
This reverts commit a331639790fa2bd7b2669d20b3ecfd53970965e1. Reason for revert: minimize logging for qpr2 Bug: 265067133 Change-Id: Ife9918c947ff521c7b6fb808a4c8d3ce27a02d67 (cherry picked from commit 8e50c40b0563b9dda8bf6a5d66fa2922526feb16) Merged-In: Ife9918c947ff521c7b6fb808a4c8d3ce27a02d67