Commit Graph

18764 Commits

Author SHA1 Message Date
Daniel Sandler
0f8269e68e Merge "Android 1<3." into tm-dev 2022-06-10 01:19:44 +00:00
Dan Sandler
2c57c9c164 Android 1<3.
Fixes: 216297617
Test: adb shell am start -n android/com.android.internal.app.PlatLogoActivity
      adjust clock to 13:00
      for a bonus, long press on the bubbles
Change-Id: I3d32d452c6dd7a7e69aad86a033aba09ae8625d5
2022-06-09 12:54:27 -04:00
TYM Tsai
dc9db874ba Merge "Fix unbind crash in AbstractRemoteService." into tm-dev 2022-06-07 16:00:13 +00:00
Mark Renouf
08a70e40fb Merge "Fix crash in DisplayResolveInfo writeToParcel impl" into tm-dev 2022-06-04 12:13:21 +00:00
Mark Renouf
9d5f710317 Fix crash in DisplayResolveInfo writeToParcel impl
This fixes an incorrect use of List.toArray() leading to a crash

When passed no arguments, toArray returns an Object[] and not T[],
hence the unchecked cast will throw ClassCastException when this is run.

This change cleans up the parcelable implementation by replacing
writeParcelableArray with writeTypedList, which is more efficient and
avoids the conversion to/from an array entirely.

Bug: 200347466
Test: Take screenshot, tap share, long press an app, short press power
Change-Id: I225664c8709502c7e45ac06c2858c0c5ac0b7506
2022-06-03 19:50:38 +00:00
Iris Yang
ca6ef9125d Merge "Wire display context for text toasts" into tm-dev 2022-06-03 02:58:01 +00:00
TreeHugger Robot
bba9932a6b Merge "Update fgs manager message and remove dot" into tm-dev 2022-06-02 05:18:03 +00:00
Evan Severson
280ea9072d Update fgs manager message and remove dot
Test: Build and start a foreground service
Fixes: 234476539
Change-Id: Ib85f68e5517498c3e6441d246cc9b3feb1c5de1d
2022-06-01 17:45:21 -07:00
Matt Casey
a834a9bd52 Merge "Fix ResolverDrawerLayout child measurement" into tm-dev 2022-06-01 19:03:44 +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
Iris Yang
c0055b9b7b Wire display context for text toasts
Toast doesn't work correctly for multi-display. When default display's
screen off, the toast wouldn't be able to show on secondary display.
Without this change, default display screen state will cause text toasts
doesn't correctly show up.

Bug: 233717651
Test: atest ToastUITest
Change-Id: I1705bc71062fa28c378bf7cc02d104c0f53ce865
2022-06-01 11:28:15 +08:00
Ahaan Ugale
67815e4fd8 Fix unbind crash in AbstractRemoteService.
Crashes if there's an attempt to unbind when the service isn't already
bound. It's unclear which service is triggering this code path though.

Fix: 230543089
Change-Id: Ia108c709ed3c82ca18e581b464c963d52e108a3e
2022-06-01 02:07:17 +00:00
Matt Casey
8d5bcaa534 Merge "Fix Chooser enter transition animation" into tm-dev 2022-06-01 01:13:49 +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
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
59ebb04c78 Merge "Minimize distance between text and pin in direct share row" into tm-dev 2022-05-27 02:13:03 +00:00
Andrey Epin
c91318ace9 Fix ResolverDrawerLayout child measurement
ResoverDrawerLayout didn't take into account its horizontal paddints
when measured its children.
Plus a trivial refactoring.

Fix: 223775954
Test: Manual test: open Chooser in landscape mode on a phone with
3-button navigation.

Change-Id: Ia4835a2ddb52bff4ba36597dea3a3d7bf83967aa
2022-05-26 16:05:00 -07: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
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
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
edca30dce8 Merge "Fix inline tooltip position is wrong" into tm-dev 2022-05-25 01:05:17 +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
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
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
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
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
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
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
TreeHugger Robot
5843318c84 Merge "Add latency instrument for loading share sheet" into tm-dev 2022-05-18 15:45:53 +00:00
Miranda Kephart
be2681d3e9 Merge "Hide edit buttons on clipboard and clipboard smart actions" into tm-dev 2022-05-18 14:54:38 +00:00
Issei Suzuki
61a7196fb5 Merge "Revert ProtoLog to Slog in framework.jar" into tm-dev 2022-05-18 09:29:22 +00:00
Matt Casey
2f6f3aa732 Merge "Style fixes for mini resolver" into tm-dev 2022-05-18 02:12:04 +00:00
Matt Casey
122b4a434a Style fixes for mini resolver
Make the icon 48dp.
Update button style to be opaque for "Open" and outlined for the browser
button.
Fix button padding at the bottom.

Test: Visual inspection with UX. Tested in gesture/3-button + light/dark
      theme
Bug: 175433480
Change-Id: I9304ee6fed28a467fcc54630dab18aaf4f140986
2022-05-17 16:55:21 +00:00
Miranda Kephart
3ede8bc62a Hide edit buttons on clipboard and clipboard smart actions
Guarded behind flags (but defaulted to "don't show").

Bug: 232521394
Bug: 232521320
Fix: 232521394
Fix: 232521320
Test: manual
Change-Id: Ia5899ad965e1466294b14f2991efe186ce3ced31
2022-05-17 15:51:14 +00:00