Commit Graph

16310 Commits

Author SHA1 Message Date
TreeHugger Robot
a4bea97be4 Merge "Hotword: Propagate the DSP DetectedResult." into sc-dev am: dfbde545f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14427823

Change-Id: I6b27401db604eb10143912e457e94ff2ca4aec3e
2021-06-09 22:36:45 +00:00
TreeHugger Robot
dfbde545f3 Merge "Hotword: Propagate the DSP DetectedResult." into sc-dev 2021-06-09 22:32:37 +00:00
James O'Leary
4084659caf Merge changes from topics "quantizer_improved_logic", "reintroduce_scaling_fixes" into sc-dev am: e0970984c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14802974

Change-Id: I99e2facf17062876ac1501384ddb9dbbd26a3ef8
2021-06-09 22:30:49 +00:00
James O'Leary
d1bc261d8d Quantizer improvements
The original versions of these quantizers landed a couple months back,
and they were fine. Since then, we've had several opportunities to
iterate on them. This change lands improvements from those iterations.
TL;DR: 18% faster, big bug fix to WSMeans, code is cleaner (hopefully)

- QuantizerMap indexes an image's pixels, 'unique-ing' them by reducing
the pixel array to a map with keys of colors, and values of population.
This allows other quantizers to operate much more quickly: instead of
working on each pixel individually, they're able to operate in bulk.
- QuantizerWu uses flat arrays instead of 3D arrays and is more
understandable IMHO.
- QuantizerWsmeans has speed improvements, most importantly, it has a
big bug fix. When a Kmeans-based quantizer algo starts, it must first
assign the pixels to any one of the starting clusters. The original
implementation decided what cluster to assign a pixel to by finding the
cluster closest to the pixel. However, the algo terminates if no pixels
moved after one iteration of the algorithm, and since the pixels were
already in the cluster closest to them, the algo would immediately
terminate before it actually figured out where the cluster moved to
after pixels were assigned to it, and had a chance to move pixels around
based on that.
- Funnily enough, even though this _should_ mean Wsmeans got a lot
slower since it has to do more iterations, it is actually 16% faster

Additionally, during review of this CL:
An accidental dependency on iteration order of a Set was introduced,
causing inconsistent initialization of the mPoints array, creating
inconsistent results from the quantizer.

Removing the dependency on hashes of float[], and avoiding Maps
altogether, removes a dependency on hash codes of pointers that existed
during review, making it easier to have verifiable consistency across
iterations. This also improves speed slightly, from 55 ms to 39 ms
(tested on sunfish, first 9 wallpapers in Landscapes, City Scapes, and
Art categories, and averaged)

Bug: 189931209
Test: ran performance tests with VariationalKMeansQuantizer,
the previous Celebi = Wu + Wsmeans quantizer, and the new Celebi =
new Wu + new Wsmeans quantizers, over 100 iterations. Wu speed is
roughly the same, Wsmeans is 18%. Verified quantizer output is stable
for the same input pixels, run 100,000 times for each of two wallpapers.
Change-Id: I3324d29860c098ea1fd602b8d4197837e732f4f1
2021-06-09 13:33:41 -04:00
Ahaan Ugale
603ea83bd7 Hotword: Propagate the DSP DetectedResult.
Fix: 190572818
Test: atest CtsVoiceInteractionTestCases
Change-Id: I8a109f6540cf8c342b827464ccc2beabd99d1b9c
2021-06-08 23:33:47 -07:00
Tom Natan
68fe52d5de Merge "Rename PlatformCompat#setOverridesOnReleaseBuilds to putOverridesOnReleaseBuilds." into sc-dev am: 5977f60c19
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14424456

Change-Id: I01263c401fd743cd13d54a1b946dc36ad0833dce
2021-06-08 18:35:34 +00:00
tomnatan
1752194766 Rename PlatformCompat#setOverridesOnReleaseBuilds to putOverridesOnReleaseBuilds.
Bug: 190495884
Test: atest FrameworksServicesTests:PlatformCompatTest
Change-Id: I0b84732b5639b199f11b50b993ed3da4b3df1eda
2021-06-08 15:45:16 +00:00
Wu Ahan
54bbc02dda Merge changes from topic "unlock_jank_instrument" into sc-dev am: 924618b41c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14419588

Change-Id: I4833213060872062cca199f83f8a8965c52baf8d
2021-06-04 05:40:59 +00:00
Wu Ahan
924618b41c Merge changes from topic "unlock_jank_instrument" into sc-dev
* changes:
  Instrument jank and latency of the unlock animation of lockscreen
  Support configuration as parameter while beginning the instrumentation
2021-06-04 04:19:38 +00:00
Joe Bolinger
de35a77493 Merge "Fix feedback and animations for face to fingerprint fallback authentication." into sc-dev am: 896ac3e18f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14823790

Change-Id: Ic1004658a7aa3c15c084352f7da63b076b0648f1
2021-06-04 00:18:47 +00:00
Joe Bolinger
896ac3e18f Merge "Fix feedback and animations for face to fingerprint fallback authentication." into sc-dev 2021-06-04 00:12:40 +00:00
Joe Bolinger
9f685a9fa7 Fix feedback and animations for face to fingerprint fallback authentication.
Bug: 189164072
Test: atest com.android.systemui.biometrics com.android.server.biometrics
Change-Id: I7fe8085dc4a4994c591bb4be20309ffb46bb06e9
2021-06-03 14:41:29 -07:00
Jing Ji
f49177c8f5 Merge "Remove some system_server_wtf in proc stats tracking" into sc-dev am: d1c9c0785c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14804421

Change-Id: I13d2a580a29198a82e3d5fc6df9cfa08167c3d0d
2021-06-03 21:31:16 +00:00
Jing Ji
d1c9c0785c Merge "Remove some system_server_wtf in proc stats tracking" into sc-dev 2021-06-03 21:15:33 +00:00
Jeff DeCew
52a47bf4c6 Merge "Always highlight unread count" into sc-dev am: 834bf3a8e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14805378

Change-Id: I755013ddb2cbecb0159a24d43083cf2edb1f5366
2021-06-03 18:46:28 +00:00
Jeff DeCew
834bf3a8e0 Merge "Always highlight unread count" into sc-dev 2021-06-03 18:16:26 +00:00
Jeff DeCew
06536a43fa Merge "Remove redundant margin update, which caused infinite layout loop." into sc-dev am: a39cdd1273
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14805375

Change-Id: Id5725a353190c825bfcb315de3c8e942c0ff7ca8
2021-06-03 17:27:20 +00:00
Dmitri Plotnikov
b101ef3326 Merge "Store binder thread CPU times in the summary parcel" into sc-dev am: 80efce1f41
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737123

Change-Id: Ic21355f540693c143613183244c91e142f2d9670
2021-06-03 17:27:10 +00:00
Jeff DeCew
a39cdd1273 Merge "Remove redundant margin update, which caused infinite layout loop." into sc-dev 2021-06-03 17:04:50 +00:00
Dmitri Plotnikov
80efce1f41 Merge "Store binder thread CPU times in the summary parcel" into sc-dev 2021-06-03 17:04:19 +00:00
Jeff DeCew
7f8bcb8add Always highlight unread count
Fixes: 188646708
Test: get unread count within a group
Change-Id: I41d67e5e488e0d3dbc3873d6d50d55ec4ab8c9f2
2021-06-03 11:50:28 -04:00
Jeff DeCew
e0fb0e6162 Remove redundant margin update, which caused infinite layout loop.
Fixes: 186217151
Fixes: 183970366
Test: altered build to always show feedback icons, then exhaustively tested conversation notifications.
Change-Id: I19a1428d7fcda35efc3d15b198c5b8d04a30d869
2021-06-03 10:57:25 -04:00
John Tsai
7c3c9eb60b Merge "Revert "Release cblocks back to the free pool"" into sc-dev am: 5d1934f765
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14809870

Change-Id: Iedaf19f8e15559a6d643a949dd35d5790f75a0a0
2021-06-03 07:32:50 +00:00
Svetoslav Ganov
0f79c4da88 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev am: 1028eb2f62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14664152

Change-Id: I7f3c14e427b1ef0cb0232c0f0194bfbaa23b7706
2021-06-03 07:17:56 +00:00
Patrick Baumann
35bff63476 Merge "Release cblocks back to the free pool" into sc-dev am: 81858ab41c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736611

Change-Id: Ied84aa3ef970c308065e340cf8407e1bd31e3b22
2021-06-03 07:02:43 +00:00
Song Hu
bccbca62b4 Merge "Add sharesheet logging for empty direct share row and app share prediction timeout." into sc-dev am: 2ab80e4562
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14788759

Change-Id: I4199047bbe1544fef8e80158b858a3b0037e7885
2021-06-03 07:00:12 +00:00
Selim Cinek
d3436b42b1 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: If70fa90357401af1b6bd608162ecbce354b7aa33
2021-06-03 06:21:03 +00:00
Matt Casey
3649ea6cec 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: I3be83dca44dc2ae12fbce25a3106fb9aa3b5b14c
2021-06-03 06:16:24 +00:00
John Tsai
5d1934f765 Merge "Revert "Release cblocks back to the free pool"" into sc-dev 2021-06-03 02:13:03 +00:00
John Tsai
516cb2d025 Revert "Release cblocks back to the free pool"
This reverts commit e41b029d85.

Reason for revert: b/189985437

com.android.tradefed.targetprep.TargetSetupError[APK_INSTALLATION_FAILED|520001|DEPENDENCY_ISSUE]: Failed to install com.android.devicehealthchecks with ...

Change-Id: I06fe7d94f6dab474c74b093de8692f08d4031b62
2021-06-03 02:10:26 +00:00
Svetoslav Ganov
1028eb2f62 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev 2021-06-02 23:07:22 +00:00
Jing Ji
e2c4bcbf13 Remove some system_server_wtf in proc stats tracking
As those could be valid cases

Bug: 18643865
Test: Manual
Change-Id: I3391af28d8fe59e84b27a32889a6f4a4eaa42dea
2021-06-02 15:03:26 -07:00
Patrick Baumann
81858ab41c Merge "Release cblocks back to the free pool" into sc-dev 2021-06-02 20:35:15 +00:00
Song Hu
2ab80e4562 Merge "Add sharesheet logging for empty direct share row and app share prediction timeout." into sc-dev 2021-06-02 19:03:16 +00:00
Song Hu
8b352b94c0 Add sharesheet logging for empty direct share row and app share
prediction timeout.

Bug: 189833783
Test: atest ChooserActivityTest & manual verification
Change-Id: Id24c6a2495b6a4f778b14028ee5ab975d88e9870
2021-06-02 09:22:44 -07:00
Ahan Wu
97f0fe2709 Instrument jank and latency of the unlock animation of lockscreen
Instrument jank and latency of unlock animation.

Bug: 169735612
Bug: 169735198
Bug: 169220953
Test: take trace to validate
Change-Id: I1721d7d3373f99b4aca618f86464d44ecd1e618e
2021-06-02 01:15:30 -08:00
Ahan Wu
c45abcf9db Support configuration as parameter while beginning the instrumentation
Support a custom configuration while beginning the instrumentation, also
support a custom tag for getting fine-grained CUJ in the trace.

Bug: 187495856
Test: take the trace, see the cuj section name.
Change-Id: Ife2554e0d7dbe4c01b7e4381a12a5f595e2f4364
2021-06-02 01:15:27 -08:00
Svet Ganov
2eebf92965 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

Merged-In: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4

Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 23:43:29 +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
Todd Kennedy
e41b029d85 Release cblocks back to the free pool
Modern f2fs implementations starting in S support compression
natively within the file system. The data blocks of specific
installation artifacts [eg. .apk, .so, ...] can be compressed
at the file system level, making them look and act like any
other uncompressed file, but consuming a fraction of the space.

However, the unused space is not free'd automatically. Instead,
we must manually tell the file system to release the extra
blocks [the delta between the compressed and uncompressed block
counts] back to the free pool.

Because of how compression works within the file system, once
the blocks have been released, the file becomes read-only and
cannot be modified until the free'd blocks have again been
reserved from the free pool. For these installation artifacts,
that is not a concern.

Test: atest CtsAppSecurityHostTestCases:SplitTests
Test: atest CtsAppSecurityHostTestCases:IsolatedSplitsTests
Test: atest CtsAppSecurityHostTestCases:PkgInstallSignatureVerificationTest
Test: atest CtsLibnativehelperTestCases
Test: atest PackageManagerTests
Test: Manual. Boot the device and see cblocks for stub APKs are released
Test: Manual. Disable and re-enable stub APK and see cblocks are released
Bug: 188928405
Change-Id: I4b29dab263d02a79d7b1593d35ae28101d33679a
2021-05-28 02:59:47 +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
Dmitri Plotnikov
6132ed343f Store binder thread CPU times in the summary parcel
Bug: 189361771
Test: "adb dumpsys batterystats" before and after reboot
Change-Id: I3bdd8d716255812098ab594a89ebdd7455480e93
2021-05-26 16:42:16 -07: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
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
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
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
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