Commit Graph

19380 Commits

Author SHA1 Message Date
Automerger Merge Worker
8561a60d51 Merge "Merge "Fix view does not show fill dialog" into tm-qpr-dev am: 5bca0e0058" into tm-qpr-dev-plus-aosp am: a2caef3de9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19710492

Change-Id: If67122e23d28edec09bba8de4d47b36e9b696387
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 16:46:48 +00:00
Jorim Jaggi
45d0a352bf Merge "Revert "Re-land "Enable LOCAL_LAYOUT""" into tm-qpr-dev am: 52c3498acf am: 1f09cd1808
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20025004

Change-Id: I6249a83f73202ab9cdc46ee99df2b149a98a03a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 07:37:56 +00:00
TYM Tsai
dcc45bdd20 Merge "Fix view does not show fill dialog" into tm-qpr-dev am: 5bca0e0058
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19710492

Change-Id: I24d669ae62f5e5d9a3a1f1c30a6beff57d745460
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 00:03:58 +00:00
TYM Tsai
5bca0e0058 Merge "Fix view does not show fill dialog" into tm-qpr-dev 2022-09-22 23:42:38 +00:00
Jorim Jaggi
1f09cd1808 Merge "Revert "Re-land "Enable LOCAL_LAYOUT""" into tm-qpr-dev am: 52c3498acf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20025004

Change-Id: I1256637878491e8f936ecc19b3617a3a0fbad972
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 22:35:38 +00:00
Jorim Jaggi
52c3498acf Merge "Revert "Re-land "Enable LOCAL_LAYOUT""" into tm-qpr-dev 2022-09-22 21:48:43 +00:00
Chavi Weingarten
85a1ebf628 Make overrideHdrTypes per display
The API overrideHdrTypes should be per display. Add an API into DMS so
DMS can set the override with the correct displayToken. Remove usage of
getInternalDisplayToken in DisplayTests

Test: DisplayTest
Bug: 242714168
Change-Id: Ib338624a71a897d8d718080850f672a219f9627e
2022-09-22 14:44:46 +00:00
Chavi Weingarten
51847be272 Merge changes from topic "revert_capture_display"
* changes:
  Revert "Add captureDisplay API in WMS."
  Revert "Convert invalid crop to display bounds for captureDisplay"
2022-09-22 14:10:37 +00:00
Tiger Huang
b557bc88b8 Revert "Re-land "Enable LOCAL_LAYOUT""
This reverts commit 975dd2c513.

Reason for revert: This is too risky for tm-qpr1
Bug: 161810301
Bug: 175861564

Change-Id: If906b4d538885fca407ce0bd7039c9d35b507032
2022-09-22 13:24:37 +00:00
Tiger Huang
bd2df678ff Merge "Re-land "Enable LOCAL_LAYOUT"" into tm-qpr-dev am: b47c6f2061 am: 7f946269c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963145

Change-Id: I182e703a5d672224bbe619609fcf08d5ca03fa89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 22:37:07 +00:00
Tiger Huang
7f946269c8 Merge "Re-land "Enable LOCAL_LAYOUT"" into tm-qpr-dev am: b47c6f2061
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963145

Change-Id: I2b1b8f36acbac91cdcdaec1f5f44b05a8226d9ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 22:16:16 +00:00
Bo Liu
82839ebcfc Merge "NDK methods to get SurfaceControl/Transction from java" 2022-09-21 21:59:26 +00:00
Chavi Weingarten
0fff17bdd5 Revert "Add captureDisplay API in WMS."
This reverts commit c184fd711a.

Reason for revert: 247801379

Change-Id: I20ac6772656d116ca03bc12d60a0c331f7079df2
2022-09-21 21:52:05 +00:00
Chavi Weingarten
9affe38fc5 Revert "Convert invalid crop to display bounds for captureDisplay"
This reverts commit d2caa1f0ac.

Reason for revert: 247801379

Change-Id: I6da853fdbf50cf67d5f4f2428571d668d63b7317
2022-09-21 21:51:04 +00:00
Chavi Weingarten
94d707ccef Merge "Convert invalid crop to display bounds for captureDisplay" 2022-09-21 15:27:00 +00:00
Tiger Huang
b47c6f2061 Merge "Re-land "Enable LOCAL_LAYOUT"" into tm-qpr-dev 2022-09-21 06:10:48 +00:00
TreeHugger Robot
85a962599d Merge changes I93352621,I8357bfaf,Ibcde3576,I9c072b82
* changes:
  Remove InputMethodManagerDelegate#isRestartOnNextWindowFocus
  Use getLockObject to sync ImeFocusController#{mServedView, mNextServedView}
  Remove ImeFocusController#set{Served, NextServed}View
  Add InputMethodManagerDelegate#getLockObject
2022-09-21 00:26:58 +00:00
Chavi Weingarten
d2caa1f0ac Convert invalid crop to display bounds for captureDisplay
If the crop value passed in the args for captureDisplay is invalid, use
the display bounds instead.

Test: WindowManagerServiceTests#testCaptureDisplay
Bug: 242714168
Change-Id: Iebe42fd35c5f49b6e711699aa1b986a556a5a5f8
2022-09-20 19:31:10 +00:00
Ming-Shin Lu
786f31f228 Remove InputMethodManagerDelegate#isRestartOnNextWindowFocus
As isRestartOnNextWindowFocus is to check
InputMethodManager#mRestartOnNextWindowFocus flag if the input
connection is needed to force re-start when calling
startInputAsyncOnWindowFocusGain during gaining the window focus
from ImeFocusController#onPostWindowFocus next time.
(e.g. Switching IME apps from IME picker dialog)

Since in startInputOnWindowAyncFocusGain can just check
mRestartOnNextWindowFocus directly without exposing
isRestartOnNextWindowFocus, we could just simplied with inlining
the check logic.

Also, noticed in startInputAsyncOnWindowFocusGain has already reverted
CL[1]'s asynchronize starting input logic for some reasons, as a result,
renaming to startInputOnWindowFocusGain in case misleading.

[1]: I6aa4a664cfd0c86f75cee2457715317194bbe5e2

Bug: 244504062
Test: atest CtsInputMethodTestCases
Change-Id: I9335262136950021efb7b4b73c7eeb930e1333bb
2022-09-20 23:51:26 +08:00
Ming-Shin Lu
ea0c2ee270 Use getLockObject to sync ImeFocusController#{mServedView, mNextServedView}
As CL[1] added InputMethodManagerDelegate#getLockObject that used for
protecting mServedView/mNextServedView in ImeFocusController when we
exposed getServedView/getNextServedView for InputMethodManager to access
with thread safty.

Add synchornize block for all places that accessing
{mServedView, mNextServedView} in ImeFocusController.

[1]: I9c072b829d1db1e68b65e766d764ee71cb16e6a2

Bug: 244504062
Test: atest CtsInputMethodTestCases
Change-Id: I8357bfafeaf0a40e3b74eec2fc59a47309451f18
2022-09-20 23:51:25 +08:00
Ming-Shin Lu
6924863b37 Remove ImeFocusController#set{Served, NextServed}View
As ImeFocusController#set{Served, NextServed}View originally exposes to
InputMethodManager is only for clearing the served view in
IMM#finishInputLocked() with a special code logic:

```
  setNextServedView(null);
  if (getServedView() != null) {
      // do finish input
     setServedView(null);
  }
```

which isn't necessary and can be clean-up with a method to notify
ImeFocusController to clear the served / next served view, then doing
the rest of finshing logic when the method has cleared the served view:

```
if (controller.clearServedViewsLocked() != null) {
    // do finish input
}
```

With this change, we can simply remove the set{Served, NextServed}View
to get rid of this dependency with InputMethodManager.

Bug: 244504062
Test: atest CtsInputMethodTestCases

Change-Id: Ibcde35765c0e2e6c372aa64dbc7e774a8d860543
2022-09-20 23:51:25 +08:00
Ming-Shin Lu
31e4678463 Add InputMethodManagerDelegate#getLockObject
As CL[1] introduces per-window based ImeFocusController for handling
the IME served view focus update logic.

However, for InputMethodManager APIs requires to access
ImeFocusController#{mServedView, mNextServedView} for starting the input
connection or checking the caller's validity, which needs a lock for
thread safety.

As a result, it would make sense to expose mH for ImeFocusController
through an new method InputMethodManagerDelegate#getLockObject
to protect the data consistancy during InputMethodMananger APIs
invoking to access the served view.

Also, renaming the methods (and update the javadoc) with "Locked" sufix:
- ImeFocusController#get{Served, NextServed}View
- ImeFocusController#set{Served, NextServed}View

Note that this is a refactoring preperation CL with added a TODO that
will use getLockObject in the follow-up CL.

[1]: Ib455704fe1e9d243f93190a84f230210dbceac2a

Bug: 244504062
Test: atest CtsInputMethodTestCases
Change-Id: I9c072b829d1db1e68b65e766d764ee71cb16e6a2
2022-09-20 23:51:16 +08:00
Chavi Weingarten
dc59d4e40b Merge "Add captureDisplay API in WMS." 2022-09-20 13:36:00 +00:00
Arthur Hung
b066a1d673 Merge "Revert "Clear default focus highlight when lost window focus or re-enter touch mode"" 2022-09-20 00:45:49 +00:00
TYM Tsai
fc5f2a60d3 Fix view does not show fill dialog
Sometimes, views may not be visible for the user immediately after
laid out, so add flag for do the evaluation once the view is visible.

Bug: 234429643
Test: Manual, check the fill dialog is appeared
Change-Id: I6b96b68ffc4a4b1ee5f5056848c5c4996d21ae73
2022-09-19 22:51:25 +00:00
Chavi Weingarten
c184fd711a Add captureDisplay API in WMS.
Allow clients to request a display screen capture using a specified
displayId. The caller can pass in their own required arguments and they
will get the screenshot via an async callback directly from SF.

Test: ScreenshotTests
Bug: 242714168
Change-Id: I387f58d342f01ae71b85311fbf0634f0e7901f7d
2022-09-19 19:32:42 +00:00
Arthur Hung
9b81e4ea0a Revert "Clear default focus highlight when lost window focus or re-enter touch mode"
This reverts commit 5fc73f8f2f.

Reason for revert: b/246952306

Change-Id: I134a59a9cd576e6cf6a9bf8b5bcf2ae96e3fdb93
2022-09-19 11:33:54 +00:00
Wilson Wu
fe8bf190f9 Merge "Revert "Fix potential failures in InputMethodService"" 2022-09-19 09:13:38 +00:00
Wilson Wu
1e5f9b6bfd Revert "Fix potential failures in InputMethodService"
This reverts commit ce98507bf3.

Reason for revert: b/247426953

Change-Id: If7b7a258150f8f57a7b4a88e4926d412f948fd9c
2022-09-19 08:55:19 +00:00
Wilson Wu
624f3aef5e Merge "Prevent InputMethodManager call into DelegateImpl (1/N)" 2022-09-19 02:05:15 +00:00
TreeHugger Robot
306f2a61cb Merge "Fix potential failures in InputMethodService" 2022-09-19 01:58:35 +00:00
Bo Liu
789103b97a NDK methods to get SurfaceControl/Transction from java
Test: ASurfaceControlTest#testSurfaceControl_fromSurfaceControl
      and ASurfaceControlTest#testSurfaceTransaction_fromTransaction
Change-Id: Ic15bfaae22b50f70c1c82c8945c09b749654a00f
2022-09-17 16:17:08 -04:00
Tiger Huang
2a7f7ed158 Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev am: dea70726f6 am: d95c3121b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963144

Change-Id: I8c08856b1d5e20fef1175d2205e3f2dcc21af7cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-17 12:42:07 +00:00
Brett Chabot
2a402d2766 Merge "Fix input when hardware renderer drawing is disabled." 2022-09-16 22:26:02 +00:00
Chavi Weingarten
7d6d3cbd12 Merge "Create DMS wrapper around hidden SC APIs" 2022-09-16 22:22:17 +00:00
Sally Yuen
b99e9b0bb4 Merge "Add API warnings in AccessibilityManager" 2022-09-16 21:20:47 +00:00
Alec Mouri
172f625928 Merge "Revert^2 "Support alpha for SurfaceView"" 2022-09-16 20:23:57 +00:00
TreeHugger Robot
f19f32457c Merge "Add Android keycodes for stylus buttons" 2022-09-16 20:07:59 +00:00
Brett Chabot
32dfc98382 Fix input when hardware renderer drawing is disabled.
When drawing is disabled the window's layer won't have a valid buffer. This
causes surfaceflinger to set the window's touchableRegion to zero.
This commit sets a window crop when drawing is disabled, so surfaceflinger
set touchableregion from crop instead of buffer.
And it modifies LetterboxUiController to not reset the crop.

Test: cts and perf tests as documented in go/android-slimulator-dev-env
Bug: 229870984
Change-Id: I4d6ca513c3daf5818ded03eae00e551fc319ad69
2022-09-16 11:19:02 -07:00
Alan Viverette
9bb4f2962b Merge "Revert "Intercept abnormal MotionEvent in GestureDetector#onTouc..."" 2022-09-16 17:57:06 +00:00
Sally
97640b600a Add API warnings in AccessibilityManager
Recommend that developers don't change UI or behavior based on
accessibility checks.

Bug: 235506503
Test: na
Change-Id: I8e8b712a484a2b6dabe0f6c657766a0c1e21c92d
2022-09-16 17:55:32 +00:00
Chavi Weingarten
1e8b7d543a Create DMS wrapper around hidden SC APIs
There are several places that are calling the SC display APIs that were
hidden. They are already protected in SF so all the processes using the
hidden APIs were running as shell. However, we want to remove the APIs
into SF since they create confusion and instead replace with calls to
system server. For now, route the SurfaceControl hidden API calls that
are not used by system server to call through to DMS via the new
MediaProjectionGlobal API.

This will ensure the callers have a release to migrate before we remove
the APIs.

This also partially reverts commit c4bf46c247.

Test: Apps using SurfaceControl hidden display APIs
Bug: 237664947
Change-Id: I859743cb8b10c0352a30280a610b13a4f44f34dc
2022-09-16 17:25:36 +00:00
Prabir Pradhan
ad914db014 Add Android keycodes for stylus buttons
Ensure the new stylus buttons are not yet sent to apps.
DD: go/android-stylus-buttons

Bug: 246394583
Test: Build, Presubmit
Change-Id: I440a359ec8cffb60b9e87f2e51304c9b0320e16f
2022-09-16 15:42:23 +00:00
Tiger Huang
d95c3121b6 Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev am: dea70726f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963144

Change-Id: I56d9cf4a11f38a8a574b7d5ab6c82ff770b7bdf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 14:50:00 +00:00
Tiger Huang
dea70726f6 Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev
* changes:
  Don't perform config change if relayoutAsync
  Apply synced relayout if we have FLAG_WINDOW_VISIBILITY_CHANGED
2022-09-16 14:23:42 +00:00
Wilson Wu
def5cd30a1 Prevent InputMethodManager call into DelegateImpl (1/N)
InputMethodManager#DelegateImpl is a delegation for
ImeFocusController to call into InputMethodManager.

Ideally IMM don't need to rely on DelegateImpl. Move
the IMM#hasActiveInputConnection implemetation from
DelegateImpl to make consistency.

Bug: 243778447
Bug: 182259171
Test: atest CtsInputMethodTestCases
Change-Id: I4246fd077b8ddf741311defb7a1b9175136bb769
2022-09-16 18:01:30 +08:00
TreeHugger Robot
f2e5051e78 Merge "Support to set the density with uniqueId from WM command" 2022-09-16 01:05:50 +00:00
TreeHugger Robot
797fe18d76 Merge "Don't default accessibilityDataPrivate when the window is FLAG_SECURE." 2022-09-15 20:56:45 +00:00
Sally Yuen
60650c6ea7 Merge "Improve pane javadocs" 2022-09-15 20:41:43 +00:00
Taran Singh
0046013807 Merge "Introduce Scribe Select/DeleteRangeGesture" 2022-09-15 18:00:37 +00:00