Commit Graph

18693 Commits

Author SHA1 Message Date
Vadim Caen
e199288f63 Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev am: a147b66f61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601925

Change-Id: I34b3da192b4cf72d170e0058b8265ec4260cb235
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 15:15:46 +00:00
Vadim Caen
a147b66f61 Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev 2022-06-01 14:35:57 +00:00
Matt Casey
d68f10b2f7 Merge "Fix Chooser enter transition animation" into tm-dev am: 8d5bcaa534
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18609372

Change-Id: I6ff40552079bc8b47f1f047982b897b1b5c46345
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:25:29 +00:00
Matt Casey
8d5bcaa534 Merge "Fix Chooser enter transition animation" into tm-dev 2022-06-01 01:13:49 +00:00
Robert Horvath
b8dbb51759 Merge changes from topic "privacy-type-media-projection" into tm-dev am: d59d17d74a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18375274

Change-Id: I03c6e7abd4245653accc4a2fa1a472861dd4f0f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 18:07:18 +00:00
Robert Horvath
d59d17d74a Merge changes from topic "privacy-type-media-projection" into tm-dev
* changes:
  Add MediaProjection privacy item type
  Extract privacy item monitoring interface, add AppOpsPrivacyItemMonitor
2022-05-30 17:43:32 +00:00
James O'Leary
4177945503 Match Android's colors to design intent am: c3cffc8bb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18581096

Change-Id: I0c82674b34177843e47e21582c68697422c6f949
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 16:50:09 +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
Andrey Epin
6123cddc75 Fix Chooser enter transition animation
Fix a concurrency issue when we might start activity enter transition
animation from an unprepared layout which caused ocassional visual
artifacts.

Fix: 232963730
Test: Manual testing by launching Chooser with varius intents.
Change-Id: I3962250b53ea8d96b124d1daf964e447600a5e3a
2022-05-27 09:21:39 -07:00
Matt Casey
2254cd9acb Merge "Minimize distance between text and pin in direct share row" into tm-dev am: 59ebb04c78
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18521525

Change-Id: I4a3112147b4812494701378a4c17b542dc88f189
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 02:38:03 +00:00
Matt Casey
59ebb04c78 Merge "Minimize distance between text and pin in direct share row" into tm-dev 2022-05-27 02:13:03 +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
Matt Casey
2078d3125f Minimize distance between text and pin in direct share row
When the TextView takes up multiple lines, the layout acts as if the
full width is used, thus pushing the pin all the way to the left.

This change measures the text itself and computes an ideal width for the
TextView based upon the line measurements.

Test: Visual inspection: pin several targets: single line, first line
      longer, second line longer, etc. Observe spacing.
Bug: 232445263
Change-Id: Id7601c58aae1e28c66c5311ba66b288443d73272
2022-05-26 17:32:21 +00:00
Vadim Caen
13048f123b Transfer the actual dispatcher when the window is preserved
When recreating the Activity, if the window is preserved,
onAttachedToWindow won't be called and PhoneWindow.onViewRootImplSet
won't be called either, where we set the actual dispatcher to the
Activiy's proxy dispatcher.

So when the window is preserved, we directly assign the actual Dispatcher
from the preserved Window to the new PhoneWindow

Fixes: 228571903
Test: In progress
Test: Open an app with OnBackInvokedCallback enabled, split to top,
      close the other application, do a back gesture
Change-Id: I050247501df8f6cf6cd0024a6233f88a035f6279
2022-05-25 19:46:37 +02:00
Calvin Pan
ca00515971 Merge "Fix using incorrect view in app language selection" into tm-dev am: fa264b81be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18579445

Change-Id: I3f794e4add28c46c7e2f77ea39eb12db82f683a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 07:08:48 +00:00
Calvin Pan
fa264b81be Merge "Fix using incorrect view in app language selection" into tm-dev 2022-05-25 06:51:35 +00:00
Calvin Pan
5f8fa45e80 Fix using incorrect view in app language selection
Bug: 233175025
Test: By manual
Change-Id: Idd5b277cdfb737acf9262ff5efbeca93afaa100f
2022-05-25 03:15:19 +00:00
Calvin Pan
40e5e91374 Merge "Fix app language show "Und" when all languages in the suggestion list" into tm-dev am: 8848ca6f3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18570256

Change-Id: Ia85a9f6abde36fbb17aa8b38b337bfe5b8270812
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 02:59:16 +00:00
Matt Casey
6984fa2ca1 Merge "Align outer edge of profile tabs and icons" into tm-dev am: 4a191d7fad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18566767

Change-Id: Ie32c9831e186f77e549f7b39b63b5f55e3c434e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 02:58:49 +00:00
Calvin Pan
8848ca6f3b Merge "Fix app language show "Und" when all languages in the suggestion list" into tm-dev 2022-05-25 02:36:24 +00:00
Matt Casey
4a191d7fad Merge "Align outer edge of profile tabs and icons" into tm-dev 2022-05-25 02:34:45 +00:00
TYM Tsai
15ccd31eeb Merge "Fix inline tooltip position is wrong" into tm-dev am: edca30dce8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18350147

Change-Id: Ia7e2af3df18f68943d9cb45fd02dcdc44c10e42b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 01:28:36 +00:00
TYM Tsai
edca30dce8 Merge "Fix inline tooltip position is wrong" into tm-dev 2022-05-25 01:05:17 +00:00
TreeHugger Robot
fed94f67d9 Merge "MessagingImageMessage: Don't crash if measured after recycle" into tm-dev am: ec3ee0a5c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18577093

Change-Id: I4500dffa6905ec35c62a40012ca4b73079449b09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 00:14:41 +00:00
TreeHugger Robot
ec3ee0a5c3 Merge "MessagingImageMessage: Don't crash if measured after recycle" into tm-dev 2022-05-25 00:08:29 +00:00
Andrey Epin
811af17338 Merge "Fix a11y navigation in Chooser" into tm-dev am: 247cb3a3bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18408340

Change-Id: If12a696b18c96de41c474a5b1fd41ddbdaf438a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 00:04:15 +00:00
Andrey Epin
247cb3a3bc Merge "Fix a11y navigation in Chooser" into tm-dev 2022-05-24 23:45:14 +00:00
Andrey Epin
2a6ed87df9 Fix a11y navigation in Chooser
With the `ResolverDrawerLayout`-`RecylerView` combination it was
possibel for accessibility navigation to get off-screen.
The issue is addressed by adding a custom accessibility delegate to the
recycler view which makes sure that an item receving accessibility focus
becomes visible.

Bug: 230132993

Test: Manueal - user accessibility navigation on the Chooser with a long list of
apps; make sure that items that receive a11y focus become visible when
scrollng in both directions.

Change-Id: I448d88660f701ca3c5ea0c92416595c9389af521
2022-05-24 19:48:06 +00:00
Jing Ji
51904bf4b7 Merge "Construct the UidState in case of not found during unparceling" into tm-dev am: 0fe49ee574
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18563201

Change-Id: I32f165831e8c78c157c57f916ba59a0bbad979cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 19:00:42 +00:00
Jing Ji
0fe49ee574 Merge "Construct the UidState in case of not found during unparceling" into tm-dev 2022-05-24 18:43:10 +00:00
Julia Tuttle
2e12d55283 MessagingImageMessage: Don't crash if measured after recycle
We're hoping to gut the recycling code in the messaging notification
code entirely (it's a lot of complexity for apparently little or no
performance gain), but in the meantime, mitigate a System UI crash.

Bug: 231025249
Test: none, I found no unit tests to start with
Change-Id: I3bcc14d102a87ed96ce37241d25eccf44ba2acb0
2022-05-24 13:07:32 -04:00
Jing Ji
115483cebb Merge "Don't remove the common processes from the procstats.resetSafely" into tm-dev am: 811e3c9d08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18561414

Change-Id: I583d48a6b21eae9e40cfe74df6d4d7ede633a1fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 16:09:10 +00:00
TYM Tsai
3392d187eb Fix inline tooltip position is wrong
The PopupWindow will show up above the anchor with the real rectangle.
If the anchor is doing an animation, it will get a temporary top of the
anchor because the rectangle is conisince changed by the animation. So
attach tooltip after a while for waiting the animation is done.
And when the tooltip overrides the inline suggestion, clicking the
suggestion won't work. Force the y offset above or below the anchor to
fix the problem.

Bug: 223088398
Test: atest android.autofillservice.cts.inline.InlineTooltipTest
Change-Id: I068efc3d20f4486decd2c9e690ebeb2981fb6722
2022-05-24 21:33:54 +08:00
Calvin Pan
49c4f9e051 Fix app language show "Und" when all languages in the suggestion list
- Handling the case that all languages in the suggestion list
- Adding strict condition for reusing convertView in getView()

Bug: 233175025
Test: Verified with test apk
Change-Id: I9419704226322394125e495bd9a35a5edd0683e8
2022-05-24 10:48:38 +00:00
Matt Casey
80ef161e48 Align outer edge of profile tabs and icons
Previously tabs were full-width, now they align with the outer edges of
icons.

In ResovlerActivity, this is constant. In ChooserActivity, the placement
of the icons is based upon the icon count and layout width, so it must
be computed at runtime.

Bug: 233330219
Test: Manually with various orientations across Chooser and Resolver.
Test: atest ResolverActivityTest, atest ChooserActivityTest
Change-Id: I2009211c277f6ea0b3f14a06a54e82f4c190c564
2022-05-24 01:01:44 +00:00
Jing Ji
c76ca4f2f6 Construct the UidState in case of not found during unparceling
Bug: 232966772
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Change-Id: Id3b22522d407074fe1758c3ef43cd2f5e163cfdc
2022-05-23 13:03:33 -07:00
Jing Ji
6fdb0de941 Don't remove the common processes from the procstats.resetSafely
As we're resetting it right after that, it doesn't make sense to
explicitly remove it.

Bug: 233563626
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Change-Id: Ibd12379a7678a60238af79f86e694e1dc3c97176
2022-05-23 10:47:52 -07:00
Bill Lin
72dceda51c Merge "Define CUJ_BIOMETRIC_PROMPT in InteractionJankMonitor" into tm-dev am: 92b26992b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18367870

Change-Id: I5125089d51a0d199fc02aaeef30129b574f89ef7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 00:07:49 +00:00
Chaohui Wang
a6d1018941 Merge changes from topic "jank-toggle" into tm-dev am: dfed7f9e2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18195532

Change-Id: I71f0b74af5ebf0a1bfab622a61f37a7c853f5f07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:26:59 +00:00
Michael Rosenfeld
7a0a92b96d Merge "Add an option, --reset-all, to dumpsys batterystats." into tm-dev am: 512b28faf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17950624

Change-Id: Ie2ac9df6c507020e266f326110d45d8e973514b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:25:46 +00:00
lbill
9f2e36f2f4 Define CUJ_BIOMETRIC_PROMPT in InteractionJankMonitor
Define instrument constant in InteractionJankMonitor

TODO(b/232176881):
Instrument in Biometric code in next CL.
- AuthContainerView transit in  : SHOW
- AuthContainerView transit out : DISMISS
- AuthCredentialView transit in : SHOW
- AuthCredentialView transit out: DISMISS
- AuthBiometricView transit(Biometric <-> PIN/Password/Pattern): TRANSIT

Bug: 232176881
Test: atest SystemUITests
Test: make and get perfetto trace
Change-Id: I17fb2b5e00005c611efe2342abc30196ae4ccc31
2022-05-20 10:57:44 +00:00
Chaohui Wang
dfed7f9e2f Merge changes from topic "jank-toggle" into tm-dev
* changes:
  Add SettingsJankMonitor
  Add SETTINGS_TOGGLE CUJ to InteractionJankMonitor
2022-05-20 09:22:46 +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
Junyu Lai
5c35103c20 Merge changes from topic "stats-migration" into tm-dev am: 23ed66f130
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18457684

Change-Id: I6d633b2218bc1ec079d442f1ac81a7299fb0f6eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 14:55:19 +00:00
Junyu Lai
23ed66f130 Merge changes from topic "stats-migration" into tm-dev
* changes:
  Add null check when list directory
  [MS82.2] Add a rewriteSingle method that takes two timestamps
2022-05-19 14:54:02 +00:00
TreeHugger Robot
6af6396c06 Merge "Update BrightnessSynchronizer Logic" into tm-dev am: 5b0c795a65
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18334422

Change-Id: I3ba3e0331f7a8d39cb4c1a0499c4e05b156d25db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:52:07 +00:00
Robert Horvath
a7b00c574e Add MediaProjection privacy item type
Active MediaProjection cannot be tracked using AppOps,
instead this uses MediaProjectionManager callbacks to track the
corresponding new PrivacyType.

Bug: 184629645
Test: atest AppOpsPrivacyItemMonitorTest PrivacyItemControllerTest PrivacyConfigFlagsTest
Test: m SystemUI CarSystemUI ArcSystemUI
Test: Manual on TV, observe media projection privacy indicator
Change-Id: I8924ebb7871da432b0e4e49c465a0c43e515ca4b
Merged-In: I8924ebb7871da432b0e4e49c465a0c43e515ca4b
2022-05-19 10:40:14 +02:00
TreeHugger Robot
5b0c795a65 Merge "Update BrightnessSynchronizer Logic" into tm-dev 2022-05-19 08:30:57 +00:00
Chaohui Wang
4921f2f22c Add SETTINGS_TOGGLE CUJ to InteractionJankMonitor
Bug: 230285829
Test: make build
Change-Id: Ieebc37dd28cf679ef5d0d455eb46de84679fdeaf
2022-05-19 15:13:10 +08:00
Santos Cordon
7f4fe4c4d6 Update BrightnessSynchronizer Logic
There was an error where if two auto-brightness changes came in quick
succession, the first could be treated as a user-initiated brightness
change.

1. First float change comes in: Xf
2. We write the brightness to the int-setting: Xi
3. Second float change comes in: Yf
4. Notification of the Xi change comes back to us and because X is
   different from Y, we treat it as a user-change.

The result of this is that auto-brightness learned from these erroneous
"user inputs" and both the short and long term model get affected
negatively for the user.  Often manifesting in brightness learning to
be too low.

The quick succession changes can happen in various situations, but
were most prominent on startup before and after a valid lux is read.

The fix is the revamp the data synchronization algorithm we use in
BrightnessSynchronizer to have updates + confirmation callback be
treated as an atomic operation before executing any other updates
that come in.  In the example above, that means we run (1) (2) and (4)
before handling the new update found in (3).

Fixes: 227483176
Test: Manually verify through debug logging.
Test: atest BrightnessSynchronizerTest
Change-Id: I93856fd74e50bcda04e88a7b7e736e02faa76c8e
2022-05-19 00:13:50 +00:00