Commit Graph

10267 Commits

Author SHA1 Message Date
James O'Leary
edffcc4d43 Merge changes from topic "themesMay2322" into tm-dev am: f5fff77bf8 am: ee60a27cf7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18581098

Change-Id: I977b8d363a7e50abd443e037149cbb8652aa5002
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 17:11:08 +00:00
James O'Leary
f5fff77bf8 Merge changes from topic "themesMay2322" into tm-dev
* changes:
  Update ColorScheme.toString() formatting
  Match latest variant spec; update hue rotation logic
  Match Android's colors to design intent
2022-05-27 16:40:18 +00:00
James O'Leary
c3cffc8bb6 Match Android's colors to design intent
May 2021 HCT code in Android ("CAM") gives results inconsistent with
HCT in design tooling. Using HCT solver ensures they match, allowing
design to verify their specs against the results in Android, derisking
the launch of theme variants.

HCT Solver is a standalone class that is easily integrated with Android
& Cam: when Cam.get(hue,chroma,tone) is called, it now calls
HctSolver.get(hue, chroma, tone).

HCT Solver was imported from google3, where it is tested against _all_
hex codes, both forward and reverse conversions. A number
of other tests cover all parts of the theming system, giving us high
confidence that there won't be a regression.

Test: atest ColorSchemeTest (unit test); atest SystemPaletteTest (CTS).
Spent ~4 hours trying a variety of wallpapers, and seed colors, and
used dumpsys to verify results match UX spec. Verify hex codes and HCT
values output by Android match those in design tooling via putting
hex codes into Monet Studio, and confirming the resulting HCT values
match the HCT values generated by Android.
Bug: 213314628
Change-Id: I95da1efacc2d61f19ce7f20efa3e7f70736258a9
2022-05-26 19:31:55 +00:00
Vadim Caen
21421cd776 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f am: 1d83999ad0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I59cdc9e93cce4e8b7cbeaea5f0816d5a78a7d7de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:34:50 +00:00
Vadim Caen
1d83999ad0 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I150be6a4fae771ffe6e841806772aa2218ae871b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:32:00 +00:00
Vadim Caen
451dc8a3d3 Merge "DO NOT MERGE Only rely on developer option for back animation" into tm-dev 2022-05-23 19:05:48 +00:00
Vadim Caen
ab58191c7f DO NOT MERGE Only rely on developer option for back animation
BackNavigationController was still relying on a debug setting. Now the
animation request is handled via a boolean parameter passed by sysui,
which has access to the developer option.

Test: Existing test modified
Bug: 231502692
Change-Id: Icda4692e05396407d961610de0ce709492adadc1
Merged-In: Icda4692e05396407d961610de0ce709492adadc1
2022-05-23 10:43:04 +00:00
Michael Rosenfeld
b5f587503b Merge "Add an option, --reset-all, to dumpsys batterystats." into tm-dev am: 512b28faf4 am: 9c53571bee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17950624

Change-Id: Ic02ba149f7f6230d29cd932436802839cb7e0118
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:51:14 +00:00
Michael Rosenfeld
512b28faf4 Merge "Add an option, --reset-all, to dumpsys batterystats." into tm-dev 2022-05-20 06:54:58 +00:00
Amith Yamasani
e173a61e1b Merge "Sanitize Uri.toSafeString() some more." into tm-dev am: b6da699d30 am: 5e40d2efd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18282431

Change-Id: Iccbff8b172f4e857c65458db333a58f6f769fc16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 17:44:19 +00:00
Amith Yamasani
b6da699d30 Merge "Sanitize Uri.toSafeString() some more." into tm-dev 2022-05-19 16:53:29 +00:00
TreeHugger Robot
f5a4b7fd86 Merge "Defines flag to disable touch feedback on display" into tm-dev am: beddca329f am: 02afba9572
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607970

Change-Id: I4e7280b4493b9f602e5469125302dbe2dc596978
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:50:52 +00:00
TreeHugger Robot
beddca329f Merge "Defines flag to disable touch feedback on display" into tm-dev 2022-05-19 11:51:29 +00:00
TreeHugger Robot
3f618594b3 Merge "Avoid NPE on ScrollCaptureConnection callbacks" into tm-dev am: 6678f5566b am: 864d188295
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18463432

Change-Id: I50b269fabe8f196c8d4c2e378247baeee2bed854
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:40:23 +00:00
yuanjiahsu
fc06fc5cb1 Defines flag to disable touch feedback on display
Define FLAG_TOUCH_FEEDBACK_DISABLED to disable touch sound and haptic feedback when creating virtual display.

Bug: 185558698
Test: atest FrameworksCoreTests:ViewRootImplTest, manual testing
Change-Id: Ida67f4027f2636e004218595b3bf088c06194522
2022-05-19 06:01:55 +00:00
TreeHugger Robot
f106d488b3 Merge "[SparseSetArray] optimize copy constructor" into tm-dev am: 79286a97fd am: d014ec92b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18415062

Change-Id: I4980b014251db3e48abcaab916a9adf8fd60e0da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:15:05 +00:00
Sanjana Sunil
ad494b49bb Merge "Set correct volume storage path for SDK sandbox" into tm-dev am: 0b28d29298 am: 49f81abcbe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17983856

Change-Id: I2f605ab06441b647bd46eb80271509090aa8e336
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:59:50 +00:00
Mark Renouf
ac9cef964f Avoid NPE on ScrollCaptureConnection callbacks
State is checked at the front half of some calls, but is
dispatched onto the UI thread. If the connection is closed
in this time, the queued call will NPE when the field it
uses is cleared.

This adds a simple null check in two places, and test for both.

Bug: 232375183
Test: atest ScrollCaptureConnectionTest
Change-Id: Ida7fbf0a21c206db8d774dc247b6ab5257dacabe
2022-05-18 19:25:05 +00:00
TreeHugger Robot
79286a97fd Merge "[SparseSetArray] optimize copy constructor" into tm-dev 2022-05-18 06:32:34 +00:00
Sanjana Sunil
0b28d29298 Merge "Set correct volume storage path for SDK sandbox" into tm-dev 2022-05-17 15:40:12 +00:00
Songchun Fan
c0ac1d37d5 [SparseSetArray] optimize copy constructor
BUG: 232347307
Test: atest android.util.SparseSetArrayTest
Change-Id: Ie046f557098ddc168b86523700cc06feede97e5e
2022-05-16 19:26:05 +00:00
Sanjana Sunil
79241ae7d9 Set correct volume storage path for SDK sandbox
Context.getDataDir() for SDK sandbox incorrectly returns /data volume
path even if the actual storage is on another volume. This CL sets the
correct storage path by checking the uuid from the ApplicationInfo of
the client app and setting it to the same value.

Bug: 229736419
Test: atest
SdkSandboxStorageHostTest#testSdkSharedStorage_DifferentVolumeIsUsable

Change-Id: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
Merged-In: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
2022-05-16 15:43:37 +00:00
Riddle Hsu
9605ca616b Merge changes Ibd113f4f,I09c2feff into tm-qpr-dev
* changes:
  Remove client side deferred config for cached state
  Defer sending config change to cached process
2022-05-16 03:12:44 +00:00
Amith Yamasani
3743e5586f Sanitize Uri.toSafeString() some more.
Bug: 190199986
Test: atest CtsNetTestCases:UriTest
Change-Id: I3689a70cb114099554372e93a0639294fd57bebb
2022-05-13 22:31:07 +00:00
Riddle Hsu
7371d0be41 Remove client side deferred config for cached state
Since [1], the server side won't send the config change to a
cached state process, until it has an active state again.
So the logic of client side deferring can be removed.

[1]: I09c2feffba2fc124c623796af69de9f6adb60a39

Bug: 217934273
Test: ActivityThreadTest

Change-Id: Ibd113f4fb3b566e4e9cf5d7960b63a5c7790fb75
2022-05-13 14:50:09 +08:00
Michael Wachenschwanz
e59e5012cf Merge "Skip collecting radio data on procstate change when radio is off." into tm-dev 2022-05-12 18:16:34 +00:00
TreeHugger Robot
77ef5a4e45 Merge "Fix AppSearchShortcutInfoTest" into tm-dev 2022-05-12 02:07:52 +00:00
Pinyao Ting
8c1026fceb Fix AppSearchShortcutInfoTest
Bug: 208375334
Test: atest AppSearchShortcutInfoTest
Change-Id: I40ddafd325ab55f83e8e6f7f8b4886fe5e63f681
2022-05-11 15:51:37 -07:00
Michael Wachenschwanz
de73c05b89 Skip collecting radio data on procstate change when radio is off.
Fixes: 229042376
Test: atest BatteryStatsNoteTest
Change-Id: I6b3c5a5c9416bc47b8dbb00e28c81d93e3507613
2022-05-11 14:37:45 -07:00
Nader Jawad
b9a8ed8b70 Merge "Fix memory leak with RenderNodeAnimator" into tm-dev 2022-05-11 16:49:16 +00:00
Matt Casey
ad48cd89e0 Merge "Resolve NPE when mini resolver is rotated" into tm-dev 2022-05-11 16:47:13 +00:00
Nader Jawad
528b0d2824 Fix memory leak with RenderNodeAnimator
Update View logic to cancel all RenderNodeAnimators
when it is detached from a window.
Updated HWUI Animation logic to enable a cancellation
flag to cancel all animators operating on a RenderNode
whenever the staging parameters are pushed to RenderThread

Fixes: 229136453
Test: Added core test to RenderNodeAnimatorTests
Change-Id: Id674e8474757bfc8dfe30394dde29da49d139bfc
2022-05-10 14:02:40 -07:00
Matt Casey
755cc5b04d Resolve NPE when mini resolver is rotated
Was attempting to adjust padding on a View that didn't exist.

Also adding additional conditional behavior for similar issues:
- Fix the padding at the bottom based upon insets.
- Only trigger mini resolver for ResolverActivity itself.
- Add comments defining mini resolver.

Test: atest ResolverActivityTest
Test: Manual test of rotation not crashing and padding looking better.
Bug: 222497968
Bug: 175433480
Change-Id: Ie38787f61dc523bd812b828ec16830b91f61ce0b
2022-05-10 17:59:08 +00:00
Chaohui Wang
4f4e8dd340 Merge "Add validation TOO_SHORT_WHEN_ALL_NUMERIC" into tm-dev 2022-05-10 02:44:48 +00:00
Dmitri Plotnikov
f19925afc9 Merge "Fix recording of battery history tags" into tm-dev 2022-05-09 17:56:17 +00:00
Dmitri Plotnikov
44cb0c4e31 Fix recording of battery history tags
Bug: 230552845
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: I018cf3f85e8ef11167e780653863b234822be27a
2022-05-06 17:08:18 -07:00
Song Hu
42bf145179 Merge "ChooserActivity reports whether the selected target is pinned in Westworld logging" into tm-dev 2022-05-06 20:36:02 +00:00
Song Hu
470f8434b1 ChooserActivity reports whether the selected target is pinned in Westworld logging
Test: atest
Bug: 210453009
Change-Id: Id67f5356f90e5ee1f10f782e2389582807b9be1e
2022-05-05 12:05:36 -07:00
Galia Peycheva
f372925a29 Merge "Fix missing position updates to blur regions" into tm-dev 2022-05-04 16:09:27 +00:00
Chaohui Wang
fabf6dcd44 Add validation TOO_SHORT_WHEN_ALL_NUMERIC
To distinguish the requirement between all numeric and not all numeric
when COMPLEXITY_HIGH.

Note:
The second param of applyComplexity() changed back from
withNonNumericCharacters to isPin.
This was changed from isPin to withNonNumericCharacters in Change
I3227d4d8e6825b5c4ea525828d7e09f52702065b without changing the caller.
This currently not causing any issues because applyComplexity() only
used by KeyguardManager.getMinLockLength(), which currently never be
called with COMPLEXITY_HIGH.

Fix: 227149118
Fix: 173167839
Test: manual & robolectric
Change-Id: I7e0d4a1edf42327452b7d9a564258b26865c056e
2022-05-05 00:09:25 +08:00
Galia Peycheva
38cf61f704 Fix missing position updates to blur regions
The PositionUpdateListener sometimes gets called after the
FrameDrawingCallback, because there is no ordering guarantee between
these two callbacks. This causes the BlurRegions sent to SF to
not have up-to-date positions. For example, an empty Rect gets sent
as the blur region bounds, because the position update hasn't arrived
when the surface transaction is sent. When the position update arrives
it set the correct bounds, but it requires another draw to happen so
that the correct position is picked up.

This CL fixes this issue by saving the blur regions that were last sent
to SF in FrameDrawingCallback and sending another transaction when the
position update arrives. That transaction is merged into the previous
one for the same frame, so the final transaction sent to SF has correct
values.

The CL also moves the FrameDrawingCallback registering logic entirely in
the BlurAggregator in the first onPreDraw. This cleans up VRI

Bug: 197239228
Test: atest --iterations 100 BlurTest#testBackgroundblurSimple
Test: atest BlurAggregatorTest
Change-Id: Ia122df40fdf2aa124299461c2e2597b61fa92699
2022-05-04 08:36:04 +00:00
Dmitri Plotnikov
ae7b2277b9 Address proportional counting for out-of-order timestamps
Bug: 229906525
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: Id5fb963e256d56b42c9b5a0bc686af83ca3c7835
2022-05-03 19:04:44 +00:00
Orion Hodson
e082ece64f Uri: check authority and scheme as part of determining URI path
The interpretation of the path depends on whether the scheme or
authority are specified and should be observed when unparcelling
URIs.

Bug: 171966843
Test: atest FrameworksCoreTests:android.net.UriTest
Test: atest com.android.devicehealthchecks.SystemAppCheck
Change-Id: I06981d1c6e387b16df792494523994518848db37
Merged-In: I06981d1c6e387b16df792494523994518848db37
(cherry picked from commit f37a94ae92)
2022-04-26 17:57:27 +00:00
Michael Rosenfeld
f8d37749b4 Add an option, --reset-all, to dumpsys batterystats.
* Removes historical battery usage stats data in addition to clearing batterystats.

Test: atest FrameworksCoreTests:BatteryUsageStatsStoreTest#testRemoveAllBusSnapshots
Bug: 226443003
Change-Id: I9b29f97b45f7aa3c49cd8e354107ab7f13a2ce7d
2022-04-26 02:07:05 +00:00
Weilin Xu
de500a118a Merge "Test empty programInfo update for BroadcastRadio" into tm-dev 2022-04-25 21:22:57 +00:00
Weilin Xu
dae8f844e6 Test empty programInfo update for BroadcastRadio
Empty programInfo list now is allowed to update
program list, so the count of calling update
chunk need to be updated.

Bug: 228987294
Test: atest StartProgramListUpdatesFanoutTest
Change-Id: I8020c130c4b73b345a17b4a1e28565e60e99b814
2022-04-22 22:49:54 +00:00
James O'Leary
b2af04737d Merge "Fix(?) for some disabled ChooserActivityTest cases" into tm-dev 2022-04-22 20:23:28 +00:00
James O'Leary
ca46e52c30 Merge "Create ResolverComparatorModel interface." into tm-dev 2022-04-22 20:23:23 +00:00
Joshua Trask
08df009e8d Ignore some Chooser tests that flake on races.
As described in b/222124533, the reliability of these tests
can be improved with a timeout, but that's still not a very
solid fix. We should just ignore them for now so they stop
breaking on the monitor, and meanwhile I'll continue
investigating the root cause.

Bug: 222124533, 220337209, 220959679, 218218953
Test: disabling tests only
Change-Id: I113a1ba4de2176e209339a1cbbe2583cb5fe518c
Merged-In: I113a1ba4de2176e209339a1cbbe2583cb5fe518c
(cherry picked from commit 2864475fd7)
2022-04-22 16:08:52 +00:00
Joshua Trask
6cdd926f43 Create ResolverComparatorModel interface.
Define the API for interacting with comparator model data;
provide implementations for our two current model types; and
(as a first step) re-write our legacy ResolverComparators
to be implemented internally in terms of their new model types.

This is the first CL in a multi-part cleanup of the
AbstractResolverComparator design. This demonstrates that the
role of an AbstractResolverComparator sub-class amounts to
(i.e., Ctrl+F "@Override") some amount of work to prepare model
data; some cleanup; and a set query methods against data that
*really should be* immutable (separated in this CL as the new
ResolverComparatorModel interace). Any remaining responsibilities
of the abstract base class would be better handled (in a subsequent
CL) by an external controller operating on a ResolverComparatorModel
(i.e., preferring composition to inheritance). The async
model-preparation steps should also be separated and cleaned
up (in a later CL).

I believe this to be a pure refactoring with no observable side
effects. While the new design aids in implementing the correct
"immutable snapshot" style, for now I've written the new
ResolverComparatorModel implementations to preserve any possible
quirks in the legacy implementations. Nevertheless, if some
inadvertant behavior change is introduced as a result of this CL,
it's most likely to be a bug-fix where we previously would've mixed
in stale data. A later CL will intentionally pursue those fixes.

Test: atest ResolverActivityTest ChooserActivityTest
Bug: 227486788
Change-Id: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
Merged-In: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
(cherry picked from commit 8b5d279d90)
2022-04-22 16:05:39 +00:00