Commit Graph

18181 Commits

Author SHA1 Message Date
TreeHugger Robot
d62c01d443 Merge "Introduce InputMethodNavButtonFlags" into tm-dev am: fca00d3193
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17108238

Change-Id: Iced5284614d59372477298d35290f0fa26167902
2022-03-07 22:09:59 +00:00
TreeHugger Robot
fca00d3193 Merge "Introduce InputMethodNavButtonFlags" into tm-dev 2022-03-07 22:00:58 +00:00
Prabir Pradhan
57671e44f6 Merge "Re-land "Use SOURCE_CLASS_POINTER as the default source for MotionEvent"" into tm-dev am: e2722fe948
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17106783

Change-Id: Ia5b3acafe9e38cd52a91aeea2a7e1d55934d1239
2022-03-07 20:50:03 +00:00
Yohei Yukawa
5f9f1ca560 Introduce InputMethodNavButtonFlags
This CL reworks my previous CL [1], which let
InputMethodManagerService report whether the IME switcher icon needs
to be shown or not to the IME process by using IInputMethod IPCs.

It turns out that we need to propagate one more boolean value in order
to address Bug 219820813.  It'd be much clearer if we use bit flags
rather than adding a new boolean parameter to each IPC method.  Thus
this CL rewrites my previous CL by using a bit flag defined in a newly
introduced InputMethodNavButtonFlags.

This is a purely mechanical refactroing.  There should be no behavior
change.

 [1]: I5de9ac0dc8670842edf66306bb4c281c77cea376
      75b935a12b

Bug: 215551357
Bug: 219820813
Test: Manually verified with for the following scenarios:
 * Enabling/disabling multiple IMEs
 * Attaching/detaching a hardware keyboard
 * Showing/hinding the IME switcher
 * Showing an IME on the lock screen
Change-Id: I81cb062a08d484ec8ce5d7b2fea64ce19028f82e
2022-03-07 10:47:47 -08:00
Prabir Pradhan
b4c49df850 Re-land "Use SOURCE_CLASS_POINTER as the default source for MotionEvent"
This reverts commit 3ccd2488c5.

Reason for revert: Blocking issues have been addressed,
ready to reland. See bug.

Bug: 213425347

Change-Id: I91a29949f87a0d27188b323bf302400ee19e964d
2022-03-07 12:55:25 +00:00
Robert Horvath
61684dd975 Merge "Expose getPreferKeepClearForFocusDelay as TestApi" into tm-dev am: d0b6f0a400
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16932090

Change-Id: Ie8aa6a80cf1c7b4d9d47764ce4e9457776e2af97
2022-03-07 12:28:44 +00:00
Robert Horvath
d0b6f0a400 Merge "Expose getPreferKeepClearForFocusDelay as TestApi" into tm-dev 2022-03-07 12:19:45 +00:00
TreeHugger Robot
1de25fdd28 Merge changes from topic "merge-input-config-feature-tm" into tm-dev am: d7a879e665
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17050822

Change-Id: I09837e1e157f2f0fc1161b7651d5617438ce60ee
2022-03-05 04:13:39 +00:00
TreeHugger Robot
d7a879e665 Merge changes from topic "merge-input-config-feature-tm" into tm-dev
* changes:
  Use InputConfig flags in InputWindowHandle API
  WindowInfo: Merge InputConfig and Feature flags
2022-03-05 03:53:59 +00:00
yingleiw
a3a06ac231 Rename ACTION_SHOW_SUGGESTSIONS TO ACTION_SHOW_TEXT_SUGGESTIONS
Fix: 217730256

Bug: 222537368

Test: Added test in EditTextTest (will merge later when reviewed).

Merged-In: I78354a0f1d955c5b7c1ead044ea49086b3479841
Change-Id: I78354a0f1d955c5b7c1ead044ea49086b3479841
(cherry picked from commit e1f392d171)
2022-03-04 16:42:54 -08:00
TreeHugger Robot
5a8bea1a5d Revert 'Adding definitions for AccessibilityAction directional swipes.'
This reverts commit 0de71ca543.

Reason for revert: Don't yet have a use for the definitions,
and will likely reimplement them differently. This is an adjusted
revert to account for a resource finalization error

Test: Is a reversion.

Bug: 222537368

Merged-In: I99a71551069069d117039af4708030772b741cea
Change-Id: I99a71551069069d117039af4708030772b741cea
(cherry picked from commit 65e5bf07c2)
2022-03-04 15:45:46 -08:00
Xiaowen Lei
a9ae470725 Merge "Fix [AndroidFrameworkRequiresPermission] build warnings for add(remove)KeyguardLockedStateListener." into tm-dev am: 788fe7cdb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17061596

Change-Id: I405c15eac94f8f3a70e66fe0d24993878fe1d169
2022-03-04 22:14:15 +00:00
Xiaowen Lei
788fe7cdb6 Merge "Fix [AndroidFrameworkRequiresPermission] build warnings for add(remove)KeyguardLockedStateListener." into tm-dev 2022-03-04 22:04:52 +00:00
Taran Singh
46c725f5c7 Merge "Introduce Stylus handwriting developer option" into tm-dev am: e12374c01c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16973624

Change-Id: Ib27c177a7d83080282e550ccc114cdff83cf7010
2022-03-04 18:32:17 +00:00
Taran Singh
e12374c01c Merge "Introduce Stylus handwriting developer option" into tm-dev 2022-03-04 18:21:20 +00:00
Xiaowen Lei
ac1a15b69a Fix [AndroidFrameworkRequiresPermission] build warnings for add(remove)KeyguardLockedStateListener.
These warnings triggered on ag/16873530. The warnings are like:

  [AndroidFrameworkRequiresPermission] Method addKeyguardLockedStateListener() annotated {allOf=[android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE]} but too wide; only invokes methods requiring [none]
      public void addKeyguardLockedStateListener(@NonNull @CallbackExecutor Executor executor,
                  ^
      If calling an AIDL interface, it can be annotated by adding:
      @JavaPassthrough(annotation="@android.annotation.RequiresPermission(...)")

Bug: 216630470
Test: n/a
Change-Id: I479063de6b591da44c474e4aa93e0466104d2a9a
2022-03-04 18:08:45 +00:00
Robert Horvath
6830bbd35b Expose getPreferKeepClearForFocusDelay as TestApi
This allows tests to check the behavior of automatically reporting the
focused View as a keep clear area.

Test: atest KeepClearRectsTests
Bug: 218494300
Change-Id: I602406572a540c4b5f77164efab28376faec2701
2022-03-04 17:46:00 +01:00
Prabir Pradhan
bdf0cb7262 Use InputConfig flags in InputWindowHandle API
Use the android.os.InputConfig flags to control input window behavior in
InputWindowHandle. This consolidates the old boolean flags and
inputFeatures flags into one set of flags so that the InputConfigs are
the sole set of flags that change change how an input window behaves.

After this change, InputFeatures and LayoutParamsFlags are specific to
WM, which is responsible for converting them into InputConfig flags.
Trivial conversions between these flags are done in InputConfigAdapter.

The LayoutParams type and flags are still part of the this API to send
these attributes to native code. However, they are no longer used by
input.

Bug: 216806304
Test: manual: verify touch functionality
Test: atest WindowStateTests
Change-Id: I5b384770272c111680783ee8ab01ecd6e03f42be
2022-03-04 13:08:59 +00:00
TreeHugger Robot
1cbe355eeb Merge "Disable system toolbar feature" into tm-dev am: bf41e89645
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17070788

Change-Id: Ia552ea613969fdbb4feb3f872a0fef1cbf38e5cb
2022-03-04 12:30:44 +00:00
TreeHugger Robot
bf41e89645 Merge "Disable system toolbar feature" into tm-dev 2022-03-04 12:29:52 +00:00
TreeHugger Robot
f2b8547fd8 Merge "Restrict getInputMethodWindowVisibleHeight" into tm-dev am: 761938ea59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16941141

Change-Id: I454208e50356ef61eadd9650f99a41a29771e1db
2022-03-04 10:31:35 +00:00
TreeHugger Robot
761938ea59 Merge "Restrict getInputMethodWindowVisibleHeight" into tm-dev 2022-03-04 10:08:20 +00:00
Joanne Chung
7f357d45d1 Disable system toolbar feature
The feature is punting to QPR1, disable feature by flag first. The
feature will strip from the build in the follow up change.

Bug: 190030331
Test: manual. Clear flag and make sure the feature is disable.
Change-Id: Id5e0efeff0465890a5d26ef10b6e54359f569317
2022-03-04 13:55:17 +08:00
Chavi Weingarten
8b58626267 Merge "Changed setSyncTransaction to syncNextTransaction with callback logic." into tm-dev am: 53f62e57cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988100

Change-Id: Ifdde57c9a8dd37be46dae07ed37629c8a94fcc49
2022-03-03 22:21:08 +00:00
Chavi Weingarten
53f62e57cf Merge "Changed setSyncTransaction to syncNextTransaction with callback logic." into tm-dev 2022-03-03 22:14:41 +00:00
Riley Jones
d903b03530 Merge "Revert 'Adding definitions for AccessibilityAction directional swipes.'" 2022-03-03 20:04:51 +00:00
Chavi Weingarten
8a93d1378a Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev am: 5dcd46d356
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17051013

Change-Id: I8081b90e365829921634576d05b770ea5d572898
2022-03-03 18:25:15 +00:00
Chavi Weingarten
5dcd46d356 Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev 2022-03-03 17:57:05 +00:00
Prabir Pradhan
ed142dcacb WindowInfo: Merge InputConfig and Feature flags
InputFeatureFlags are now a WM-only flag, but is temporarily used by
InputWindowHandle until the cleanup is completed.

Bug: 216806304
Test: atest libgui_test
Test: atest inputflinger_tests
Change-Id: I1260431e99d2c50261dc8b0356dc3e21ba76d39f
2022-03-03 17:00:33 +00:00
Vishnu Nair
797aa0066c SurfaceView: Synchronize all surface view changes with VRI draw
Re landing with the following changes:
We initially cloned the SurfaceControl handle to avoid locking when
accessing the SurfaceControl from the position listener callbacks
running from RT workers. But this meant the last reference to the
layer handle would only be released by GC. If SurfaceViews are
created and destroyed rapidly, we would be at the mercy of GC to
release buffers.

Original change:

There are three transaction queues that can submit SurfaceView
changes.

1. Buffer updates via BBQ apply token
2. SCC apply token
3. ViewRootImpl BBQ apply token

It makes sense for most SurfaceView changes to be synchronized with
ViewRootImpl draws since the caller can optionally synchronize the
change with main window content.

This change eliminates the tmp transaction that is applied directly
via the SCC apply token and instead applies them with the ViewRootImpl
draw transaction.

Also take the opportunity to scope down mSurfaceControlLock usage.

Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Test: run mem tests via forrest
Bug: b/217973491, b/221631942
Change-Id: Idba712d146e62d7346920dc4f060cba92d47fada
2022-03-03 16:07:15 +00:00
TreeHugger Robot
dc71c6ebf3 Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev am: 33a2b4bacd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16977626

Change-Id: I29837bf7a2474d1e1f8e4562a54ecc94d50f027b
2022-03-03 13:38:47 +00:00
Robert Horvath
ab0653f04d Merge "Mark focused Views as keep clear areas" into tm-dev am: 1b0ffb5b13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16932089

Change-Id: Ibcb8325ab419ab29788512162bcd1bc20d45ad25
2022-03-03 13:37:17 +00:00
TreeHugger Robot
33a2b4bacd Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev 2022-03-03 13:27:04 +00:00
Robert Horvath
1b0ffb5b13 Merge "Mark focused Views as keep clear areas" into tm-dev 2022-03-03 13:14:56 +00:00
Naomi Musgrave
769b37a901 Merge "MediaProjection sets content recording details in WM directly." into tm-dev am: 3302797586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16933664

Change-Id: Ied0cd35f5fb924b0a47ffa862c9a19c82621606b
2022-03-03 10:52:52 +00:00
Naomi Musgrave
3302797586 Merge "MediaProjection sets content recording details in WM directly." into tm-dev 2022-03-03 10:45:36 +00:00
Vadim Caen
264ed1adbe Merge "Move OnBackInvokedCallback to window package." into tm-dev am: 8fa5667732
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17013983

Change-Id: Id59bf47b6ff48a22218519504c3994804f5cce06
2022-03-03 10:19:19 +00:00
Vadim Caen
8fa5667732 Merge "Move OnBackInvokedCallback to window package." into tm-dev 2022-03-03 10:03:41 +00:00
Robert Horvath
2a9f214e40 Merge "Keep custom keep-clear Rects if preferKeepClear is set" into tm-dev am: e867127174
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988386

Change-Id: I481575724a5d56493e70f20d66a407f9092e3d4f
2022-03-03 09:17:46 +00:00
Robert Horvath
e867127174 Merge "Keep custom keep-clear Rects if preferKeepClear is set" into tm-dev 2022-03-03 08:37:14 +00:00
Rachel Lee
c04d5b9cb1 Merge "Cleanup Extended frame -> Vsync callback." into tm-dev am: acd10a9a97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17037018

Change-Id: I700e0a19b6a26cebef3a921491103094e871145b
2022-03-03 01:15:35 +00:00
Rachel Lee
acd10a9a97 Merge "Cleanup Extended frame -> Vsync callback." into tm-dev 2022-03-03 01:05:52 +00:00
Rob Carr
898cb500c5 Merge "ViewRootImpl: Don't pause HWUI so much" into tm-dev am: c406f6afa7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16981759

Change-Id: I7eb53bd945a24bc55f54c7abc3ef83028da8ba60
2022-03-02 21:27:25 +00:00
Rob Carr
c406f6afa7 Merge "ViewRootImpl: Don't pause HWUI so much" into tm-dev 2022-03-02 21:20:46 +00:00
Mark Punzalan
aa26523c55 Merge "Don't cache created Translators in TranslationManager." into tm-dev am: a88f5b74f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16991523

Change-Id: I304c392af8bcd2ef9205c46c7c09e3612f44f05f
2022-03-02 21:04:06 +00:00
Mark Punzalan
a88f5b74f2 Merge "Don't cache created Translators in TranslationManager." into tm-dev 2022-03-02 20:36:09 +00:00
Naomi Musgrave
27655e1fc3 MediaProjection sets content recording details in WM directly.
Content recording relies upon a class describing current state.
rather than passing around details from media > display > wm.
WMService keeps track of the session in ContentRecordingController.
ContentRecordingController manages hand-off between different
DisplayContent instances, as the session details are changed.

Manually tested that fold/unfold handling when screen recording
from QS tile still works, and that taking over a screen cast
with a screen recording works.

Refactoring logic from DisplayContent into new recording
delegate will come in a future change.

Bug: 216756854
Test: atest FrameworksCoreTests:ContentRecordingSessionTest
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecordingControllerTests
Change-Id: Ib4f125dd703d362ac13fcbe469d00b345827e706
2022-03-02 18:32:34 +00:00
Ameer Armaly
34f063c663 Merge "Fix speech state event javadocs per API review." into tm-dev 2022-03-02 17:45:17 +00:00
Tianhao Yao
5ecd6d37de Changed setSyncTransaction to syncNextTransaction with callback logic.
Modified SurfaceView and ViewRootImpl to provide callbacks when syncing
a transaction instead of sending transactions. This will ensure a clear
ownership of the transaction object since it will be provided in the
callback when BBQ adds a buffer into the transaction. Modified JNI to
add compatibility for native functions.

Test: Manual testing from go/wm-smoke.
Test: BLASTBufferQueueTest
Bug: 210714235.
Change-Id: I1f872d6b2846b0d64d5b33b8866d0b2ec7126c8c
2022-03-02 09:55:46 -06:00
Vadim Caen
72077726f5 Move OnBackInvokedCallback to window package.
Originally, View was implementing onBackInvokedDisptacherOwner, but now
only Activity and Dialog and since back event are related to the
window, it makes sense to move them into the android.window package

This follow up comment at:
ag/c/platform/frameworks/base/+/16764116/comments/e131f3ef_e3e1d2e0

Test: atest BackNavigationTests
Bug: 221401221
Change-Id: Ia2f26162beb6a41b6e162b31e599e882f8bf7320
2022-03-02 16:28:57 +01:00