Merge "Postponing CUJ_QUICK_SWITCH and CUJ_APP_CLOSE_TO_HOME" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a5a61dddfd
@@ -745,10 +745,25 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
TaskUtils.closeSystemWindowsAsync(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
|
TaskUtils.closeSystemWindowsAsync(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
|
||||||
|
|
||||||
if (mRecentsView != null) {
|
if (mRecentsView != null) {
|
||||||
InteractionJankMonitorWrapper.begin(mRecentsView,
|
mRecentsView.getViewTreeObserver().addOnDrawListener(new OnDrawListener() {
|
||||||
InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */);
|
boolean mHandled = false;
|
||||||
InteractionJankMonitorWrapper.begin(mRecentsView,
|
|
||||||
InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
|
@Override
|
||||||
|
public void onDraw() {
|
||||||
|
if (mHandled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mHandled = true;
|
||||||
|
|
||||||
|
InteractionJankMonitorWrapper.begin(mRecentsView,
|
||||||
|
InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */);
|
||||||
|
InteractionJankMonitorWrapper.begin(mRecentsView,
|
||||||
|
InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
|
||||||
|
|
||||||
|
mRecentsView.post(() ->
|
||||||
|
mRecentsView.getViewTreeObserver().removeOnDrawListener(this));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
notifyGestureStartedAsync();
|
notifyGestureStartedAsync();
|
||||||
setIsLikelyToStartNewTask(isLikelyToStartNewTask, false /* animate */);
|
setIsLikelyToStartNewTask(isLikelyToStartNewTask, false /* animate */);
|
||||||
|
|||||||
Reference in New Issue
Block a user