Commit Graph

16730 Commits

Author SHA1 Message Date
Svetoslav Ganov
757486cde6 Merge "Switch media fw permissions checks to AttributionSource" 2021-06-01 21:31:30 +00:00
Selim Cinek
e129e590e2 Merge "Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off." into sc-dev am: df773665d0 am: 4cee06e88d am: 4e1aba61e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737509

Change-Id: If0e28efd867fa567a3b484e4981a57036e51bd7f
2021-06-01 20:45:42 +00:00
Selim Cinek
4e1aba61e6 Merge "Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off." into sc-dev am: df773665d0 am: 4cee06e88d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737509

Change-Id: I19497216d13bf18529074ebf46d289b3e8e91b0c
2021-06-01 20:37:49 +00:00
Selim Cinek
4cee06e88d Merge "Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off." into sc-dev am: df773665d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737509

Change-Id: I0b7f14621a44df28b37c092796cbb0769fd9a359
2021-06-01 19:39:48 +00:00
Selim Cinek
df773665d0 Merge "Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off." into sc-dev 2021-06-01 18:00:10 +00:00
Svet Ganov
b033da4e3a Switch media fw permissions checks to AttributionSource
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.

Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.

Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app

bug: 158792096

Test: ((added tests for speech reco))
      atest CtsMediaTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases
      atest CtsAppOpsTestCases
      atest CtsAppOps2TestCases

Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 15:12:57 +00:00
Matt Casey
47e4e9cd7b Merge "Move ScrollView scroll capture to the center" into sc-dev am: 07056eaa46 am: ade3061502 am: 911b72b238
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14752211

Change-Id: I05890761f41cb6ba1d84bff4e21cfec6032b576d
2021-06-01 15:04:34 +00:00
Matt Casey
911b72b238 Merge "Move ScrollView scroll capture to the center" into sc-dev am: 07056eaa46 am: ade3061502
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14752211

Change-Id: I0bed0491bffe56e03dde758ccab950a5223805e8
2021-06-01 14:43:05 +00:00
Matt Casey
ade3061502 Merge "Move ScrollView scroll capture to the center" into sc-dev am: 07056eaa46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14752211

Change-Id: I408633511dd52337984df3024bcc7b688f0ac58b
2021-06-01 14:13:45 +00:00
Matt Casey
9e25d3b8b5 Move ScrollView scroll capture to the center
Avoid most floating content by centering the requested content within
the view instead of just scrolling so that it's visible.

See ag/14213766 for the corresponding RecyclerView change.

Bug: 189487659
Test: atest ScrollViewCaptureHelperTest, plus manual testing.
Change-Id: I194288cf9e568614ffd7c45b7d046a5b982829d6
2021-05-27 17:49:35 -04:00
Josh Tsuji
ee89a547f1 Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off.
This changes the screen off animation so that the controller directly animates the LightRevealScrim and the shade keyguard UI, rather then tying these to the dozeAmount. This makes it easier for us to manage/cancel these animations, such as during the camera launch gesture, since the various doze components update their state asynchronously.

This approach also means that instead of actually changing everything to KEYGUARD as soon as the power button is pressed, we actually just show the LightRevealScrim and the shade's AOD UI. This results in far less jank. We then actually show the keyguard once the animation finishes or is cancelled.

Bug: 169693662
Bug: 169739682
Bug: 181020504
Fixes: 185567665
Fixes: 189342687
Fixes: 185567665
Fixes: 183195436
Test: atest SystemUITests
Test: trigger screen off and cancel it
Test: trigger screen off and don't cancel it, make sure it wakes up fine
Test: disable 'power button locks instantly' and make sure it doesn't lock the device, both when the animation finishes or when it's cancelled
Test: press the power button twice in rapid succession
Test: press the power button twice in slower succession about 200ms apart (which triggers the camera onWakingUp vs onFinishedGoingToSleep)
Test: press the power button 5 times, make sure emergency gesture comes up
Test: disable AOD, observe no screen off animation and lock functionality works
Change-Id: I1c44304becdadfd37bab7fd81286a9702e5d6141
2021-05-27 16:26:22 -04:00
Treehugger Robot
dd17e0a6d3 Merge "Add OWNERS" am: e4ea60d580 am: ed2ff28228 am: fa5c128382 am: a2b2b7578b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1720190

Change-Id: I7940085545f1c53edc3d06f971fb0cc066fd4861
2021-05-27 00:04:21 +00:00
Treehugger Robot
a2b2b7578b Merge "Add OWNERS" am: e4ea60d580 am: ed2ff28228 am: fa5c128382
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1720190

Change-Id: I116071f02a0675542e3945461f8843b89a09d818
2021-05-26 23:50:09 +00:00
Treehugger Robot
fa5c128382 Merge "Add OWNERS" am: e4ea60d580 am: ed2ff28228
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1720190

Change-Id: I8040b35bc79f1faa208519cf109a36ad0948bc84
2021-05-26 23:48:44 +00:00
Todd Kennedy
769ea23166 Add OWNERS
Change-Id: Ia152457b8d86275b4b9e4e4c2fe55b0bd2667900
Mergec-In: I4b29dab263d02a79d7b1593d35ae28101d33679a
2021-05-26 21:22:35 +00:00
Dmitri Plotnikov
0751597bf4 Merge "Fix system service power calculation when measured energy is available" into sc-dev am: 16d1188b7d am: c22cb8480d am: 9dec696e82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14726213

Change-Id: I40265d4c4552474b989dd16fc061952dbcb0211b
2021-05-26 21:06:45 +00:00
Dmitri Plotnikov
9dec696e82 Merge "Fix system service power calculation when measured energy is available" into sc-dev am: 16d1188b7d am: c22cb8480d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14726213

Change-Id: I6a5c05b4ffd799de5d91fe0996de90de3b7f5475
2021-05-26 20:59:49 +00:00
Dmitri Plotnikov
9f4f53eca5 Merge "Fix system service power calculation when measured energy is available" into sc-dev am: 16d1188b7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14726213

Change-Id: I0b0456218c6b53348f5c2951e9c65e5b76e974c1
2021-05-26 20:59:24 +00:00
Dmitri Plotnikov
c22cb8480d Merge "Fix system service power calculation when measured energy is available" into sc-dev am: 16d1188b7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14726213

Change-Id: If51b3289ebd05e19b25de0cc36ff34c63fae5876
2021-05-26 20:53:30 +00:00
Jeff DeCew
4e19c0f201 Merge "Resolve Notification.Colors once, instead of lazily." into sc-dev am: f294d0ba5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140988

Change-Id: Icaeb16f0e3fbb114c4de551e75adaa948c312ce6
2021-05-26 11:05:23 +00:00
Alison Cichowlas
ea34067bc5 Merge "Set RESULT_OK on exit via copy button." into sc-dev am: 7014d28df9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670950

Change-Id: Idae04072caf9961880d522c22c23410475ee539f
2021-05-26 11:03:24 +00:00
Siim Sammul
6d47f7fb10 Change settings observer for other processes to not pass a userhandle.
This is a direct cherry pick from internal with no changes: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14426680

Bug: 180584913
Test: Not a functionality change
Change-Id: Ibf0442f9de45694e33131c0ac327d840eea8fbfe
Merged-In: Ibf0442f9de45694e33131c0ac327d840eea8fbfe
2021-05-26 10:45:16 +00:00
Dmitri Plotnikov
1643f794d0 Fix system service power calculation when measured energy is available
Bug: 188930285
Test: atest FrameworksCoreTests:SystemServicePowerCalculatorTest
Change-Id: Ic48bd627b8458cde18f812eb63cbc1e37496326d
2021-05-25 18:26:38 -07:00
Jeff DeCew
f62c474b77 Merge "Resolve Notification.Colors once, instead of lazily." into sc-dev am: f294d0ba5f am: 8d6af97d2b am: 9dc3fc72de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140988

Change-Id: Ife1e9a14027a89c2f2c11865d897adda5c809abb
2021-05-25 17:33:27 +00:00
Jeff DeCew
9dc3fc72de Merge "Resolve Notification.Colors once, instead of lazily." into sc-dev am: f294d0ba5f am: 8d6af97d2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140988

Change-Id: I68dfacee8188abd681a046a9f01e627a7efbc91c
2021-05-25 17:17:30 +00:00
Jeff DeCew
8d6af97d2b Merge "Resolve Notification.Colors once, instead of lazily." into sc-dev am: f294d0ba5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140988

Change-Id: I3beac51a74ec5eec5348f01e0b71ae73925ef035
2021-05-25 16:56:58 +00:00
Jeff DeCew
f294d0ba5f Merge "Resolve Notification.Colors once, instead of lazily." into sc-dev 2021-05-25 16:44:59 +00:00
Alison Cichowlas
61c48e8a70 Merge "Set RESULT_OK on exit via copy button." into sc-dev am: 7014d28df9 am: 5e03ec2456 am: 89721fcbcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670950

Change-Id: Ied84df4724858348304b5ecd0cdc15675935d5e7
2021-05-25 15:57:05 +00:00
Alison Cichowlas
89721fcbcb Merge "Set RESULT_OK on exit via copy button." into sc-dev am: 7014d28df9 am: 5e03ec2456
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670950

Change-Id: Ib730547fee4e78e9cc50655c955e7ea7596317aa
2021-05-25 15:41:03 +00:00
Alison Cichowlas
5e03ec2456 Merge "Set RESULT_OK on exit via copy button." into sc-dev am: 7014d28df9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670950

Change-Id: Ibd73a4a2097f872029076e1014bfd1cad5a1e8ef
2021-05-25 15:24:24 +00:00
Alison Cichowlas
7014d28df9 Merge "Set RESULT_OK on exit via copy button." into sc-dev 2021-05-25 15:04:25 +00:00
Siim Sammul
8cecd22d29 Add a version of SettingsObserver to BinderCallsStats and make it public so it could be
used to collect binder latency data from bluetooth and telephony.

This is a direct cherry pick from internal with no changes: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/14236409

Test: latency collection is unit tested, this is just an alternative settings configuration
Bug: 180584913
Change-Id: Ide51afb7eb26a96c7692bceb0a22585a74f08aa7
Merged-In: Ide51afb7eb26a96c7692bceb0a22585a74f08aa7
2021-05-25 15:20:22 +01:00
Jeff DeCew
cab7d8e011 Resolve Notification.Colors once, instead of lazily.
* Instead of resolving colors as-needed, resolve the entire palette potentially used by the notification at the start.
* Centralize color logic and palette storage into Notification.Colors for easier unit testing.
* Adds unit tests for the Notification.Colors, including validating color contrast ratios for various colors.
* Fix a bug with ColorContrastUtil where the luminosity for dark/light font cutoff was 0.5, which resulted in a max contrast ratio of 1.9 for some colors.  Now contrast ratios of 4.5:1 can be achieved for all colors.
* Removes a few of the color accessors in Notification.Builder which were infrequently used, and replaces them with direct use of Notification.Colors.
* Notification specific colors (primary, secondary, default) have only been used by colorized notifications for a few months.  Remove the dark mode overrides of these, ensuring that colorized notifications have the same exact appearance in light and dark themes.
* Replace the use of the "default" color with the "secondary text color"; this practically only affects the alerted bell icon, is more consistent, and reduces complexity.

Fixes: 187881776
Test: manual
Test: atest android.app.NotificationTest
Change-Id: Ib8840d04093094c324d8bdce5b2e84c93a94db8d
2021-05-25 09:57:11 -04:00
Siim Sammul
5141d67365 Merge "Add buckets params to the binder latency atom" 2021-05-25 08:02:25 +00:00
Dmitri Plotnikov
1306c3792a Merge "Fix time-in-foreground to include PROCESS_STATE_FOREGROUND_SERVICE" into sc-dev am: 4113199752 am: df0d816d7e am: 68550d8799
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671229

Change-Id: Icb8a588432c3c9e9f792a0a10495f2b25a11d146
2021-05-24 20:45:47 +00:00
Dmitri Plotnikov
68550d8799 Merge "Fix time-in-foreground to include PROCESS_STATE_FOREGROUND_SERVICE" into sc-dev am: 4113199752 am: df0d816d7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671229

Change-Id: If6750857f54e655a0aec4f347334dc2ab65684a9
2021-05-24 20:30:56 +00:00
Dmitri Plotnikov
73fcaf480a Merge "Fix time-in-foreground to include PROCESS_STATE_FOREGROUND_SERVICE" into sc-dev am: 4113199752
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671229

Change-Id: I62e891f31ddad5e4e2bdce79d2ae57b81de3675d
2021-05-24 20:09:09 +00:00
Dmitri Plotnikov
df0d816d7e Merge "Fix time-in-foreground to include PROCESS_STATE_FOREGROUND_SERVICE" into sc-dev am: 4113199752
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14671229

Change-Id: Id36c6015948985303e58d3ef388b9aa6fdd116a7
2021-05-24 20:08:07 +00:00
Dmitri Plotnikov
4113199752 Merge "Fix time-in-foreground to include PROCESS_STATE_FOREGROUND_SERVICE" into sc-dev 2021-05-24 20:02:36 +00:00
Patrick Baumann
c4f9c63bbe Merge "Updates OWNERS files" into sc-dev am: dff37ee6d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14687219

Change-Id: Iee0440f821f0d7b0a99f8ac60b05e9782c4440c9
2021-05-24 18:52:50 +00:00
Patrick Baumann
dff37ee6d2 Merge "Updates OWNERS files" into sc-dev 2021-05-24 18:30:19 +00:00
Victor Chang
9478b24cd2 Merge "Disable sentence-case for Georgian" into sc-dev am: 0946a97d06 am: 0d9d0d0521 am: f317cb27bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14489968

Change-Id: Id500bbc5d3e9c799a9948065edc4f94fab84e177
2021-05-24 16:26:32 +00:00
Victor Chang
5aa10ca300 Merge "Disable sentence-case for Georgian" into sc-dev am: 0946a97d06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14489968

Change-Id: I0aa295994f22289363af9f4909409cc07b390255
2021-05-24 16:04:35 +00:00
Victor Chang
f317cb27bb Merge "Disable sentence-case for Georgian" into sc-dev am: 0946a97d06 am: 0d9d0d0521
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14489968

Change-Id: Ieaf81e27b4c6a783786a667ff4057b7ed781bc9c
2021-05-24 16:04:18 +00:00
Victor Chang
0d9d0d0521 Merge "Disable sentence-case for Georgian" into sc-dev am: 0946a97d06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14489968

Change-Id: I6b9d84385c215a139c9e96eaa19dbb1b263c3a48
2021-05-24 16:02:00 +00:00
Victor Chang
0946a97d06 Merge "Disable sentence-case for Georgian" into sc-dev 2021-05-24 15:57:25 +00:00
Siim Sammul
1a1cd79951 Merge "Add sharding to BinderCallsStats collection and make it configurable. The hash code of the callsession will be used to select which apis will be collected for based on the configured modulo. This is needed to reduce the amount of data collected from public devices." into sc-dev am: d49a40998a am: 951c268d2b am: ea0bafa480
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14440248

Change-Id: I30439bb0d474885830896333c58d1516a000b854
2021-05-24 14:12:00 +00:00
Siim Sammul
ea0bafa480 Merge "Add sharding to BinderCallsStats collection and make it configurable. The hash code of the callsession will be used to select which apis will be collected for based on the configured modulo. This is needed to reduce the amount of data collected from public devices." into sc-dev am: d49a40998a am: 951c268d2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14440248

Change-Id: Iaf291e419a41136da79f7f9a3312c9bbc61df066
2021-05-24 13:49:16 +00:00
Siim Sammul
9ea13f2ae2 Merge "Add sharding to BinderCallsStats collection and make it configurable. The hash code of the callsession will be used to select which apis will be collected for based on the configured modulo. This is needed to reduce the amount of data collected from public devices." into sc-dev am: d49a40998a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14440248

Change-Id: I559ec7c27252c3d2111a88a395484ff9c6795cdb
2021-05-24 13:32:04 +00:00
Siim Sammul
951c268d2b Merge "Add sharding to BinderCallsStats collection and make it configurable. The hash code of the callsession will be used to select which apis will be collected for based on the configured modulo. This is needed to reduce the amount of data collected from public devices." into sc-dev am: d49a40998a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14440248

Change-Id: I680a1342507c882d988f486600da0afdfa1efe67
2021-05-24 13:29:32 +00:00