| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
It should never be null. We had a bug where the IME callback can be
unexpectedly GC-ed and jam back nav. This is to verify if we need its
fix ag/21301891 in QPR as well.
Bug: 274911901
Test: atest WindowOnBackInvokedDispatcherTest
Change-Id: Ic2a576655ca16577ca35f3544f5b26d4a0db8f90
|
| |\
| |
| |
| | |
re-created" into tm-qpr-dev
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When recreating the Activity, if the window is preserved, we would set
the actual dispatcher from the preserved window to the new Activiy's
proxy dispatcher, and expect the new callback could be re-registered
in the recreating flow.
This CL clears the old callbacks of the preserved dispatcher before it
attach to the new proxy dispatcher, this could prevent it access the
wrong top callback after other new callbacks have been unregistered.
Also provide dump log for WindowOnBackInvokedDispatcher.
Bug: 259500250
Test: atest BackNavigationTests
Change-Id: Idc9a6a95f5669a009762570d7bc9acc2c538e4cb
|
| |/
|
|
|
|
|
|
|
|
| |
Add cancel and the cancel callback in BackProgressAnimator so it could
animate to start position and invoke the callback after finished.
Bug: 259608500
Test: atest BackAnimationControllerTest BackNavigationControllerTests
Test: atest BackProgressAnimatorTest
Change-Id: I94303ba530d155f4b264dafa21bd23185a6b44bd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BackEvent.
The constructor of BackEvent has diverged on QPR and master, which will
create merge conflicts for all subsequent SysUI back animations to be
added from QPR. This cherry-picks ag/20445076 minus the public API
changes to solve this problem.
Test: atest BackAnimationControllerTest
Test: atest BackNavigationControllerTests
Test: atest WindowOnBackInvokedDispatcherTest
Test: atest TouchTrackerTest
Test: m -j
Bug: 238475284
Change-Id: Ib9100a9d667a9a17e8f357a1bfc3ee2b52ec17c7
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces BackProgressAnimator which runs in app's main thread.
It receives target progress values from SysUI and drives the actual
progress value passed to the app with a high stiffness, no bounce
spring.
Bug: 238475284
Test: atest WindowOnBackDispatcherTest
Test: atest BackAnimationControllerTest
Test: atest TouchTrackerTest
Change-Id: Ib0d3ebe43929c405b10681000fb4e7ef8bccce34
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Predictive back infra respect the enforce flag everywhere else (e.g. for
compat / default callback registrations), so we follow the same pattern
here.
This flag is a development only flag, so this CL should not affect
droidfood or public builds.
Test: `adb shell setprop persist.wm.debug.predictive_back_always_enforce
1`. Restart. Check apps can register callbacks without opting in (e.g.
can swipe back to LS from bouncer)
Change-Id: I7d5a85b37b50b11f6e4be28d022dd0e528a7d4fd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0099ca8fab618dfeefe25cb4c2146b2831900ee5 and provide
new mechanism.
The back invoke target could lost focus during back navigation gesture.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen the focus change of
current focused window and cancel back gesture when its focus has lost.
Bug: 238050065
Bug: 239792909
Test: atest BackNavigationControllerTests
Test: atest BackNavigationLegacyGestureTest BackNavigationLegacyTest
Test: atest BackNavigationTests
Test: atest WindowOnBackInvokedDispatcherTest BackNavigationTest
Test: atset BackAnimationControllerTest
Change-Id: I65eb19371020ce39977eeb2a2a80c7f08600aaec
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.
Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065
Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.
Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible
Bug: 235206960
Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2db92189055804878b88a51f0cf8e955)
|
| |
|
|
|
|
| |
Bug: 227173606
Test: N/A
Change-Id: Ia03f7b6e5d9dfb6e247fab4526d6293b3600d398
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously when curRootView changes IMM, the back callbacks are not
moved to the new focused ViewRootImpl. As a result if IME is up during
the focus change, the back callback would fail to unregister when
IME tries to hide itself.
Test: atest InputMethodServiceLifecycleTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Bug: 232660571
Bug: 232331013
Change-Id: Id30e51c74afbcce1f22d87af77e8404b4f0ae7d2
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently close the IME by having the target application forward KEYCODE_BACK to the IME process through InputMethodManager#dispatchInputEvent and having the IME handle the keycode in InputMethodService#onKeyDown. When apps opt in to OnBackInvokedDispatcher API, we will not dispatch KEYCODE_BACK to apps anymore. Thus we need to migrate IME to the new API for it to close on back invocation.
This implementation forwards OnBackInvokedCallbacks from the IME process
to the app process. This is necessary because all callbacks need to
exist in the app process for them to be considered by hardware back keys. While back gestures go through WM to resolve callbacks from the focused window, hw keys are directly sent to the focused window's ViewRootImpl, bypassing server side back nav logic.
Bug: 228358882
Test: atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test: atest CtsInputMethodTestCases
Change-Id: Ie207b63b11a56c9b2173f26b734a27b13ebccc60
|
| |\
| |
| |
| | |
into tm-dev
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Main motivation is to store a back callback's exact priority value in WM. This is required by the IME migration (ag/17076160) to compare the priority levels of IME window callback and focused window callback in BackNavigationController.
This also consolidates the WindowState#mSystemOnBackInvokedCallback and WindowState#mApplicationOnBackInvokedCallback fields into one field, as tracking two fields for one callback was error prone. We had to remember to clear the application / system field when the other field is set, and failing to do so has resulted in bugs such as b/222675481.
Bug: 224856664
Test: atest BackNavigationControllerTest
Test: atest WindowOnBackInvokedDispatcherTest
Test: m -j and test back behavior throughout the system on apps that
opted in and out.
Change-Id: Ic57113610d934f33d2c9ca4cef59f39a9b87e832
|
| |\ \
| |/
|/|
| | |
tm-dev
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is such that they can be controlled from Flag Flipper UI.
Boolean flags introduced:
persist.wm.debug.predictive_back - Overall switch for the new back infra
persist.wm.debug.predictive_back_anim - Animation switch
persist.wm.debug.predictive_back_always_enforce - Switch to ignore per
app opt-in flag and always enforce new behavior
persist.wm.debug.predictive_back_screenshot - Screenshot switch. Not
added to Flipper yet.
Test: Flip the flags in Flipper and verify behavior is as expected.
Change-Id: Icff098035119fb83f393e20c6ac590be2f22c845
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes OnBackInvokedCallback SAM compatible
Bug: 227789359
Test: atest \
CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationLegacyTest \
CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationTests \
WmTests:com.android.server.wm.BackNavigationControllerTests \
FrameworksCoreTests:android.window.BackNavigationTest \
FrameworksCoreTests:android.window.WindowOnBackInvokedDispatcherTest \
CtsViewTestCases:android.view.cts.OnBackInvokedDispatcherTest
Change-Id: Iab86b0488f1b3048eb02042191acaeb6a645a0bc
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Better logging
- Remove method form OnBackInvokedDispatcher interface (but not the
implementation)
- Add test for ag/17211289
Bug: 222675481
Test: BackNavigationControllerTests#testUnregisterCallbacksWithSystemCallback
Change-Id: I6a3ae30da7e29dddda116acd8fa0c9af4b9faa6e
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We are not gating the new back dispatch by targetSdkVersion in T. The new dispatch is controlled by the enableOnBackInvokedCallback app
manifest flag (which defaults to false).
Test: m -j update-api
Bug: 195946584
Change-Id: Iab59051ec5b6336ca4d42cc47015fe86a3f37942
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
ViewRootImpl was removing the callback from the server after the
windowState was removed, which was consistently failing resulting in an
exception in the log.
Now the removal is done before the ViewRootImpl's window removal
Test: Manually check that the error is not appearing in the log
Bug: 226089354
Change-Id: Ie9cb9940791b16d6ae1b243079794583c87b1a5c
|
| |
|
|
|
|
|
|
| |
Move the callback as the last paramter to registerOnBackInvokedCallback
Test: Existing
Bug: 224562951
Change-Id: I8608a03b53baa04bedee81d2e86b2339abd6c594
|
| |
|
|
|
|
|
|
|
| |
This reverts commit ad89a821450e9a61bd85225fbcf921f8ca51e94b.
Reason for revert: b/222170518 was unrelated to gesture back, and is now fixed.
Test: m -j. Test back behavior throughout system.
Change-Id: Ia27c7ea97416831355e1949ec6874de570b52108
|
| |
|
|
|
|
|
|
|
|
|
| |
OnBackInvokedCallbackWrapper instances are sent to the WindowState over
AIDL. This leads to Activity leak issues even if the reference is
cleared in the remote side. This change makes the held reference weak
So it is not retained.
Test: verified leak no longer present through hprof
Bug: 221285764
Change-Id: I1c529d27769e2426898776e47f37bdb7abe1f681
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Originally, View was implementing onBackInvokedDisptacherOwner, but now
only Activity and Dialog and since back event are related to the
window, it makes sense to move them into the android.window package
This follow up comment at:
ag/c/platform/frameworks/base/+/16764116/comments/e131f3ef_e3e1d2e0
Test: atest BackNavigationTests
Bug: 221401221
Change-Id: Ia2f26162beb6a41b6e162b31e599e882f8bf7320
|
| |/
|
|
|
|
|
| |
Test: m -j. Test back in apps that opt-in, opt-out & sysUI
Bug: 222170518
Change-Id: I97ae7769ff2e04eb7fb39c49e025b255cdba057f
|
| |
|
|
|
|
|
|
|
|
|
| |
- The callback was not removed on the server in the clear() method since mWindow and
mWindowSession fields were cleared before
- The wrapper class was not static, risking to leak it's outer class
and its field.
Test: com.android.launcher3.ui.widget.RequestPinItemTest#testPinWidgetWithConfig
Fixes: 220385755
Change-Id: I3e5a81bf48c2272b1cb2b5a9f2ba940d0f794a6f
|
| |
|
|
|
|
|
|
|
|
| |
Add a manifest flag for applications to opt-out of the new back
navigation system.
Test: atest
CtsWindowManagerDeviceTestCases: android.server.wm.BackNavigationLegacyTest
Bug: 217709328
Change-Id: I43d09a37b126e59bdb8f20bb83cf6d99e53a1e91
|
| |
|
|
|
|
|
|
|
| |
Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest .../BackNavigationControllerTests.java
Test: atest .../BackAnimationControllerTest.java
Bug: b/195946584
Change-Id: I00cf7ab5b57760d57d30ac74dc5b3443a4203f38
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Bug: b/210539672, b/195946584
Test: m -j
Change-Id: I0264d0995aed8a73563bece0d15d2a9aac0ebf06
|
| |/
|
|
|
|
|
|
|
|
|
| |
- Remove mTopCallback field
- Cleanup compat and default callbacks
- Remove the callback held by WindowState when the window is removed.
Bug: 218328707
Test: atest packages/apps/Launcher3/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
Test: atest frameworks/base/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
Change-Id: I38fd760a617500c874aef10bc8de165880837008
|
| |
|
|
|
|
|
|
|
|
|
| |
For pre-T apps, the default back callback dispatches KEYCODE_BACK to the
application's root view.
For T+ apps, the default KEYCODE_BACK listener invokes the registered
OnBackInvokedCallback.
Test: m -j
Bug: 195946584
Change-Id: I62342b249e6cd6f8b036f7e950cc3f9754418ee4
|
| |
|
|
|
|
|
| |
Bug:209867448
Test: mp core services sysuig. atest FrameworksCoreTests:WindowOnBackInvokedDispatcherTest
Change-Id: Ib74250e93926854f07ebba6b9f680040aa98f9a4
|
|
|
Test: mp core sysuig services
Bug: 195946584
Change-Id: Ia882ec621154ea1daa780c8976b900e4c8f44a7d
|