Commit Graph

15034 Commits

Author SHA1 Message Date
Adrian Roos
06b04e967a Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev am: e658c76b5c am: ba68b71a5c am: 1b3d71002f am: b78766031f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837615

Change-Id: I13528f9621e3c504b53c34f20e3baecbe3468c1f
2020-06-23 07:58:59 +00:00
Adrian Roos
b78766031f Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev am: e658c76b5c am: ba68b71a5c am: 1b3d71002f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837615

Change-Id: I9bfe4da48628fa5f06b6646bbc44efae04f5f297
2020-06-23 07:48:09 +00:00
Adrian Roos
e658c76b5c Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev 2020-06-23 07:06:48 +00:00
Taran Singh
7bc870bc4c Merge "Fix InsetsConsumer leak" into rvc-dev am: 296855fe76 am: 85ba727a85 am: 4987048675 am: d2aad55cb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11935094

Change-Id: I982a1025fce7351628abd9744596713f13cee228
2020-06-22 19:22:34 +00:00
Taran Singh
4987048675 Merge "Fix InsetsConsumer leak" into rvc-dev am: 296855fe76 am: 85ba727a85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11935094

Change-Id: I5ede4fa176aef12ff788893144a3a64191958976
2020-06-22 19:19:31 +00:00
Taran Singh
296855fe76 Merge "Fix InsetsConsumer leak" into rvc-dev 2020-06-22 18:53:20 +00:00
TreeHugger Robot
c593334af7 Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev am: 70ad33113f am: 2d8df39d7c am: 92809870d0 am: e0659980e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863061

Change-Id: I7b850b58050727567ec05b140b8c99f27fd0032f
2020-06-22 15:59:27 +00:00
Taran Singh
531404721f Fix InsetsConsumer leak
Activity was still referred from ImeInsetsSourceConsumer after
ViewRootImpl's mView was destroyed when ViewRoot's surface is cleared
using die signal.
This CL makes sure we still free-up resources at die signal.

Fix: 157955883
Test: atest NexusLauncherTests
Change-Id: Ia48f7b7a8cf6b867ce75b2b7393a60ba73b0c3d0
2020-06-22 15:32:47 +00:00
TreeHugger Robot
92809870d0 Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev am: 70ad33113f am: 2d8df39d7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863061

Change-Id: I756f28edde2a871597dacfc8213f7b22b144ce46
2020-06-22 15:16:51 +00:00
Adrian Roos
c22eec9d35 IME animation: hide IME-related navbar icons until perceptible
During transitions and while the IME is controlled by the app,
the IME may be "visible" as far as the IME framework is concerned,
but not actually perceptible by the user due to offsets or alpha
applied to the leash.

This may lead to out-of-place navbar symbols for the IME, especially
in gesture nav.

To avoid this, the ImeInsetsSourceConsumer now notifies the IMF of
whether it has made the IME unperceptible to the user.

For now, we ignore the cases where the IME is controlled by something
other than the client window - in that case, we just revert to the
previous behavior of it being always considered perceptible.

Fixes: 158079255
Test: manual, launch email compose activity, observe that back button only indicates once IME appears
Test: atest InsetsAnimationControlImplTest
Change-Id: I4dc9d6513d0559156f7da39244f3fc5ebc952ed4
2020-06-22 16:55:54 +02:00
TreeHugger Robot
70ad33113f Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev 2020-06-22 14:51:15 +00:00
Ming-Shin Lu
48bfc3165c Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
CL[1] introduces new WINDOW_FOCUS_GAIN_REPORT_ONLY flows to notify
InputMethodService only reports IME input target to WM when focusing to
the next window and its input connection remains.

Originally in android Q and prior devices, we don't need such report
mechnism but just skip to start new input connection and ignore
onStartInput / onFinishInput for the above use case.

Since starts from Android R, new IME insets control APIs relying on this
mechanism (see CL[2]) to keep the actual IME input target up-to-date.

As we expected there should be no new input connection and additional
onFinishInput when CL[1] landed.

However, in IMMS, startInputUncheckedLocked will be called
to callback additional onStartInput for InputMethodService, which mostly
is not expected, except when focusing the same window after device
turned screen on, we need to start input and callback onStartInput to
align with the behavior of android Q or the prior platform.

Besides, to have more clear code logic and debugging concept of
ignoring onStartInput and onFinishInput only when focused the same editor
with input connection remains, we remove WINDOW_FOCUS_GAIN_REPORT_ONLY
reason and introduced 2 more start input reasons to distinguish the
different behavior:
    - WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
    - WINDOW_FOCUS_GAIN_REPORT_WITHOUT_EDITOR

[1]: I45a9814d812ad906f417c24200fd4219959e2423
[2]: I9e8984b7e5aa989a53ece9e2576393f795b9ef94

Fix: 158624922
Test: atest FocusHandlingTest InputMethodStartInputLifecycleTest
Test: manual as below steps:
    1. Use Gboard, Open the emoji keyboard
    2. Swipe down to reveal notification shade
    3. Swipe up to dismiss notifications
    4. Expect the Emoji keyboard is still open without close

Change-Id: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
2020-06-22 12:22:33 +08:00
TreeHugger Robot
58da767c8c Merge "Animate IME with zero insets" into rvc-dev am: cc498f3e69 am: 5208fccc52 am: 727d5a2f14 am: 422a4d9355
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829827

Change-Id: Ibeba89e6817b8bf0ee2ba05d8d51bbdce3d68137
2020-06-20 17:50:52 +00:00
TreeHugger Robot
727d5a2f14 Merge "Animate IME with zero insets" into rvc-dev am: cc498f3e69 am: 5208fccc52
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829827

Change-Id: I58c014806c75aa48c8ada10ede61ecdacdec2823
2020-06-20 17:29:45 +00:00
Taran Singh
4291410118 Animate IME with zero insets
When IME has zero insets, it doesn't map to any side and doesn't have
can't be animated.
IME can have zero insets in following cases:
1. Floating IME
2. Fullscreen IME (in landscape)
3. IME doesn't overlap with IME target window.

In order to animate a type, it must have insets. We can animate IME
from negative insets to zero and vice-versa. This makes zero insets IME a
special case of ISIDE_BOTTOM.
Deprecate SIDE_FLOATING because it shouldn't logically map to a side.

Fix: 153909316
Test: atest WindowInsetsAnimationImeTests#testZeroInsetsImeAnimates
Change-Id: I6d1d3430888db4632cb2f93e9042f692b35ebaeb
2020-06-20 03:51:00 +00:00
TreeHugger Robot
f0a0086107 Merge changes I4fdf368e,Ibc6be890 into rvc-dev am: 48dc192499 am: 6affc2707b am: 14b026be14 am: 4e688954f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932511

Change-Id: I0d86f77530395d32e0bb71bb0020e95a4db28302
2020-06-20 00:52:43 +00:00
TreeHugger Robot
4e688954f6 Merge changes I4fdf368e,Ibc6be890 into rvc-dev am: 48dc192499 am: 6affc2707b am: 14b026be14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932511

Change-Id: I7853d826972dd9b2aeaceca62bbaba13e7524125
2020-06-20 00:37:58 +00:00
TreeHugger Robot
9a56fc9d77 Merge changes I4fdf368e,Ibc6be890 into rvc-dev am: 48dc192499 am: 6affc2707b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932511

Change-Id: I467cdc91b8747234fc21241b2a2753bee4871488
2020-06-20 00:24:05 +00:00
TreeHugger Robot
48dc192499 Merge changes I4fdf368e,Ibc6be890 into rvc-dev
* changes:
  SurfaceControlViewHost: Release ViewRoot from finalizer
  SurfaceControlViewHost: Call doDie with true
2020-06-20 00:07:56 +00:00
Robert Carr
7a31b8b1df SurfaceControlViewHost: Release ViewRoot from finalizer
If we don't explicitly go through the doDie process the
WindowManagerGlobal instance will hold the ViewRoot alive
indefinitely. This accidental leak could be very expensive so
we prevent it with a finalizer.

Bug: 157709599
Test: Existing tests pass
Change-Id: I4fdf368eed4b4e43faacd9f62b6d9fddfd9b7ef2
2020-06-19 13:14:00 -07:00
Robert Carr
5409e24105 SurfaceControlViewHost: Call doDie with true
If we pass immediate=false to the doDie without
updating the visibility, we may destroy the hardware renderer
but then try to draw again anyway, and then crash. It seems
theres no reason we can't call immediate=true and
properly shut down immediately.

Bug: 159250432
Test: Existing tests pass
Change-Id: Ibc6be8901be10c0985681d83f4ce16dd1ab54925
2020-06-19 13:10:13 -07:00
Jorim Jaggi
93b599d303 Merge changes Ia7d9514e,I3e9e4f47 into rvc-dev am: 5cc486b1a1 am: f3dfb52c65 am: f6c42e5a96 am: 203ee45a71
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920861

Change-Id: I1eccacb45f6992b516dd615a0ede7d3fd1f90f7e
2020-06-19 14:58:08 +00:00
Jorim Jaggi
203ee45a71 Merge changes Ia7d9514e,I3e9e4f47 into rvc-dev am: 5cc486b1a1 am: f3dfb52c65 am: f6c42e5a96
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920861

Change-Id: I616a490a859162aca5d3b095d920dc72b0e77a6c
2020-06-19 14:46:24 +00:00
Jorim Jaggi
cd350453d6 Merge changes Ia7d9514e,I3e9e4f47 into rvc-dev am: 5cc486b1a1 am: f3dfb52c65
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920861

Change-Id: I0fa24dba86e7aad7dd4cc2315c7556dee88b44a3
2020-06-19 14:32:31 +00:00
Jorim Jaggi
5cc486b1a1 Merge changes Ia7d9514e,I3e9e4f47 into rvc-dev
* changes:
  Yearly Window Manager spring cleaning #2
  Yearly Window Manager spring cleaning #1
2020-06-19 13:58:45 +00:00
Jorim Jaggi
bfa95a71fb Yearly Window Manager spring cleaning #1
- Replace InsetsState ArrayMap with simple array.
- Cache same values in InsetsPolicy.
- Only access Dimmer if dimming

Test: InsetsState test etc.
Bug: 159056748
Change-Id: I3e9e4f473eaa05b2013b7a6d0f37cd9c1fac81dd
2020-06-19 13:18:38 +02:00
Automerger Merge Worker
871ff9195f Merge "Merge "Fix the context leak in the ContentCapture" into rvc-dev am: 44b233c55d am: 8766dbaf8c am: 8e1a8334a1" into rvc-qpr-dev-plus-aosp am: 0d9f8e5b8e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882491

Change-Id: I5e108123c38cedecb2dab0e902842418076738df
2020-06-19 07:24:43 +00:00
TreeHugger Robot
8e1a8334a1 Merge "Fix the context leak in the ContentCapture" into rvc-dev am: 44b233c55d am: 8766dbaf8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882491

Change-Id: Ia9a003e3f59d8252e630fffe8782178839ffbebb
2020-06-19 07:02:08 +00:00
TreeHugger Robot
8766dbaf8c Merge "Fix the context leak in the ContentCapture" into rvc-dev am: 44b233c55d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882491

Change-Id: I8c6f7cbb3e8467782d8fab29f40c86ce8f0e3871
2020-06-19 06:51:50 +00:00
TreeHugger Robot
44b233c55d Merge "Fix the context leak in the ContentCapture" into rvc-dev 2020-06-19 06:38:19 +00:00
TYM Tsai
c9f0c232ae Fix the context leak in the ContentCapture
Activity cannot be released because the context be holded by multiple
objects.
* Activity holds ContentCaptureManager.
* ContentCaptureManager holds the context and MainContextCaptureSession.
* MainContextCaptureSession holds the context and ContentCaptureManager.
* The system server holds some binder references to MainContentCaptureSession.
If the system service never released the binder references, then the
activity is also never GC'd.
To avoid the issue,
1. Make the session state receiver of MainContextCaptureSession to be
   static and uses weak reference to MainContextCaptureSession.
2. The direct service vulture may miss to do unlinkToDeath(), do a checking
   while the session destory.

Bug: 143210612
Test: manual check Objects on the meminfo
Test: Activities should be released after a period of time
Test: adb shell dumpsys meminfo com.google.android.dialer
Change-Id: I12037483addb1efe444c74fa189ef6afd15821dd
2020-06-19 12:09:54 +08:00
Alex Mang
41f94e585f Merge changes from topic "feedback"
* changes:
  Flag guarding all notification feedback UI
  Adding automatic option in long press menu
  Adding notification guts to feedback icon
  Add notification feedback indicator icon.
2020-06-18 20:38:37 +00:00
Ady Abraham
5068b95c40 Merge "WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags" into rvc-dev am: 278f00319f am: 66bab75ea1 am: e212052243 am: 2a57fdcd37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11852824

Change-Id: I8c15fa26c30c3eabd39e73eba45ec50211bee740
2020-06-18 05:44:09 +00:00
Ady Abraham
e212052243 Merge "WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags" into rvc-dev am: 278f00319f am: 66bab75ea1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11852824

Change-Id: I19c91a7b9d2229f1fd95d58182cd1060d75cf060
2020-06-18 05:11:37 +00:00
Ady Abraham
66bab75ea1 Merge "WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags" into rvc-dev am: 278f00319f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11852824

Change-Id: Iae325723452bbb5ac9c941d8e84d95d0c80337b4
2020-06-18 04:51:35 +00:00
Ady Abraham
278f00319f Merge "WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags" into rvc-dev 2020-06-18 04:36:03 +00:00
Vishnu Nair
2ed39d82db WM: Replace eEarlyWakeup flags with explicit eEarlyWakeup start and end flags
eEarlyWakeup flag is used as a hint to SurfaceFlinger to adjust its
offsets so it can wakeup earlier and have sufficient time to compose
more complex scenes.

This flag has been replaced with explicit start and stop flags which
ensure the SurfaceFlinger offsets remain consistent during animation.

Bug: 158127834
Test: go/wm-smoke
Test: systrace to verify new tracepoint and offset behavior

Change-Id: Ib9c35c01a6bf02f88ec7cb1778e01909bd2f9055
2020-06-17 23:10:30 +00:00
TreeHugger Robot
bb97cab140 Merge "Revert "Add logs that indicate why a surface is invalid"" into rvc-dev am: d82080094e am: 0b235515ce am: 3d61c943b8 am: 4d3b81c34b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11874469

Change-Id: I6bb15e1d50e5a92f6ee6b0f03b99bf9cdaa6ac64
2020-06-17 14:57:38 +00:00
TreeHugger Robot
3d61c943b8 Merge "Revert "Add logs that indicate why a surface is invalid"" into rvc-dev am: d82080094e am: 0b235515ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11874469

Change-Id: Ia68ee7a6a29ecab20ffe97471398a3c93c58b6b1
2020-06-17 14:34:16 +00:00
TreeHugger Robot
0b235515ce Merge "Revert "Add logs that indicate why a surface is invalid"" into rvc-dev am: d82080094e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11874469

Change-Id: I744413842bbc74724268c1fe58187a74f4d90461
2020-06-17 14:15:17 +00:00
Jorim Jaggi
e1f741becf Revert "Add logs that indicate why a surface is invalid"
This reverts commit 0fd6748bf6.

Bug: 159056748
Change-Id: I850c0d29e07c74143868c6c63cef63649a449c9e
2020-06-17 14:12:50 +02:00
Wilson Wu
ed78e4510f Merge "Refine InputMethodManager#isAcceptingText API" 2020-06-17 02:58:10 +00:00
TreeHugger Robot
c65f53e0be Merge "SurfaceView: Check ViewRootImpl non-null" into rvc-dev am: 3764cbaac4 am: 38972ce1f6 am: a95675bfcf am: 735b5257d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11884759

Change-Id: I26a71d11230d12611723a9b0185923c4f2048d9c
2020-06-17 01:28:12 +00:00
TreeHugger Robot
a95675bfcf Merge "SurfaceView: Check ViewRootImpl non-null" into rvc-dev am: 3764cbaac4 am: 38972ce1f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11884759

Change-Id: If2e1fe9ee2983bd5414ca65a8777ce278a1474ae
2020-06-17 00:54:27 +00:00
TreeHugger Robot
38972ce1f6 Merge "SurfaceView: Check ViewRootImpl non-null" into rvc-dev am: 3764cbaac4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11884759

Change-Id: Iecdbbd14f2a4e78b1614b199efb4abd004c6445b
2020-06-17 00:38:07 +00:00
TreeHugger Robot
9a3fa17f6c Merge "Revert "Disable user animations on insets whose visible frame is empty"" into rvc-dev am: 11fcb1987a am: 37de161ec5 am: a62362b295 am: dc1a9eba2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11883882

Change-Id: I41b211a28b689d4e23da25038c44c78c7a05e7c1
2020-06-17 00:19:30 +00:00
TreeHugger Robot
3764cbaac4 Merge "SurfaceView: Check ViewRootImpl non-null" into rvc-dev 2020-06-17 00:16:36 +00:00
TreeHugger Robot
a62362b295 Merge "Revert "Disable user animations on insets whose visible frame is empty"" into rvc-dev am: 11fcb1987a am: 37de161ec5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11883882

Change-Id: I87dcee6341c69226c000062e38b30a988b3064b7
2020-06-16 23:34:36 +00:00
TreeHugger Robot
37de161ec5 Merge "Revert "Disable user animations on insets whose visible frame is empty"" into rvc-dev am: 11fcb1987a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11883882

Change-Id: I2b97b5a88908579d3ff142fa21b1b41f59188b03
2020-06-16 23:18:15 +00:00
TreeHugger Robot
11fcb1987a Merge "Revert "Disable user animations on insets whose visible frame is empty"" into rvc-dev 2020-06-16 23:01:15 +00:00