Commit Graph

18731 Commits

Author SHA1 Message Date
Vadim Caen
9e2a134dde Merge "Prevent callback registration when back flag is disabled" into tm-dev am: 1c6de844ce am: 0592820f44
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18794217

Change-Id: I367c3888b726f0f7c83d382881741478e715d549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 21:19:32 +00:00
Vadim Caen
a2e45f1ed1 Prevent callback registration when back flag is disabled
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.

Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible

Bug: 235206960

Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2d)
2022-06-20 11:40:18 +02:00
Nick Chameyev
f3697ffee8 Merge "Update the number of columns on config change in share sheet" into tm-qpr-dev 2022-06-20 09:24:35 +00:00
Hui Yu
9e578ed3ac Merge "Fix the missing history event problem." into tm-dev am: 25019b3782 am: f6743c032c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18582121

Change-Id: I94c52ccbdc1b734d16f3dc9f99023e7a17973000
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 18:32:18 +00:00
Hui Yu
25019b3782 Merge "Fix the missing history event problem." into tm-dev 2022-06-16 18:03:26 +00:00
Nick Chameyev
9f3eb8d046 Update the number of columns on config change in share sheet
mMaxTargetsPerRow wasn't updated in the chooser
multi profile pager adapter, this adapter sets
the number of columns in the grid layout manager.
This led to incorrect number of columns when display
size changes in runtime.

Bug: 235572712
Test: open share sheet, fold the device =>
 check that the number of columns is updated
Change-Id: I1f3f3bff8a4d23909ccd4c00b74091183c28821b
2022-06-16 14:17:35 +00:00
huiyu
ae5e234cec Fix the missing history event problem.
[ag/8009931 is to fix the missing event problem and it get reverted in ag/15961577.
Now revert the change that causes the problem.]

Make a copy of mHistoryCur and add the copy to history buffer after
starting a new history file.

Bug: 230799882
Test: ag/8009931 reproduce steps.
Change-Id: If9339ed5182b65b9c59c119894e4f317b2e5751c
2022-06-15 12:55:09 -07:00
Tiger Huang
42ff37a278 Merge "Don't force IME drawing system bar backgrounds" into tm-qpr-dev 2022-06-15 05:34:36 +00:00
Matt Casey
01ca540e02 Merge "Finish mini-resolver after user action." into tm-dev am: 831370bffb am: 68bdb03d0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18838611

Change-Id: I2c7712973096e672492f797d0b30249a26ef595c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 16:29:20 +00:00
Matt Casey
831370bffb Merge "Finish mini-resolver after user action." into tm-dev 2022-06-13 15:46:13 +00:00
Tiger Huang
ff4891638d Don't force IME drawing system bar backgrounds
If IME doesn't have FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, DecorView won't
show the color views for providing background color of system bars.
DecorView will call Window#onDrawLegacyNavigationBarBackgroundChanged
when the flag is changed. This gives NavigationBarController a chance
to decide whether to draw the legacy navigation bar background for the
IME or not.

Bug: 201375975
Test: Show IME in combinations of
      a. floating mode or non-floating mode
      b. gesture navigation or 3-button navigation
      c. taskbar or navigation bar
      d. light theme or dark theme
      And see if there is anything unexpected
Change-Id: If7ac32e2b874c04a260d542cb6a7595288aae182
2022-06-13 12:24:57 +00:00
Yurii Zubrytskyi
4c2b5c8470 Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d am: 801d350fff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: Ia19898c436e9b168efebc363ec19e9d3f10084a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:38:11 +00:00
Yurii Zubrytskyi
120aa88d0d Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev
* changes:
  Catch parsing errors for pre-release platforms
  Revert "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE"
2022-06-11 05:42:37 +00:00
Matt Casey
5b015f84af Finish mini-resolver after user action.
Bug: 235440512
Test: Trigger mini resolver, press each button and press back and verify
      the resolver is gone.
Change-Id: Ib22f7f38b4c5f7143b5898dbc3c74e3c7a0450f3
2022-06-10 18:06:18 +00:00
Daniel Sandler
4e8afe4a98 Merge "Android 1<3." into tm-dev am: 0f8269e68e am: 24650a74b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18819106

Change-Id: I857bbfe8bb337fae261354cf77efe9f892273fbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 02:17:41 +00:00
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
5af97d922d Merge "Fix unbind crash in AbstractRemoteService." into tm-dev am: dc9db874ba am: c3d3577bff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18691109

Change-Id: Ifa3ed59124b1fd321f5a6134b82f4d1a0dd6bb16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 16:38:48 +00:00
TYM Tsai
dc9db874ba Merge "Fix unbind crash in AbstractRemoteService." into tm-dev 2022-06-07 16:00:13 +00:00
Yurii Zubrytskyi
bb146e1b71 Catch parsing errors for pre-release platforms
In cases when a parsed APK is built with a pre-release platform
(e.g. Tiramisu for 33) our generic parsing code may not fail, as
it is called for user packages as well, and a single bad package
may disable the whole device.

Bug: 233398506
Test: presubmits

Change-Id: I7f93176efceac94b0768d0e4d5be1c28ccce23e3
2022-06-06 15:00:44 -07:00
Mark Renouf
2c108ffdf4 Merge "Fix crash in DisplayResolveInfo writeToParcel impl" into tm-dev am: 08a70e40fb am: 6c61b6a9e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18715227

Change-Id: I3add4d0f4a3fd65b4100f4eb1a197ea5358d3f06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 13:02:40 +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
Mike Schneider
2b75a2405b Merge "Add enum entries for HADE_DIALOG_OPEN and USER_DIALOG_OPEN interactions" into tm-qpr-dev 2022-06-03 11:37:59 +00:00
Iris Yang
8f9b4c1001 Merge "Wire display context for text toasts" into tm-dev am: ca6ef9125d am: 7bb2e73638
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18660549

Change-Id: I42afc6f189017626af58bd2cd58d197ec68f9a3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 03:40:28 +00:00
Iris Yang
ca6ef9125d Merge "Wire display context for text toasts" into tm-dev 2022-06-03 02:58:01 +00:00
Mike Schneider
dca1ed7037 Add enum entries for HADE_DIALOG_OPEN and USER_DIALOG_OPEN interactions
Bug: 232908404
Test: build pass
Change-Id: I5b4aa1edb32604efa2ca12a121386af9793ffb30
2022-06-02 14:41:50 +02:00
TreeHugger Robot
56115274cc Merge "Update fgs manager message and remove dot" into tm-dev am: bba9932a6b am: 6b086c70fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18705774

Change-Id: Iddb682378a3cbcf65406ec1fde153d6148accd38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 05:34:14 +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
Automerger Merge Worker
4fdd4ef2ef Merge "Merge "Fix ResolverDrawerLayout child measurement" into tm-dev am: a834a9bd52" into tm-d1-dev am: 487cabc548
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18625112

Change-Id: If7a58bbbef7ea481e6385f3140b0adb6b37686dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 20:07:54 +00:00
Matt Casey
a834a9bd52 Merge "Fix ResolverDrawerLayout child measurement" into tm-dev 2022-06-01 19:03:44 +00:00
Vadim Caen
8406eaa17c Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev am: a147b66f61 am: 5d5f6b1cc1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601925

Change-Id: I79fd95197414b8cbd8ddc87c45a18866d64f4c2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 15:46:26 +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
9c949ef5a0 Merge "Fix Chooser enter transition animation" into tm-dev am: 8d5bcaa534 am: 368670caf1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18609372

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

Change-Id: I90d14241931de639e57f74705f92b2c4e90a95de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 18:28:41 +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
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
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
cb002db9c3 Merge "Minimize distance between text and pin in direct share row" into tm-dev am: 59ebb04c78 am: c3e50ddbdf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18521525

Change-Id: I610bc7f21235f264e2b12508cd09de9b9620ffaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 02:55:44 +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
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
17a7bb10bb Merge "Fix using incorrect view in app language selection" into tm-dev am: fa264b81be am: 8a677d4a0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18579445

Change-Id: I24d2060057bfb208ba2c7d6981f540848ecc7cff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 07:45:27 +00:00