Commit Graph

16037 Commits

Author SHA1 Message Date
chaviw
ff265e6177 Remove SurfaceSession.nativeKill
SurfaceSession.nativeKill would call SurfaceComposerClient.dispose. This
was unsafe since it would only clear the ISurfaceComposerClient binder
object, but the SurfaceComposerClient object could still be around.
Instead, when calling SurfaceSession.kill, just remove the Java
reference, but allow the dtor of SurfaceComposerClient to handle
disposing the binder object.

Test: Force app to restart while in a sync transaction. No longer shows
an error
Fixes: 179459565

Change-Id: I322e7f3bd4e7efb3d85d1afe3c4704283f58a985
2021-02-09 14:54:42 -08:00
TreeHugger Robot
d938189165 Merge "Only force layout legacy apps with SOFT_INPUT_ADJUST_RESIZE" into sc-dev 2021-02-09 17:07:50 +00:00
Rob Carr
8ea6b33cbb Merge "SyncRtSurfaceTransactionApplier: Use BLASTSync" into sc-dev 2021-02-09 03:01:13 +00:00
Rob Carr
c534edd535 Merge "Port SurfaceControlViewHost to BLAST" into sc-dev 2021-02-09 01:10:51 +00:00
TreeHugger Robot
989bc8cd01 Merge changes from topic "display-mode-rename" into sc-dev
* changes:
  Tracking changes to renaming DisplayConfig to DisplayMode
  Extend the comment for setFrameRate(..., shouldBeSeamless)
2021-02-08 21:56:15 +00:00
Robert Carr
1f96f3cd28 SyncRtSurfaceTransactionApplier: Use BLASTSync
Helps us down the path of deprecating deferred transaction. BLASTSync
should also be easier to debug and produce less overhead on the server.

Bug: 168505645
Test: Existing tests pass
Change-Id: I1f1375f4ddfe84f724109d1c1b601260cef0ba6c
2021-02-08 21:34:31 +00:00
Robert Carr
fb59b6880f Port SurfaceControlViewHost to BLAST
This is mostly a matter of flipping the flag, except for the case of
SystemWindows. While external SurfaceControlViewHost clients use the
leash provided by the SurfaceControlViewHost rather than the internal
ViewRootImpl surface, SystemWindows clients will use the actual
ViewRootImpl surface. This can conflict with the BLAST adapter setting
crop/frame/etc on this Surface. We modify SystemWindows to put
each layer inside a leash, and hand this out to other parts of SysUI
instead of the ViewRootImpl surface.

Test: Existing tests pass
Bug: 168505645
Change-Id: Ie621f89166f00ce385d450f1f1cea4d4abd1b805
2021-02-08 13:33:00 -08:00
TreeHugger Robot
7b3c0ef390 Merge "Change InlineSuggestionsRequest.getSupportedLocales() to return empty if not specified" into sc-dev 2021-02-08 19:53:10 +00:00
Chris Li
de6aadf262 Merge "Include whether in touch mode for WindowlessWindowManager" into sc-dev 2021-02-08 19:17:28 +00:00
Tiger Huang
39d15f92ac Only force layout legacy apps with SOFT_INPUT_ADJUST_RESIZE
Forcing layout for other soft input modes seems redundant while IME
shows or hides, because the layout doesn't change.

It doesn't useful for the system bar cases as well, because the main
content of the fullscreen apps is usually stable.

Fix: 161781474
Test: Open IME in Telegram
Change-Id: Ic64dd86e5804c4b25fa118297eaca3c63c5e0a7d
2021-02-08 17:53:46 +08:00
Chris Li
ded0e32b80 Include whether in touch mode for WindowlessWindowManager
Fix: 179583920
Test: manually with a windowless button
Change-Id: Ice37c3182a44c6284ffa8950996507025c59270b
2021-02-06 20:39:37 -08:00
Charles Chen
6e08c39554 Merge "Remove addWindowTokenWithOptions" into sc-dev 2021-02-07 03:14:57 +00:00
TreeHugger Robot
3ae84f530b Merge "Rename InputConnecton#setImeTemporarilyConsumesInput" into sc-dev 2021-02-07 03:13:55 +00:00
Nikita Dubrovsky
8984325c65 Merge "Mention calling super in View.onProvideContentCaptureStructure javadoc" into sc-dev 2021-02-06 21:50:07 +00:00
Charles Chen
b80fdde45f Remove addWindowTokenWithOptions
Since WindowContext won't add WindowToken from the client side,
addWindowTokenWithOption is no more needed. Also remove the logic
to invoke removeWindowToken from the client side.

Bug: 159767464
Bug: 153369119
Test: atest WindowManagerServiceTests WindowManagerPermissionTests
Change-Id: Ib0c948dca223cf8d056865ce3a0d4adaef07d247
2021-02-06 15:47:08 +08:00
TreeHugger Robot
4b0a9bd7dd Merge "Make EditorInfo.internalImeOptions parcelable." into sc-dev 2021-02-06 04:53:22 +00:00
Nikita Dubrovsky
fd676784f5 Mention calling super in View.onProvideContentCaptureStructure javadoc
Bug: 178978073
Test: Presubmit
Change-Id: Iecf0d9f575f5794e37d42e46700ff098a2c6b30f
2021-02-05 15:02:46 -08:00
Chavi Weingarten
e22b827b05 Merge "Remove preserve surfaces" into sc-dev 2021-02-05 22:37:01 +00:00
chaviw
32f2817bbd Remove preserve surfaces
When using blast, there's no need to call preserve surfaces since the
client can synchronize layer changes with the incoming buffer in the
new size. If the client uses the WindowOrganizer.applySync call they can
ensure they only update the layer geometry in the same transaction that
the new buffer is submitted in.

When removing preserveSurfaces, we can also remove reparentChildren
since that was the only caller of reparentChildren

Test: Split with SurfaceView
Bug: 177557720
Change-Id: I4574ac0d3b8a63b13ac44846e729b73ca0f88f23
2021-02-05 22:36:25 +00:00
Taran Singh
0ced23c739 Merge "Handle cancelled Insets animation" into rvc-qpr-dev am: e272df9338 am: 99813602c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I556713d0fa14ab0f794eab49ac6c16b5354ed647
2021-02-05 18:19:30 +00:00
Taran Singh
99813602c0 Merge "Handle cancelled Insets animation" into rvc-qpr-dev am: e272df9338
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ice0c897bce976dbf3ab46fad7de41ed0e8fd0006
2021-02-05 18:00:53 +00:00
Winson Chung
92e9fb341d Merge "Revert "Sandbox letterbox and size compat apps"" into sc-dev 2021-02-05 17:52:07 +00:00
Taran Singh
e272df9338 Merge "Handle cancelled Insets animation" into rvc-qpr-dev 2021-02-05 17:38:50 +00:00
Taran Singh
e2307d9a48 Handle cancelled Insets animation
If an Insets animation was cancelled before it could complete,
handle it gracefully.

Fix: 154381667
Test: Run monkey runner that on any window that has edit text
      atest InsetsControllerTests
Change-Id: I052a0455f536a1c839a2782e54f19143295ba6c6
2021-02-05 17:38:31 +00:00
Mark Renouf
26737223a1 Merge "Corrects Javadoc method reference" into sc-dev 2021-02-05 16:42:25 +00:00
Issei Suzuki
5c3c5ea216 Merge "Make keyguard exit animation to remote animation." into sc-dev 2021-02-05 15:01:44 +00:00
TreeHugger Robot
6beb5e87c4 Merge "Remove special logic for top/bottom gesture insets" into sc-dev 2021-02-05 06:26:41 +00:00
Charles Chen
582247eef0 Merge changes from topic "window_context_2.0" into sc-dev
* changes:
  Apply WindowContext 2.0 for InputMethodMenuController
  Migrate WindowContext to WindowContextListener mechanism
2021-02-05 04:53:09 +00:00
Lan Wei
66b21086e3 Rename InputConnecton#setImeTemporarilyConsumesInput
Rename InputConnecton#setImeTemporarilyConsumesInput as InputConnecton#setImeConsumesInput

Bug: 175362887
Bug: 179143513
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest

Change-Id: I8ac1ea4d53f747b0086ed415ff90793dfc6155bc
2021-02-05 12:16:22 +08:00
Winson Chung
0ba6185639 Revert "Sandbox letterbox and size compat apps"
This reverts commit 4d3f1c5681.

Reason for revert: b/179308296

Change-Id: Idccf97038d5aa92268a13bacc512215878e8aefa
2021-02-04 21:57:57 +00:00
Mark Renouf
845ff65910 Corrects Javadoc method reference
Change-Id: If12bf0b8fb771f55f1a41637ab12fd94a217be26
2021-02-04 16:43:05 -05:00
Treehugger Robot
4f574f1422 Merge "Avoid ellipsis character in documentation." am: ac598696b4 am: 3aa7c4ed7b am: b0d13011f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad1be5ffe2988ff3b763741c4e0513c9c697522a
2021-02-04 20:19:59 +00:00
Treehugger Robot
b0d13011f9 Merge "Avoid ellipsis character in documentation." am: ac598696b4 am: 3aa7c4ed7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I853899221e201121796a56768a8a65c73e78e80b
2021-02-04 19:53:38 +00:00
Marin Shalamanov
cb783ca6d9 Tracking changes to renaming DisplayConfig to DisplayMode
Bug: 159590486
Test: presubmit
Change-Id: I64e57fe4d73c22bbbe0a1767cadf8648259e9beb
2021-02-04 19:37:51 +01:00
Marin Shalamanov
e0434555f7 Extend the comment for setFrameRate(..., shouldBeSeamless)
Bug: 179116474
Test: n/a
Change-Id: Ief2886313ec3d0334e89ac2bb2bbaf06f74e60a8
2021-02-04 19:37:51 +01:00
Issei Suzuki
08f0716df6 Make keyguard exit animation to remote animation.
The change is disabled by default. To enable remote animation, one needs
to set a property and to restart the WMS.

% adb root
% adb shell setprop persist.wm.enable_remote_keyguard_animation 1
% adb reboot

Test: Existing tests pass.
Bug: 175686676
Bug: 179122467
Change-Id: I65f36232df715616cfcadcf5d389b72e0894fddd
2021-02-04 18:38:44 +01:00
Adrian Roos
d68bee2746 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6 am: 98eb82a6d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I314b97d2677f26b0a9c09a52918df49096450aea
2021-02-04 17:09:38 +00:00
Donald Chai
b4d25b8547 Avoid ellipsis character in documentation.
Renders as "?" on https://developer.android.com/reference/android/view/FrameMetrics, as if someone was unsure?

Change-Id: I4de9b99282480f1107bd8c3e387781775de9326c
2021-02-04 17:05:44 +00:00
Adrian Roos
98eb82a6d3 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I931b4ec091173789f480ecc761044a27944c4b85
2021-02-04 16:49:00 +00:00
Adrian Roos
4da67dd2f6 API: Suppress existing NullableCollections lints am: 6a6aa5e23d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d47151b7e26e82706f2d94a13c4067fe71fc168
2021-02-04 16:19:34 +00:00
Adrian Roos
60f3d5cee4 Merge changes from topic "nullablecollection"
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints
2021-02-04 15:53:34 +00:00
Charles Chen
4af9f4fc2c Apply WindowContext 2.0 for InputMethodMenuController
Before WindowContext 2.0, WM creates WindowToken for each
WindowContext. After that, it only creates WindowToken when
WindowContext adss the first view.

Therefore, if InputMethodMenuController invokes getSettingsContext
with different display id before showing the IME switch dialog,
moveWindowTokenToDisplay is no-op because WindowToken with
token switchDialogToken hasn't yet existed. We should re-register
to the different display to receive ImeContainer config changes for
this scenario.

Bug: 159767464
Bug: 153369119
Test: InputMethodMenuControllerTest
Change-Id: Ib9d94a275e1b686535ab3edd7c0c3ce957efd8cd
2021-02-04 23:27:04 +08:00
TreeHugger Robot
4abb5596a2 Merge "Fix and refine works in UiTranslationController" into sc-dev 2021-02-04 14:41:17 +00:00
Joanne Chung
aeb92182c1 Fix and refine works in UiTranslationController
1. Fix wrong state while calling runForEachView(). Make a copy of
mView and operate these views on ui thread.
2. Don't throw Exception in Activity side if the views paramether is
empty. The parameters is aleady checked in API call level.
3. Simpify call methods with lamda

Bug: 172969740
Test: call UiTranslation APIs and make sure methods are called as expected

Change-Id: Ic319939ec72a11608c64db876c57780339b75fd3
2021-02-04 19:49:02 +08:00
Galia Peycheva
bf21f495df Merge "Make window blur behind public API" into sc-dev 2021-02-04 08:31:45 +00:00
Tiger Huang
cf1138d479 Merge "Remove outFrame from the parameters of addWindow" into sc-dev 2021-02-04 05:46:17 +00:00
Treehugger Robot
3ae343dfd8 Merge "OWNERS for InlineSuggestion* in view/inputmethod" am: 2745c788a0 am: a42ad625ac am: a13d5a3cba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562186

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3a018097be211007dc599da7eaee41250f4b58b9
2021-02-04 01:11:37 +00:00
Chris Ye
a539c9da30 Merge "Remove @UnsupportedAppUsage annotation from InputDevice constroctor" into sc-dev 2021-02-04 01:10:10 +00:00
Treehugger Robot
a13d5a3cba Merge "OWNERS for InlineSuggestion* in view/inputmethod" am: 2745c788a0 am: a42ad625ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562186

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c009ee37657466cc94974af0331d922aa413279
2021-02-04 00:40:33 +00:00
Rob Carr
9e2a817443 Merge "SurfaceView: Release BBQ where we release Surface" into sc-dev 2021-02-03 22:09:55 +00:00