summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2022-04-06Merge "[scv2] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning." into ↵TreeHugger Robot
sc-v2-dev
2022-04-06Merge "DO NOT MERGE: SurfaceControlViewHost: Restrict disclosure of input ↵TreeHugger Robot
token" into sc-v2-dev
2022-04-06Merge "Parcel: recycle recycles" into sc-v2-devTreeHugger Robot
2022-04-06[DO NOT MERGE] Fixed status bar glitch for apps that access internal resshawnlin
In 12L, to support mulit-display devices, we changed the way to get the status bar height by adding an API to calculate instead of directly reading the resource of status_bar_height. However, some apps still using Resources.getIdentify() to get this internal resources dimen as status bar height to layout their UI which cause status bar glitch in their app. For compatibility purpose: 1. Create a new dimen res status_bar_height_default which will be used by framework to determine the status bar heigth 2. For status_bar_height - Set the value to the size which already consider the cutout size for defualt display as before so that it won't breaking existing app. - It is only used for apps using Resources.getIdentifier() Bug: 216782082 Test: verified on the apps with such issue. Change-Id: I306efa187ffa69223c06fd248cfe57d183f96c59 Merged-In: I306efa187ffa69223c06fd248cfe57d183f96c59
2022-04-06Import translations. DO NOT MERGE ANYWHEREBill Yi
Auto-generated-cl: translation import Change-Id: Ia24234e8c1231b4086644085fe438afc8c1db90d
2022-04-05Merge "DO NOT MERGE: WM: Call Transaction#sanitize" into sc-v2-devRob Carr
2022-04-05DO NOT MERGE: SurfaceControlViewHost: Restrict disclosure of input tokenRobert Carr
Currently we send the input (channel) token from the embedded view hierarchy to the remote embedding process via SurfacePackage. This is used to call grantEmbeddedWindowFocus. However this could also allow the host process to invoke updateInputChannel, which is not desirable. To fix this we rework updateInputChannel to work in terms of a focusGrantToken, which only carries this 1 capability. SurfacePackage is modified to not include the input token, but rather include this focus grant token. Bug: 215912712 Test: SurfaceControlViewHostTests Change-Id: Ie278f678f12f50c32f142a4260ff7d1c2a9ca57c (cherry picked from commit 501ee91b957eab6feb05832168573f51573efced)
2022-04-05[scv2] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning.Jonathan Scott
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest Bug: 210469972 Change-Id: I1ea926194992cbce26e2245fec0e563b3010a02f
2022-04-04Merge 5516a51432bbf0123788346e8cadd19e9243b768 on remote branchLinux Build Service Account
Change-Id: Ia4e41fcc006020e5b3a77070cbf8725ca4ea1f57
2022-03-31Parcel: recycle recyclesSteven Moreland
Before, it was like getting a used pan with food stuck on it. We run a clean ship here. You want a Parcel? You get a fresh Parcel. When we recycle a Parcel, we do a real clean-up job. Air freshener. All bits brushed over. These Parcel objects are clean as heck now! (specifically cleans mClassCookies) Bug: 208279300 Test: build Merged-In: I250872f5c6796bb64e2dc68008154c0e90feb218 Change-Id: I250872f5c6796bb64e2dc68008154c0e90feb218
2022-03-29Merge "Fix mobile radio battery consumption double counting" into sc-v2-devTreeHugger Robot
2022-03-28perf: Fix for Activity launch hint when LAL is enabled.V S Ganga VaraPrasad (VARA) Adabala
Fix for Activity launch hint when LAL is enabled. Change-Id: I61f5bee8e21e273ef80cf2e40a769fadf518b338 CRs-Fixed: 3151611
2022-03-28Merge "Secure REMOTE_BUGREPORT_DISPATCH" into sc-v2-devRubin Xu
2022-03-25Fix security hole in GateKeeperResponse am: 5d2176df69 am: 25356fba35Ayush Sharma
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343385 Change-Id: I440c492f0199a89f61356c21cc0f0be8d0649199 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25Fix security hole in GateKeeperResponse am: 5d2176df69Ayush Sharma
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343385 Change-Id: Iaa20c957e0944a9ce72c1584d93c352d7ffeee40 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25Merge "Use flag to control the restart period value." into sc-v2-devTreeHugger Robot
2022-03-25Merge "Fix setSystemBarsAppearances" into sc-v2-devTiger Huang
2022-03-24Use flag to control the restart period value.Joanne Chung
Bug: 224618257 Test: adb shell cmd device_config get/put voice_interaction \ restart_period_in_seconds works fine Test: the value is expected by command: adb shell dumpsys \ voiceinteraction | grep RESTART_PERIOD_SECONDS Change-Id: Icd8d19c2a482d0d6b9bf0432e2176ca10f3bd2eb Merged-In: Icd8d19c2a482d0d6b9bf0432e2176ca10f3bd2eb (cherry picked from commit 46e69448046fb9093ca7526d7428bf23a177a0f8)
2022-03-24Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-devBill Yi
2022-03-24Secure REMOTE_BUGREPORT_DISPATCHRubin Xu
In remote bugreport collection, Shell sends REMOTE_BUGREPORT_DISPATCH to DevicePolicyManagerService which in turn notifies Device Owners that a bug report is ready for collection. There existed a threat where a malicous user could spoof the REMOTE_BUGREPORT_DISPATCH broadcast via ADB to send a crafted bugreport to the Device Owner. Securing REMOTE_BUGREPORT_DISPATCH is not as easy as it appears: putting a permission on REMOTE_BUGREPORT_DISPATCH does not work since both the legitimate sender and the malicious user are UID_SHELL. Instead, we introduces a nonce which was sent from DPMS to Shell when bugreport is triggered, and DPM will only accept REMOTE_BUGREPORT_DISPATCH when a matching nonce is seen. Ignore-AOSP-First: security fix Bug: 171495100 Test: atest DeviceOwnerTest#testRemoteBugreportWithTwoUsers Test: atest DeviceOwnerTest#testAdminActionBookkeeping Test: atest BugreportManagerTest Change-Id: I7649b4f22b74647d152d76bb46d5ca70bfa3617d Merged-In: I7649b4f22b74647d152d76bb46d5ca70bfa3617d (cherry picked from commit a4131c50d07c7b58c496bd82b9ab3389b6721654)
2022-03-24Merge "Fix the translation not work if the animation is off" into sc-v2-devJoanne Chung
2022-03-24Fix setSystemBarsAppearancesTiger Huang
We should compare the existing appearance with the new appearance which is about to be applied to insetsFlags.appearance, not the raw appearance from the argument, before deciding if we can skip it. Bug: 224613946 Fix: 226227461 Test: atest WindowInsetsControllerTests#testSetSystemBarsAppearance Change-Id: I1283089a3dadf4ca2c3136f80d1472a34351306a
2022-03-24Fix the translation not work if the animation is offJoanne Chung
The system will show translation after the animation is done but it doesn't work if the animation is off. To fix the issue, we will check the animation status before showing translation. Bug: 215386127 Test: atest testUiTranslationWithoutAnimation Change-Id: Id0d02c422100effcf842209971052f4d6e9b0bd2 Merged-in: Id0d02c422100effcf842209971052f4d6e9b0bd2
2022-03-23Merge "Ref count isolated uid use for long partial wakelocks" into sc-v2-devMichael Wachenschwanz
2022-03-23perf: Fix for Activity launch hint when LAL is enabled.Ashish Jain
Fix for Activity launch hint when LAL is enabled. Change-Id: I61f5bee8e21e273ef80cf2e40a769fadf518b338 CRs-Fixed: 3151611
2022-03-23Fix ServiceConnector failing unbind if not connected.Ahaan Ugale
ServiceConnector does not call unbindService when requested to unbind if the service isn't currently connected. This causes issues like leaving zombie Trusted Hotword processes bound forever if the process is stopped ('restarted') immediately after being created (say if audio server crashes twice in quick succession). Fix: 223845998 Test: manual - locally comment out code that immediately connects the service, then `for i in {1..10}; do adb shell cmd voiceinteraction\ restart-detection; done` - without fix results in an extra process Change-Id: I6a8c01390130bcec9aff1460004343ca2b207031 Merged-in: I6a8c01390130bcec9aff1460004343ca2b207031 (cherry picked from commit 52e0dafcb3cd7043ee53220d3785c3056491213e)
2022-03-23Fix security hole in GateKeeperResponseAyush Sharma
GateKeeperResponse has inconsistent writeToParcel() and createFromParcel() methods, making it possible for a malicious app to create a Bundle that changes contents after reserialization. Such Bundles can be used to execute Intents with system privileges. We fixed related issues previously for GateKeeperResponse class, but one of the case was remaining when payload is byte array of size 0, Fixing this case now. Bug: 220303465 Test: With the POC provided in the bug. Change-Id: Ida28d611edd674e76ed39dd8037f52abcba82586 Merged-In: Ida28d611edd674e76ed39dd8037f52abcba82586 (cherry picked from commit 46653a91c30245ca29d41d69174813979a910496) Change-Id: I486348c7a01c6f59c952b20fb4a36429fff22958
2022-03-23Import translations. DO NOT MERGE ANYWHEREBill Yi
Auto-generated-cl: translation import Change-Id: I75ed235f28a2af07cee46c3827a942514eb59101
2022-03-21Fix mobile radio battery consumption double countingMichael Wachenschwanz
On ODPM enabled devices, the total mobile radio power consumption was being used when reporting the idle/suspended power. This means app mobile radio power consumption was effectively being double counted. Bug: 209525694 Test: atest MobileRadioPowerCalculatorTest Change-Id: Ibc1a504014ac10c285b71273ba50493ba237f6a9 Merged-In: Ibc1a504014ac10c285b71273ba50493ba237f6a9
2022-03-21Merge "Update GeofenceHardwareRequestParcelable to match parcel/unparcel ↵David Christie
format." into rvc-qpr-dev am: 6ce6f0b8fb Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17186288 Change-Id: I58ea073190e9bf63844b78b4833f78c5a601bd51
2022-03-21Merge "Update GeofenceHardwareRequestParcelable to match parcel/unparcel ↵David Christie
format." into sc-qpr1-dev
2022-03-21Merge "Update GeofenceHardwareRequestParcelable to match parcel/unparcel ↵David Christie
format." into sc-v2-dev
2022-03-21Ref count isolated uid use for long partial wakelocksMichael Wachenschwanz
The isolated uids need to be kept in the map while it is holding a long partial wakelock. Bug: 218298973 Test: atest BatteryStatsNoteTest Change-Id: I86456137e6d6ad47f9974da281defc04d20fb32f (cherry picked from commit fd48aa6fa6a87e0e159aca7ca8a429c47905291b) Merged-In: I86456137e6d6ad47f9974da281defc04d20fb32f
2022-03-21Merge "Fix setSplashScreenTheme documentation" into sc-dev am: ffad2f714d ↵Vadim Caen
am: 276387cce1 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16343578 Change-Id: I63a5d8f83253af7a9dbaab62d8d91309e2b89f64
2022-03-21Merge "Fix setSplashScreenTheme documentation" into sc-dev am: ffad2f714dVadim Caen
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16343578 Change-Id: I6c6bae41a0f49117a7dc670a4a7e54721bf45925
2022-03-21Merge "Fix setSplashScreenTheme documentation" into sc-devVadim Caen
2022-03-18Merge changes from topic "presubmit-am-08bbcb587d4e47b6afcc900c23899344" ↵Joanne Chung
into sc-v2-dev * changes: Add hotword detection metrics. Add HotwordMetricsLogger for statistics logging.
2022-03-17Merge "Changes TimingsTraceLog and TimingsTraceAndSlog to be less spammy." ↵Felipe Leme
into sc-v2-dev
2022-03-17Add hotword detection metrics.Joanne Chung
Bug: 207717787 Test: build & boot pass. Test: manual. Both trust and no-trust still work. Test: manual. In nornal case, log with expected values, see bug for details. Log expected value for some error cases (not all are tested) by local changes. Android Metrics Design Review : eldar/276723226 Merged-in: Iaa778616eca4cfad83a94297d9cd6116bb9577e7 Change-Id: I98fde2467e09564569cdbf10b20e9defece65cbf (cherry picked from commit e4b76fc200814bf4a12987ef448db34240b83c49)
2022-03-15Merge "Defer MessagingMessage#recycle until bind ends" into sc-v2-devTreeHugger Robot
2022-03-15Merge "Keyguard - Treat messsages to lock with priority" into sc-v2-devTreeHugger Robot
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2022-03-14Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.David Christie
Test: manual Bug: 216631962 Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.David Christie
Test: manual Bug: 216631962 Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.David Christie
Test: manual Bug: 216631962 Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14Defer MessagingMessage#recycle until bind endsSteve Elliott
See ag/17158486 for context. Fixes: 216202070 Test: manual Change-Id: I924f917fbf757d2c3866fcd60de2fbfccae2eb6a Merged-In: I924f917fbf757d2c3866fcd60de2fbfccae2eb6a (cherry picked from commit 88f4dbce894885e1fef1d0871817d2cfad61c763)
2022-03-14Merge "Defer MessagingGroup#recycle until bind completes" into sc-v2-devTreeHugger Robot
2022-03-10Defer MessagingGroup#recycle until bind completesSteve Elliott
There is a "race condition" where a MessagingGroup is recycled while the contents of that group are being used elsewhere in the ConversationLayout, namely in the "image message container" used to show the most recent image message in the collapsed state. This state isn't cleared until later in the bind() process, which unfortunately depends on the groups being updated. For that reason, we defer all synchronous calls to recycle() until the end of bind(), which will ensure that the old groups are still around as long as necessary. Fixes: 216202070 Test: manual Change-Id: Idef815d54690544615512bd2bd1006f172403e18 (cherry picked from commit 2a68270c76def0b635bd1583e9c1817d09dff969)
2022-03-10Keyguard - Treat messsages to lock with priorityMatt Pietal
When switching users and attempting to lock the device, the sysui main thread becomes overwhelmed with events, creating a significant lag between the time a message is posted and processed on the main thread. This can be dangerous when these events are critical for security, such as calls coming from PhoneWindowManager#lockNow() that call KeyguardViewMediator#doKeyguardTimeout(). On older devices with slower CPUs and less memory, the delay in processing can be significant (15 - 30s). The result of not prioritizing these events leads to a window of time where a guest user can switch back to the owner, and gain access to the owner's homescreen without needing to unlock the device with the owner's credentials. As a mitigation, prioritize two events originating in two specific methods to make sure the device locks as soon as possible as well as have the system server preemptively update its local cache. Bug: 151095871 Test: Very manual race condition - follow steps listed in bug Change-Id: I7585a0a5eeb308e0e32a4f77f581556d883b5cda Merged-In: I7585a0a5eeb308e0e32a4f77f581556d883b5cda (cherry picked from commit 28c53ab8bca26af58b45625c1ebba8b9051c107d) (cherry picked from commit f8023c9829890ede1bdcbd04314d26c122b1f3f1)
2022-03-09Changes TimingsTraceLog and TimingsTraceAndSlog to be less spammy.Felipe Leme
Also adds unit tests for TimingsTraceAndSlog. Test: atest FrameworksMockingCoreTests:TimingsTraceLogTest FrameworksMockingServicesTests:TimingsTraceAndSlogTest Bug: 223642864 Change-Id: I3a2b259fca7c4fbab08bc4212d850fee3ac2f037