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
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
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
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
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
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
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
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
Recommend that developers don't change UI or behavior based on
accessibility checks.
Bug: 235506503
Test: na
Change-Id: I8e8b712a484a2b6dabe0f6c657766a0c1e21c92d
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
Ensure the new stylus buttons are not yet sent to apps.
DD: go/android-stylus-buttons
Bug: 246394583
Test: Build, Presubmit
Change-Id: I440a359ec8cffb60b9e87f2e51304c9b0320e16f
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
Add new APIs for select and delete with two rectangles.
Test: atest InputConnectionEndToEndTest
Test: atest StylusHandwritingest
Bug: 239783077
Change-Id: Ia7240d3eaac8610c774c3a4aad074a4b84b71521