Commit Graph

19497 Commits

Author SHA1 Message Date
Taran Singh
7a94646a65 Merge "Improve handwriting Ink window lifetime" 2022-08-25 04:37:22 +00:00
Pascal Mütschard
a8daba0e25 Merge changes I2fb29edd,I942c7053
* changes:
  DCL is broken and should not be used.
  Check the DeviceConfig permission early.
2022-08-24 07:43:21 +00:00
Taran Singh
ba58e63d52 Merge "Introduce Scribe Rich gestures API" 2022-08-24 06:40:48 +00:00
Joanne Chung
140dff9b49 Merge "Fix toolbar announce wrong text." into tm-qpr-dev am: 3292a30a1c am: ff672bc4db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19632605

Change-Id: Ib9ed18b9de38598e639a526fdb3d63dd39751cc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 05:57:41 +00:00
Calvin Pan
2d2b57bc99 Merge "Using different strings for language/region picker" 2022-08-24 05:40:27 +00:00
Joanne Chung
ff672bc4db Merge "Fix toolbar announce wrong text." into tm-qpr-dev am: 3292a30a1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19632605

Change-Id: If97f639c018bec3bcdb7e66b4e0d6b5b0848eadd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 01:12:26 +00:00
Joanne Chung
3292a30a1c Merge "Fix toolbar announce wrong text." into tm-qpr-dev 2022-08-24 01:07:32 +00:00
Taran Singh
f092a7cb23 Improve handwriting Ink window lifetime
1. When the system removes the last known stylus device
and has no other stylus available, remove the Ink window.

2. Create InkWindow only if the device+IME combination supports
handwriting and the stylus is being used.

Bug: 243571274
Bug: 239121683
Bug: 210039666

Test: atest StylusHandwritingTest
Change-Id: Icd3eea91fe144cff7100d3ecf19191c064c0d196
2022-08-24 00:24:04 +00:00
Hai Zhang
c9397f5342 Merge "Fix FastDataOutput.writeInternedUTF() when over 65534 strings." 2022-08-23 23:19:14 +00:00
Philip Junker
80068f1721 Merge "Remove BatteryStats user activity types and use PowerManager ones instead." into tm-qpr-dev am: 28930b91d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19674343

Change-Id: Ie5403d7839b0104af9e01b9580dd7dc424165343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-23 20:44:56 +00:00
Dmitri Plotnikov
23d6326b82 Merge "Revert "Breaking history writing out of BatteryStatsImpl"" 2022-08-23 16:44:21 +00:00
Pascal Muetschard
24a356607c DCL is broken and should not be used.
Use the acceptable instance holder pattern as a replacement.

Change-Id: I2fb29edd48e00ac36a7fb0907a21ae5ca1d5163f
2022-08-23 17:40:57 +02:00
Pascal Muetschard
51f38fb6f3 Check the DeviceConfig permission early.
This causes the permission error to be thrown from the thread that
creates the JankMonitor rather than some background thread. This makes
it easier to debug the permission error and can prevent crashes due to
unhandled exceptions from background threads.

Change-Id: I942c705342962ce6e15ae5cd6041dc85f6f83a95
2022-08-23 17:40:56 +02:00
Philip Junker
28930b91d8 Merge "Remove BatteryStats user activity types and use PowerManager ones instead." into tm-qpr-dev 2022-08-23 14:54:04 +00:00
Philip Junker
79e517c3d4 Remove BatteryStats user activity types and use PowerManager ones instead.
Add millisSinceLastUserActivity and lastUserActivityEvent to PowerGroup log when dozing.
Add timeout to PMS log when dozing.

Bug: 243518837
Test: atest BatteryStatsTests
Test: atest PowerManagerServiceTest
Test: manually observe logs using logcat / adb bugreport
NoNonSdkCheck: USER_ACTIVITY_TYPES is only accessed indirectly by apps through dumpLocked() method.
Change-Id: I835992a08bd4a07350e36ef671c6273c8fee43a0
(cherry picked from commit bf794e4585)
Merged-In: I835992a08bd4a07350e36ef671c6273c8fee43a0
2022-08-23 14:48:09 +00:00
Calvin Pan
817ad35385 Using different strings for language/region picker
In zh_TW, the "suggested" translated as "suggested language"
in language/region picker. Using different words to translate to
"suggested language" and "suggested region".

Bug: 243016620
Test: Manually check the UI.
Change-Id: I2edf82039b8dd37ca27ce831efa1cfa1474c8efb
2022-08-23 08:49:36 +00:00
Daniel Kim
9b6bc69594 Merge "Revert "DCL is broken and should not be used."" 2022-08-23 00:21:35 +00:00
Andrew Chant
a7ee33e7a7 Revert "Breaking history writing out of BatteryStatsImpl"
This reverts commit 62242bdca3.

Reason for revert: ramdumps on ToT related to battersystats parcel parsing
Bug: 243434675

Change-Id: I18522929f5a1499f56a0cc19606c28a2ed9fc26d
2022-08-22 21:54:00 +00:00
Taran Singh
3e3ff1a3d2 Introduce Scribe Rich gestures API
During a stylus handwriting session, user can perform a
stylus gesture operation like  Select, delete, insert on an
area of text. IME needs APIs to perform these gestures on text.
This CL introduces API signature for Select, delete, insert gestures.

Design doc: go/scribe-gestures-api

Bug: 239783077
Bug: 210039666
Test: Manually build & compile HandwritingIme

Change-Id: I53bcb62e03ac1c371feb60d1385c88c921754092
2022-08-22 14:22:47 -07:00
Daniel Kim
11822c7941 Revert "DCL is broken and should not be used."
This reverts commit ab0cbeffdf.

Reason for revert: Droidmonitor-triggered revert due to breakage
Bug: b/243389642

Change-Id: I2121840da7bba800d3a6fbe2228ce70c952d11e6
2022-08-22 18:56:21 +00:00
Pascal Mütschard
43e8c6ff04 Merge "DCL is broken and should not be used." 2022-08-22 14:15:11 +00:00
Pascal Muetschard
ab0cbeffdf DCL is broken and should not be used.
Use the acceptable instance holder pattern as a replacement.

Change-Id: I0164b8c17db4e6e15aee5a862fa8e625a9b1bbf4
2022-08-22 13:00:03 +02:00
Hai Zhang
078f6dd69f Fix FastDataOutput.writeInternedUTF() when over 65534 strings.
The existing code casts mStringRefs.size() to short before comparing it
with 65535, so that the comparison will always evaluate to be smaller
even when the size is actually bigger.

Instead of trying to play around with short and int conversion, it's
more reliable and future-proof to simply represent unsigned short as int
- writeShort() is already accepting int instead of short anyway.

Bug: 243194720
Test: presubmit
Change-Id: Ia2738db57773fa21059b24cc875c07f8facec3c5
2022-08-20 01:24:27 +00:00
Dmitri Plotnikov
df4a00579f Merge "Breaking history writing out of BatteryStatsImpl" 2022-08-20 00:28:27 +00:00
Siim Sammul
13349be4e5 Merge "Revert "Initialize binder latency histograms collection via Bind..."" 2022-08-19 20:59:37 +00:00
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
Joanne
53d6f568ec Fix toolbar announce wrong text.
This is a regression during refactor toolbar code, we don't intent
to announce the toolbar popup window so we should not set content
description for the container.

Bug: 239563674
Test: manual. Turn on talkback and make sure the announce is correct
and the behavior is the same
Test: atest TextViewIntegrationTest pass for local/remote
Test: atest TextViewActivityTest pass for local/remote
Test: atest SuggestionsPopupWindowTest pass for local/remote

Change-Id: I6e30d2f6d9a2c4905b702c25655fe5e4eb7de5d5
2022-08-19 13:42:24 +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
Siim Sammul
e683a42455 Revert "Initialize binder latency histograms collection via Bind..."
Revert "Initialize binder latency histograms collection via Bind..."

Revert submission 17123043-binder-latency-wifi

Reason for revert: unexpected increased memory usage
Reverted Changes:
I2cb0f7b69:Initialize binder latency histograms collection vi...
Id12e3a515:Fix unit tests due to change to binder latency col...
I26dbd757b:Add cts test for WifiFrameworkInitializer for bind...
I0d76cbcb3:Initialize binder latency histograms collection vi...

Change-Id: Ic1450c59e5fdea37133856711f50c90c97e42325
2022-08-17 15:25:34 +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