Commit Graph

19657 Commits

Author SHA1 Message Date
Taran Singh
4b5d696935 Add consumer callback in performHandwritingGesture()
performHandwritingGesture should take an optional IntConsumer
& executor to provide result of Gesture operation back to IME.

Bug: 210039666
Bug: 239783077
Test: atest InputConnectionEndToEndTests

Change-Id: I2ca7eaa182159b7ffef0812d970512ffcf817ce2
2022-08-25 13:58:44 -07:00
Taran Singh
f135f8952b Add supported gesture type to EditorInfo
Editors should declare which Scribe Gestures do they support
as a means of providing this info to IME.

Bug: 239783077
Test: atest CtsInputMethodTestCases

Change-Id: Ic52a48c0a04d405e65ad49e9d447d603fefb4eb0
2022-08-25 13:58:44 -07:00
Dmitri Plotnikov
f764657905 Merge "Revert "Revert "Breaking history writing out of BatteryStatsImpl""" 2022-08-25 18:05:01 +00:00
Liahav Eitan
2774590fe5 Merge "Fix sharing to another profile where an app has multiple targets" into tm-qpr-dev am: 6dae9d46b7 am: ce7a4f30b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19657256

Change-Id: Ie591257c0015653bc70679283dcd600e8110d09d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 10:39:31 +00:00
Liahav Eitan
ce7a4f30b7 Merge "Fix sharing to another profile where an app has multiple targets" into tm-qpr-dev am: 6dae9d46b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19657256

Change-Id: I41807e6379e252fce1930eb3d6ade32af2cf6ed8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 10:20:06 +00:00
Liahav Eitan
6dae9d46b7 Merge "Fix sharing to another profile where an app has multiple targets" into tm-qpr-dev 2022-08-25 09:59:52 +00:00
Taran Singh
7a94646a65 Merge "Improve handwriting Ink window lifetime" 2022-08-25 04:37:22 +00:00
Calvin Pan
6198fd99ab Merge "Using different strings for language/region picker" into tm-qpr-dev am: ee666baeac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19706830

Change-Id: Ie3d0b0864bd1f8bf29e5ae220f1c1b903ac58b34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 10:12:13 +00:00
Calvin Pan
ee666baeac Merge "Using different strings for language/region picker" into tm-qpr-dev 2022-08-24 09:30: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
fecb3aed37 Revert "Revert "Breaking history writing out of BatteryStatsImpl""
This reverts commit a7ee33e7a7.

Reason for revert: Rolling the change forward

Change-Id: If6847dbe91e901ca07a0cde402b366b2a3d1f46a
2022-08-23 18:24:14 +00:00
Dmitri Plotnikov
23d6326b82 Merge "Revert "Breaking history writing out of BatteryStatsImpl"" 2022-08-23 16:44:21 +00:00
Liahav Eitan
15e2b0fe84 Fix sharing to another profile where an app has multiple targets
Moves the fixUris call from onTargetSelected directly to the intent
launch to ensure the intent which is actually started is updated with
userId specific URIs.

Bug:242165528
Bug:242605257
Test: manually share image from personal profile to work gmail,
first with chat target then backing up and selecting the main target

Change-Id: Iabf5dcf2612fe718f2f0886e2e5e9b76f37af1e1
2022-08-23 16:05:45 +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
80e0a51b68 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
Merged-In: I2edf82039b8dd37ca27ce831efa1cfa1474c8efb
2022-08-23 08:56:05 +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