Commit Graph

15351 Commits

Author SHA1 Message Date
Treehugger Robot
f1e4da1e19 Merge "Update language to comply with Android's inclusive language guidance" am: 558a921d81 am: 927f0f7453 am: 1ff037880a am: 6671acef6e am: 8513ac2afc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382388

Change-Id: I78e18d9c1490523aeeac4c720f4588bdacd45d2c
2020-09-11 23:50:25 +00:00
Treehugger Robot
8513ac2afc Merge "Update language to comply with Android's inclusive language guidance" am: 558a921d81 am: 927f0f7453 am: 1ff037880a am: 6671acef6e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382388

Change-Id: Icb0ab4bed8a74674fcfbdd7c8e0885a2994ec0cb
2020-09-11 18:17:49 +00:00
Treehugger Robot
6671acef6e Merge "Update language to comply with Android's inclusive language guidance" am: 558a921d81 am: 927f0f7453 am: 1ff037880a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382388

Change-Id: I4ec82de3182802b71ebe8c5a9ac2b9bdaaa58cdf
2020-09-11 17:29:36 +00:00
Treehugger Robot
1ff037880a Merge "Update language to comply with Android's inclusive language guidance" am: 558a921d81 am: 927f0f7453
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382388

Change-Id: I03a1373dcc1cdcf0d73536d98d5205317183cdef
2020-09-11 16:48:39 +00:00
Chavi Weingarten
854bcaa60b Merge "Revert "Send ScreenCaptureListener to native screen capture requ..."" 2020-09-11 16:10:26 +00:00
Lais Andrade
e5c953b7ec Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

BUG: 162536543
Test: N/A
Change-Id: Ied240c486df4072ca6301511aa3419f746404afa
2020-09-11 14:31:20 +00:00
Hyundo Moon
6b19ee1578 Merge "Make KeyEvent#isMediaSessionKey() as public" 2020-09-11 13:07:52 +00:00
Chavi Weingarten
797bdc9929 Revert "Send ScreenCaptureListener to native screen capture requ..."
Revert "Update screen capture functions to accept a ScreenCaptur..."

Revert submission 12404049-async_screencapture

Reason for revert: 168149157, 168154840
Reverted Changes:
I54c34003c:Send ScreenCaptureListener to native screen captur...
I9cbc833f8:Update screen capture functions to accept a Screen...

Change-Id: Ibd2b1e6588aa45fe228ea7c4c43dbf7a5402aaa5
Bug: 168154840
Bug: 168149157
2020-09-10 23:03:53 +00:00
TreeHugger Robot
fe4f84bbe0 Merge "Remove Session#getDisplayFrame" 2020-09-10 05:29:20 +00:00
Hyundo Moon
9b6f93c57a Make KeyEvent#isMediaSessionKey() as public
Bug: 168144655
Test: m update-api -j;
Change-Id: I701368b5d6413e94ac3c25b4cd352a0b8315af53
2020-09-10 08:01:36 +09:00
TreeHugger Robot
52c7758fbd Merge "Request focus using setFocusedWindow" 2020-09-09 20:22:15 +00:00
Rob Carr
5efdce4bab Merge "WSA/ViewRootImpl: Move resize detection to client" 2020-09-09 19:40:22 +00:00
Tiger Huang
d541d1d4fd Update requested state after applying pending frames am: dfc8abb1ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12526908

Change-Id: I40156abe8952ae5b9ed36b3bc6ae5b854380e14e
2020-09-09 19:30:32 +00:00
Winson Chung
30931373de Merge "Remove sysui from having to manually notify pip visibility" 2020-09-09 16:29:15 +00:00
Riddle Hsu
ccaeffc03f Remove Session#getDisplayFrame
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.

And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.

Also refine the resize handling in ViewRootImpl to make it easier
to read.

There should be no behavior change by this modification.

Bug: 161781274
Test: WmTests, DialogFrameTests

Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
2020-09-10 00:26:11 +08:00
Winson Chung
8e51146233 Remove sysui from having to manually notify pip visibility
- Set directly from the system when we enter/leave pip so there's
  no chance this gets out of sync

Bug: 167682726
Test: adb shell input keyevent 171 (ensures this still triggers the menu)

Change-Id: I73b4c5b6faebd505bf8e17b4c817b4d600025894
2020-09-08 23:04:22 -07:00
Ryan Lin
96eefda22e Merge "Change magnification animation callback (1/2)" 2020-09-09 02:46:25 +00:00
Robert Carr
60af51835d WSA/ViewRootImpl: Move resize detection to client
Part of the chain of moving surface size ownership to the client
and making relayout asynchronous. We were already sending Surface
size to the client so it's easy to just use that and avoid
sending an extra result flag.

Bug: 161937501
Test: Existing tests pass
Change-Id: I18a96616d2cf082197fbbd434a737ed77ba40e9c
2020-09-09 01:27:15 +00:00
ryanlwlin
e4d954337f Change magnification animation callback (1/2)
To handle the transition issue, we would like to add this callbck
both in full-screen and window magnification.

Bug: 161669184
Test: atest FullScreenMagnificationControllerTest
Change-Id: I590871386f885827126a1f21937780d3e6e918d0
2020-09-09 08:38:44 +08:00
Winson Chung
d9b9d038b8 Merge "Allow enabling/disabling batching in BatchedInputEventReceiver" 2020-09-08 21:58:04 +00:00
Chavi Weingarten
932d71679f Merge "Send ScreenCaptureListener to native screen capture requests." 2020-09-08 19:05:58 +00:00
Winson Chung
0e32990cff Allow enabling/disabling batching in BatchedInputEventReceiver
- Use the batched receiver when handling back only after the
  gesture is recognized (fewer updates)
- Remove some unused code

Bug: 167732711
Test: Back gesture still works
Change-Id: I2b12574a4d6c7f997a8cdc70825ef1bd03669fd8
2020-09-08 18:46:08 +00:00
Matt Casey
55689cf778 Merge "Set the default screenshot delay to 0ms" 2020-09-08 17:25:39 +00:00
chaviw
3510924a6d Send ScreenCaptureListener to native screen capture requests.
Allow for asynchronous screenshot by sending a ScreenCaptureListener to
handle screenshot callbacks. All existing calls are still synchronous
since the SurfaceControl method will block the caller until the results
from SurfaceFlinger are ready.

Test: power + volume down
Test: adb shell screencap
Bug: 162367424
Change-Id: I54c34003c0786b585dd20530a06dbd4b266e178c
2020-09-08 09:59:50 -07:00
Tiger Huang
dfc8abb1ff Update requested state after applying pending frames
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.

Fix: 161134197
Test: atest InsetsControllerTest
Merged-In: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
(cherry picked from commit 23c75281ef)
2020-09-07 16:09:08 +08:00
Tiger Huang
0e9c2ea160 Merge "Notify visibility change if source visibility is changed" 2020-09-04 08:36:55 +00:00
Miranda Kephart
bf82822698 Set the default screenshot delay to 0ms
Bug: 165267251
Test: manual -- ensured that the time needed to hold is 0ms if the
screenshot_keychord_delay debug value is not set, and that the
delay can still be changed using

adb shell device_config put systemui screenshot_keychord_delay <ms>

Change-Id: Iab989ecf14ef379658130adbced241e084554e63
2020-09-03 15:51:31 -04:00
Tiger Huang
fd94351305 Notify visibility change if source visibility is changed
This makes view root dispatch the up-to-date WindowInsets to the app.

Fix: 166619182
Test: Steps in the bug (comment#12)
Change-Id: I8c47e3be84357f65084a7d9994f7d7b68f15611e
2020-09-03 23:01:21 +08:00
Tiger Huang
7053288de1 Merge "Make FLAG_LAYOUT_NO_LIMITS compatible" 2020-09-03 07:14:31 +00:00
Tiger Huang
f6a91b70a0 Merge "Remove redundant comment in Javadoc" 2020-09-03 07:09:34 +00:00
Vishnu Nair
3e5d102ef6 Request focus using setFocusedWindow
This change introduces two new SurfaceControl apis, one to request focus
to a particular window and the other to transfer focus to an embedded
window if the host window is currently focused.

WindowHandleInfo is updated to specify focusability instead of the
currently focused window. This will provide more information to
InputDipatcher on what all the focusable windows are on screen and
in the future allow it to determine a new focus target.

Lastly, after updating all the WindowHandles in InputMonitor, we switch
over to calling setFocusedWindow to specify the desired focused window.
There should be no functional changes with this cl.

Test: atest inputflinger_tests
Test: atest CtsWindowManagerDeviceTestCases
Test: atest FlickerTests

Bug: 151179149
Change-Id: Iefda51ce73247b208115e64f9f8159a182d93ded
2020-09-02 16:13:13 -07:00
Xin Li
c8c8e8e8be Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-09-02 12:34:37 -07:00
Tiger Huang
8784870821 Merge "Compare with oldSoftInputMode after restoring softInputMode" into rvc-qpr-dev am: 6a1829d14a am: b95d91a1ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12500989

Change-Id: I3fd81eb8a739cc2bb55f23ab49a4ab27d62bced6
2020-09-02 18:05:55 +00:00
Tiger Huang
63b0b6e6bb Make display frame compatible am: 677078e872
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12500988

Change-Id: Ie735f38e26cd6fa5c71aef0dbf70e87072b1ae4c
2020-09-02 12:19:24 +00:00
Tiger Huang
b95d91a1ba Merge "Compare with oldSoftInputMode after restoring softInputMode" into rvc-qpr-dev am: 6a1829d14a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12500989

Change-Id: I603f8ba6efa2b4536da8a039c06aefac63f57501
2020-09-02 12:18:58 +00:00
Tiger Huang
677078e872 Make display frame compatible
The display frame is used to limit the windows boundary. The frame is
the same as the parent frame in most cases if the window is not
attched. However, if a window doesn't have any layout related
window/sysui flags and the soft input mode is not ADJUST_RESIZE, the
display frame doesn't need to be inset by IME (but the parent frame
does).

Fix: 163435784
Test: atest ViewRootImplTest DisplayPolicyLayoutTests
Merged-In: Ia61933120027642d1f0e0a490546071ca2b6c853
Change-Id: Ia61933120027642d1f0e0a490546071ca2b6c853
2020-09-02 11:38:21 +00:00
Tiger Huang
e80e94182c Compare with oldSoftInputMode after restoring softInputMode
... of mWindowAttributes. Apps might update LayoutParams with
softInputMode unspecified on applying insets, and this can cause
infinite loop in the previous logic, because we would auto-compute
softInputMode for the unspecified one, which makes app's softInputMode
never be the same as the one in ViewRootImpl.mWindowAttributes.

Fix: 163009478
Test: Print stack trace before calling requestFitSystemWindows() and
      follow the steps in the bug.
Test: Open Messages, go to attachments, reopen IME
Change-Id: I2341121b69209688c2f6fb033f51611b21422a04
2020-09-02 06:48:08 +00:00
Tiger Huang
ea3ed2f4c9 Merge "Make display frame compatible" 2020-09-02 06:36:43 +00:00
TreeHugger Robot
4ef96d7909 Merge "Add Null check for mView.findFocus() in ViewRootImpl" 2020-09-02 01:51:04 +00:00
Ming-Shin Lu
bdaa14bf18 Add Null check for mView.findFocus() in ViewRootImpl
Some apps like Netflix crashed while handleWindowFocusChanged but mView
somehow has became null.

It's fair to check null for mView.findFocus() since other places
in ViewRootImpl that calling this method also add null check.

Fix: 153862451
Test: atest CtsInputMethodTestCases

Change-Id: I86bd5f3193deabe28bb425a8564017f7b32b90f3
2020-09-02 01:37:28 +08:00
Tiger Huang
507da8e186 Make display frame compatible
The display frame is used to limit the windows boundary. The frame is
the same as the parent frame in most cases if the window is not
attched. However, if a window doesn't have any layout related
window/sysui flags and the soft input mode is not ADJUST_RESIZE, the
display frame doesn't need to be inset by IME (but the parent frame
does).

Fix: 163435784
Test: atest ViewRootImplTest DisplayPolicyLayoutTests
Change-Id: Ia61933120027642d1f0e0a490546071ca2b6c853
2020-09-01 22:03:37 +08:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Ryan Lin
568e05582c Merge "Add callback for enabling/disabling window magnification" 2020-08-28 00:08:34 +00:00
Ahan Wu
ba492039e1 Infrastructure of Always-on tracing
The aot infrastructure for instrumenting CUJs.
The usage is like below:
AlwaysOnTraceManager.init(view /* one in the view tree */);
AlwaysOnTraceManager.begin();
...
AlwaysOnTraceManager.end();

Bug: 158756171
Bug: 163514962
Bug: 162483077
Test: Manually
Test: atest FrameworksCoreTests
Change-Id: I570a760d4f3b71e86f19172d8f595e558369ff65
2020-08-28 00:10:42 +08:00
Bill Rassieur
02664711e9 Revert "Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b338052..."
Revert "Snap for 6792834 from 5b681187dce32555f398c1b823b82be3a4..."

Revert "Snap for 6792834 from ff268453a3067874ebba3646e8e9fdbc04..."

Revert "Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328de6e34..."

Revert "Snap for 6792834 from 38626f86b924625d27d752950ce04045e6..."

Revert "Snap for 6792834 from a2cb05379b86f00033bd19912e1d6031f6..."

Revert "Snap for 6792834 from f1e69b45bde30a055d37260012df8e951b..."

Revert "Snap for 6792834 from 9215e252c9daaad53a18582afe5478eb6c..."

Revert "Snap for 6792834 from c9d246d88c86368fddcaa9f58d6eec740f..."

Revert "Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1f42331..."

Revert "Snap for 6792834 from d6d5105b22925ff168be784af9fb044fdd..."

Revert "Snap for 6792834 from e8dc6bf8735df45be9eb7867921243d83d..."

Revert "Snap for 6792834 from de2e193ad770855a0cdc7b96d91a13929b..."

Revert "Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8857dc7..."

Revert "Snap for 6792834 from 1529174442dc31e0036c58fba7a90184ee..."

Revert "Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d953019..."

Revert "Snap for 6792834 from 1a8f386df1be8e4692c00dda348f4addfb..."

Revert "Snap for 6792834 from d5d749da0ba5e53684535fae5eb76c085f..."

Revert "Snap for 6792834 from bc7dc6f5c75789d25879762854a071bd1b..."

Revert "Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df331300..."

Revert "Snap for 6792834 from bdbd076341f75ed0416f4cda0a98fc6f54..."

Revert "Snap for 6792834 from 201eaa68fcc0781df6f7713901fd5a0862..."

Revert "Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d5db563..."

Revert "Snap for 6792834 from 82eecc9b3c895d356fca70f4b8def94600..."

Revert "Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d33be247..."

Revert "Snap for 6792834 from 4b73f247850059a4312525662991d73359..."

Revert submission 12462888-release-request-aa3875fd-ef4c-4f66-9a1c-b0b05058d091-for-git_main-busytown-release-6792834

Reason for revert: Bad snap due to branch misconfig.

Reverted Changes:
I950c3960b:Snap for 6792834 from de2e193ad770855a0cdc7b96d91a...
Ie6452b91a:Snap for 6792834 from c9d246d88c86368fddcaa9f58d6e...
I6b98cb766:Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d...
Ie5e19aaef:Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b...
I35385da96:Snap for 6792834 from 4b73f247850059a4312525662991...
I1a59949e5:Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df...
I2c40ffbc2:Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1...
I24c147f50:Snap for 6792834 from ff268453a3067874ebba3646e8e9...
Iabb2fe4c1:Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8...
I92bfbb5d5:Snap for 6792834 from 0ad493cce4f8f187dc37671b45d5...
I2e92b2d5d:Snap for 6792834 from f1e69b45bde30a055d37260012df...
I0fdb356fa:Snap for 6792834 from a2cb05379b86f00033bd19912e1d...
I9b19f9bdc:Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d3...
Ie88e387a6:Snap for 6792834 from 9215e252c9daaad53a18582afe54...
Idc1ae35dd:Snap for 6792834 from 201eaa68fcc0781df6f7713901fd...
Ib16deadd9:Snap for 6792834 from 1a8f386df1be8e4692c00dda348f...
I744f889d3:Snap for 6792834 from d5d749da0ba5e53684535fae5eb7...
Ib6e060e44:Snap for 6792834 from bdbd076341f75ed0416f4cda0a98...
Iab587ff78:Snap for 6792834 from e8dc6bf8735df45be9eb78679212...
Ia1f4ef82f:Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d...
Ief930c2b5:Snap for 6792834 from 5b681187dce32555f398c1b823b8...
Ia71445b6a:Snap for 6792834 from 38626f86b924625d27d752950ce0...
Ia95c82cfc:Snap for 6792834 from 1529174442dc31e0036c58fba7a9...
If1e1b5e35:Snap for 6792834 from bc7dc6f5c75789d25879762854a0...
I98959e228:Snap for 6792834 from 1e7f83c953b7571dceabd5d7f6a2...
I321c4cb8b:Snap for 6792834 from d6d5105b22925ff168be784af9fb...
I3ed2d46ee:Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328...
Id4a7f102c:Snap for 6792834 from 82eecc9b3c895d356fca70f4b8de...

Change-Id: I4b944b89f3c581fbd67f5952d9ec413d02756abc
2020-08-27 02:20:22 +00:00
Tiger Huang
e5a898a916 Make FLAG_LAYOUT_NO_LIMITS compatible
The content of a window with FLAG_LAYOUT_NO_LIMITS can extend into
system bar areas before android R, but not in R, which is not
compatible.

Fix: 166391803
Test: atest ImeInsetsSourceConsumerTest InsetsControllerTest
      InsetsStateTest
Change-Id: I2470a4eeb9f0f291321e21d42bc6e9c52e7a8e9d
2020-08-26 22:36:51 +08:00
ryanlwlin
6045db95e6 Add callback for enabling/disabling window magnification
To support switching magnification mode, we add callback to know
when the animation is finished. We only invoke the newest callback
when the animation is end successfully or the spec didn't change

Bug: 161669184
Test: atest com.android.systemui.accessibility
      atest com.android.server.accessibility.magnification
      Enable window magnification to see if it works normally
Change-Id: I34ce39d133a000964d1089946b7bcf510a618b40
2020-08-26 17:35:13 +08:00
Alex Mang
c16b30706f Fix parenthesis to prevent hidden feedback icon from calling click
listener

Bug: 165338901
Test: manually on device
Change-Id: I09c022e3ad86485f249874892b7bc4996405f5e1
2020-08-25 15:27:13 -07:00
Siarhei Vishniakou
0c2a482edb Add dump of InputConsumer to ViewRootImpl
To further debug ANR issues, add dump of InputConsumer-related objects
to ViewRootImpl

Example dump:

      android.view.ViewRootImpl$WindowInputEventReceiver
       mInputChannel: 25697fd com.google.android.pixel.setupwizard/com.google.android.pixel.setupwizard.user.WelcomeActivity (client)
       mSeqMap: {}
       mReceiverPtr:
        mInputConsumer:
          mResampleTouch = true
          mChannel = 25697fd com.google.android.pixel.setupwizard/com.google.android.pixel.setupwizard.user.WelcomeActivity (client)
          mMsgDeferred: false
          Batches:
              <empty>
          mSeqChains:
              <empty>

        mBatchedInputEventPending: false
        mFinishQueue:
          <empty>

    Choreographer:
      mFrameScheduled=false
      mLastFrameTime=1625545 (8 ms ago)

Bug: 160561987
Test: adb shell dumpsys activity -v all | grep -i input -C 50
Test: adb shell dumpsys activity service SystemUIService | grep -i EventReceiver -C 20
Change-Id: I99807c264ced8eb939b90a30e2ff91775fbdec40
2020-08-21 14:37:04 -05:00
Tiger Huang
16858d1dde Remove redundant comment in Javadoc
It is extraneous message in documentation.

Fix: 165475304
Test: build
Change-Id: I129f96f6ed716e25c476bacbdb38799675919b9a
2020-08-20 13:45:11 +00:00