Commit Graph

19618 Commits

Author SHA1 Message Date
Fiona Campbell
9fc75e8977 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev am: a01ccaae13 am: 477064e500
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638897

Change-Id: If73108977792457238cab50ae67ed62e66e89096
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 17:36:07 +00:00
Fiona Campbell
477064e500 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev am: a01ccaae13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638897

Change-Id: I32169097c0b807836bb989f60111cedcd49191b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 16:11:34 +00:00
Fiona Campbell
a01ccaae13 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev
* changes:
  Add constraints to window duration scale
  Add constraints to animation duration scales
  Ensure animation scales are within bounds
2022-08-19 14:49:40 +00:00
Anna Zhuravleva
0e506112df Merge "Support selected item state in Bilingual Adapter." 2022-08-19 11:45:21 +00:00
TreeHugger Robot
d6a6060a26 Merge "Logs the activated session duration for magnification. (2/2)" into tm-qpr-dev am: 1c5d9e0c4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18185780

Change-Id: Ie96b62163da633023ffc4317ed92aaf13d9d04e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 09:18:11 +00:00
Daniel Hsieh
22783d8314 Logs the activated session duration for magnification. (2/2)
Uses the atom MagnificationFollowTypingFocusActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which its following typing focus is enabled.

The duration is accumulated by the time when the window magnifier and
the ime are all on. If one of them is off, we would pause the
accumulated timer. If a user moves the window magnifier to disables
this function, we would stop the accumulated timer and log the duration.

Bug: 216733714
Test: m statsd_testdrive & statsd_testdrive 453
      atest WindowMagnificationManagerTest
Change-Id: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
Merged-In: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
2022-08-19 06:39:59 +00:00
TreeHugger Robot
1ec0fe9575 Merge "Logs the activated session duration for magnification. (1/2)" into tm-qpr-dev am: 620e37edb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18185750

Change-Id: I0a228039c27a3251f53bae367e9e7e244ff6972e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 00:50:27 +00:00
TreeHugger Robot
620e37edb9 Merge "Logs the activated session duration for magnification. (1/2)" into tm-qpr-dev 2022-08-19 00:32:18 +00:00
Daniel Hsieh
5b5226eb81 Logs the activated session duration for magnification. (1/2)
Uses the atom MagnificationTripleTapAndHoldActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which is triggered by the triple-tap-and-hold gesture.

The duration is from the window magnifier's enabled time to its disabled
time.

Bug: 216733714
Test: atest WindowMagnificationGestureHandlerTest
      m statsd_testdrive & statsd_testdrive 452
Change-Id: I423ac39c167c89b0b2db931a616cdd34d6eb151c
Merged-In: I423ac39c167c89b0b2db931a616cdd34d6eb151c
2022-08-18 18:31:16 +00:00
Fiona Campbell
f73a728509 Add constraints to animation duration scales
Ensure that all uses of ANIMATOR_DURATION_SCALE are bounded between 0
and 20.

Bug: 238178261
Test: adb shell dumpsys window windows | grep "Animation setting"
Change-Id: I1f3797c5cf708f5c02ba8644ea9f703244d229a9
2022-08-18 16:11:39 +00:00
Joanne Chung
cf488547e4 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d am: 20dbe919b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Idabdc7d36d30c014d383163a2e01c51fa76bbf9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 13:51:33 +00:00
Anna Zhuravleva
ca2576868f Support selected item state in Bilingual Adapter.
Support highlighting of selected locale.
Day theme: https://hsv.googleplex.com/4914118977912832
Night: https://hsv.googleplex.com/4816141579976704

Test: atest, flashed to device
Bug: 214045093
Change-Id: Ia02331bff908a8a7193c3087c4341bfb22f5545b
2022-08-17 13:34:52 +00:00
Jernej Virag
0f82abd147 Merge "Prevent loading of Icon resources from the wrong package" into tm-dev am: e1e8b1b932 am: c4ebf2ba2a am: 3234afdaf3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601344

Change-Id: Ic6f224287054df1fd6573ab620f7807cfeef43b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 21:23:04 +00:00
Jernej Virag
bdb4b6cb43 Merge "Prevent loading of Icon resources from the wrong package" into tm-dev am: e1e8b1b932 am: 442888835a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601344

Change-Id: I6b9f5c8e94c665ea0acc98725700e6e116f4ae38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 21:03:41 +00:00
Jernej Virag
3234afdaf3 Merge "Prevent loading of Icon resources from the wrong package" into tm-dev am: e1e8b1b932 am: c4ebf2ba2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601344

Change-Id: Ibfc955f61506dc3e4aad8e7b19eeb9b8a91e77dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 21:03:38 +00:00
Jernej Virag
442888835a Merge "Prevent loading of Icon resources from the wrong package" into tm-dev am: e1e8b1b932
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601344

Change-Id: Ic76115d619334a3e2688da0082d806c8b2944832
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 20:27:58 +00:00
Charles Chen
fac95c2490 Merge "Fix violation in DecorContext" into tm-qpr-dev am: 4cce97fd2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19632693

Change-Id: I36bf141b2eea91709e28ddd272e2c694fe2da8fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 20:09:37 +00:00
Charles Chen
4cce97fd2e Merge "Fix violation in DecorContext" into tm-qpr-dev 2022-08-16 18:51:03 +00:00
Charles Chen
d9bdee7fa0 Fix violation in DecorContext
The issue happens when activity is launched on the secondary
display. It's because the base context of DecorContext is
a DisplayContext, but we should check #isConfigurationContext in
associatd window's Context instead, like DecorContext#isUiContext

fixes: 242571036
Test: manual - launch activity on the secondary display

Merged-In: Ie2659fb31248ad64099018bfebb6a6b43c72f466
Change-Id: Ie2659fb31248ad64099018bfebb6a6b43c72f466
2022-08-16 15:22:49 +00:00
Joanne Chung
20dbe919b1 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Ie4da503e5f569625c807bef1a194764cb5e133fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:08:55 +00:00
Joanne Chung
9e263e643d Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev 2022-08-16 10:00:57 +00:00
Wilson Wu
908c368411 Merge "Refine {SHOW,HIDE}_MY_SOFT_INPUT constants" into tm-qpr-dev am: 08fc972311
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19569434

Change-Id: I4f26a508aa1e2081f4afcdf62ca00dc1d0a1949c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:01:38 +00:00
Wilson Wu
08fc972311 Merge "Refine {SHOW,HIDE}_MY_SOFT_INPUT constants" into tm-qpr-dev 2022-08-16 08:37:12 +00:00
Charles Chen
1779ab1e5d Fix violation in DecorContext
The issue happens when activity is launched on the secondary
display. It's because the base context of DecorContext is
a DisplayContext, but we should check #isConfigurationContext in
associatd window's Context instead, like DecorContext#isUiContext

fixes: 242571036
Test: manual - launch activity on the secondary display

Change-Id: Ie2659fb31248ad64099018bfebb6a6b43c72f466
2022-08-16 02:16:54 +00:00
Taran Singh
e609a5f25a Merge "Don't auto subscribe to CAI for stylus handwriting" 2022-08-16 00:30:13 +00:00
Jernej Virag
32f176e470 Prevent loading of Icon resources from the wrong package
If an Icon carries package designator, LocalImageResolver has now
ignored it. This could lead to loading of a wrong icon in cases where
the ID collided with the same ID in android package.

This is fixes that corner-case.

Bug: 241066484
Test: atest LocalImageResolverTest - the new test checks for pkg
      correctness and fails on devices without this cl

      manual test: bluejay device with known, reproducible resource
      collision in media player notification. In reproducible case,
      icon appears as a broken block.

      After applying this patch, small icon in media notification loads
      correctly for the collision case.

Change-Id: Ic79c0d4acb1d347a24282972e009a5a079ce6c21
2022-08-15 10:07:01 +00:00
Mark Renouf
11bdf8e245 More minor cleanups to ScreenshotRequest am: 930b8b78b6 am: 6545c5a0ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19509205

Change-Id: I407cb95a640361ce677ff6d97a5b7c1b8d17cf07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-13 00:13:20 +00:00
Mark Renouf
6545c5a0ce More minor cleanups to ScreenshotRequest am: 930b8b78b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19509205

Change-Id: I03d3d91a5b18b93349e6d3c5550d1d0de1082709
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 23:55:23 +00:00
Mark Renouf
930b8b78b6 More minor cleanups to ScreenshotRequest
* Adds screenshotType into the request instead of relying on the
Message it is sent in (msg.what).

* Adds a constructor which accepts type, source and topComponent

* Adds more @IntDef annotations to `int` constructor args

Bug: 231957192
Test: atest ScreenshotHelperTest
Change-Id: If4bf8ef1b889e4e7b2fabf195a538a13664cce12
2022-08-12 23:33:53 +00:00
Joanne Chung
9325f9b97e Fix system toolbar doesn't use correct theme.
The toolbar should set the theme to the app's theme. Because the
service cannot get the application context, we should pass this
information from application to service.

Bug: 218833400
Test: manual. Use light/dark theme for app, the toolbar shows with
the same theme
Test: atest TextViewIntegrationTest
Test: atest android.widget.TextViewActivityTest

Change-Id: I6d4e4e117c680ce57e760a87987059eded09b2bc
2022-08-12 16:54:34 +00:00
TreeHugger Robot
6c0ded41ef Merge "Fix lines >100 chars and unnecessary fully-qualified class names" into tm-qpr-dev am: 6bb157dd3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19593554

Change-Id: If80bca5d787a4bd5808e54accd85cf893172eec8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 19:54:14 +00:00
Taran Singh
5854c92bad Don't auto subscribe to CAI for stylus handwriting
In [1] & [2] we introduce auto-subscription for editor bounds to IME. However,
it is actually better for IME to do it due to following reasons:
1. Simpler for IMEs do it. Easier state management in IME as to
   what is subscribed.
2. IME can subscribe to CusrosAnchorInfo as early as onStartInput(), which
   delivers required CAI even sooner to IME resulting in faster
   Handwriting startup.
3. We cannot predict what data IME may need. e.g. IME may not
   implement Rich handwriting gestures and hence may not need line
   bounds (Line bounds will be added in near future).

This CL essentially mechanically reverts [1] and a small part of [2]
No user observable behavior change.

[1] I3d6b1728d62139785593af14c24cb52bf2c91e31
[2] Ibba06e9a2533ca91c5cc215dfb18d21c9a74fb73

Fix: 238970465
Bug: 203086136
Bug: 210039666
Bug: 215533103
Test: atest CtsInputMethodTestCases
Change-Id: Ia72a9fe0ceac1798ee1989eaae3906e8e1b696bf
2022-08-11 18:31:42 +00:00
Ben Miles
e4cfe35ee9 Add TimeoutRecord
This class contains structured data about a timeout. In this context a timeout is something about to become an ANR (as long as it passes the various ANR deduping/skipping checks). Types of timeout include input dispatch timeout, broadcast receiver timeout etc.

It wraps the ANR subject and contains useful metadata like the value of the system uptime clock when the timeout actually triggered. This is foundational work so that ANR stack latency can be measured and tracked. It will also enable us to log more useful ANR information in perfetto traces.

go/timeout-record

Bug: b/239390223
Test: atest FrameworkServicesTests
Change-Id: I6541b13b4862f6878383d17ba96058b39d36718c
2022-08-11 16:25:31 +00:00
Mark Renouf
020439dcac Fix lines >100 chars and unnecessary fully-qualified class names
Bug: 231957192
Change-Id: If06068802f1358b2708df30338c772d27442266b
Merged-In: If06068802f1358b2708df30338c772d27442266b
2022-08-11 14:35:15 +00:00
Chavi Weingarten
619dfd599a Merge "Use layer mirroring when screen recording via VD" 2022-08-10 21:58:58 +00:00
Joanne Chung
c4d1b9e6d6 Revert "[DO NOT MERGE] Remove selection toolbar code from build time" am: 888e79f7a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19204106

Change-Id: I2eed4842d349cb38bd488793cd4bfdf672d4c3cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 09:19:11 +00:00
Joanne Chung
9cc6ab62b2 Merge "Revert "[DO NOT MERGE] Remove selection toolbar code from build time"" into tm-qpr-dev 2022-08-10 08:38:51 +00:00
Wilson Wu
2ac25627d8 Refine {SHOW,HIDE}_MY_SOFT_INPUT constants
Naming of SoftInputShowHideReason#{SHOW,HIDE}_MY_SOFT_INPUT
constants may not clear enough to indicate its semantics.

Improve show/hide reasons of InputMethodService by:

-. Update constants naming to {SHOW,HIDE}_SOFT_INPUT_FROM_IME.
-. Introduce respective reasons to indicate different hide request
   cases within IME process.

Bug: 224565148
Bug: 241890033
Test: presubmit
Test: atest CtsInputMethodTestCases and observe logs
Change-Id: I8b148e9b5ab05ff7b827c6b8fe23008ca30a8c4b
Merged-In: I8b148e9b5ab05ff7b827c6b8fe23008ca30a8c4b
2022-08-10 11:51:59 +08:00
Chavi Weingarten
e64bae455e Use layer mirroring when screen recording via VD
When a Display has the flag VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, the
content on the display is expected to mirror another display. This was
previously done by setting the same layerStack. This change removes that
behavior and instead will create a mirror hierarchy of the other display
and place it at the root of the new Display. This is leveraging the work
done for ContentRecorder, but using it as default for all displays
instead of only for VD created by MediaProjection.

Test: Screen record via MediaProjection
Test: Screen record via DisplayManager
Test: ContentRecorderTests
Test: DisplayContentTests
Bug: 237664947
Change-Id: I18b36dadc43ba1c37f9516ff10d24bb8683c04ac
2022-08-09 16:45:56 +00:00
Kean Mariotti
4e008a8ace Traces with real-to-elapsed time offset
Add real_to_elapsed_time_offset_nanos field to protobuf traces:
- Accessibility
- IME
- WindowManager

Bug: 235196806
Change-Id: I922a85edb940719c27028623c26208ece016b9b2
Test: record and view accessibility + IME + WindowManager traces with winscope
2022-08-09 14:05:04 +00:00
TreeHugger Robot
c5f64f47ad Merge changes from topic "b/232475788-frameworks/base" into tm-qpr-dev am: 317201974a am: b446de7503
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19457538

Change-Id: I0b05e29bd38798ee0a15303757adc61f378d370e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-08 15:43:06 +00:00
TreeHugger Robot
b446de7503 Merge changes from topic "b/232475788-frameworks/base" into tm-qpr-dev am: 317201974a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19457538

Change-Id: Ia79695069f20fe1a66db965780cf7d8532325db6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-08 15:31:09 +00:00
TreeHugger Robot
317201974a Merge changes from topic "b/232475788-frameworks/base" into tm-qpr-dev
* changes:
  Handle install-constraints tag.
  Scaffolding: reject installs based on device fingerprint
2022-08-08 15:12:29 +00:00
Siim Sammul
92e2e6bdfb Merge "Initialize binder latency histograms collection via BinderCallsStats for the Wifi process. The same collection is already active for system_server, Bluetooth, and Telephony." 2022-08-08 13:06:28 +00:00
Joanne Chung
888e79f7a0 Revert "[DO NOT MERGE] Remove selection toolbar code from build time"
This reverts commit ade911b9c7.

Reason for revert: The feature is planned to run a study in QPR1
with the aim of launching in QPR-2. The code will be removed from
build time before QPR1 finalized.

Change-Id: Ida04260a1196121bb4084b527216aae1e4e6ec54
2022-08-08 11:02:44 +00:00
TreeHugger Robot
30735e1165 Merge "Avoid too long trace section name to crash FrameTracker" into tm-qpr-dev am: 242b670b62 am: 979765606d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19429366

Change-Id: I465d6b2dfc0c525cd28dd1a827fb368236916943
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 20:50:06 +00:00
TreeHugger Robot
979765606d Merge "Avoid too long trace section name to crash FrameTracker" into tm-qpr-dev am: 242b670b62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19429366

Change-Id: I11c203a14f1a3f20c1e73640e12174ac89812f83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 20:24:00 +00:00
Ahan Wu
41998f864b Avoid too long trace section name to crash FrameTracker
android.os.Trace#beginSection limits the length of the section to 127,
otherwise, a IllegalArgumentException throws. We limit the length before
passing the argument to avoid this.

Bug: 239860117
Test: atest InteractionJankMonitorTest FrameTrackerTest
Change-Id: I3d9cbc65a8036c18680edf11aace0b324a1befb6
2022-08-05 16:53:31 +00:00
Siim Sammul
3a127427f2 Initialize binder latency histograms collection via BinderCallsStats for
the Wifi process. The same collection is already active for
system_server, Bluetooth, and Telephony.

Test: Binder calls stats collection is unit tested
Bug: 218318948
Change-Id: I2cb0f7b69758f23f5f16f9beef96d721d88def7b
2022-08-05 14:23:37 +00:00
Mark Renouf
bdb24e0ff3 Fix lines >100 chars and unnecessary fully-qualified class names
Change-Id: If06068802f1358b2708df30338c772d27442266b
2022-08-04 14:38:54 +00:00