Temporarily revert changes from ag/10899350

Change-Id: I6608f252fd779b23e84348e52c247a8e2fa9ec7a
This commit is contained in:
Winson Chung committed 2020-04-08 13:43:29 -07:00
1 parent 5a69742d20
commit 5e2cd32ac3
1 file changed
+13 -5
@@ -496,7 +496,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
GestureState gestureState = new GestureState(mOverviewComponentObserver, GestureState gestureState = new GestureState(mOverviewComponentObserver,
ActiveGestureLog.INSTANCE.generateAndSetLogId()); ActiveGestureLog.INSTANCE.generateAndSetLogId());
gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.0", gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.0",
() -> mAM.getRunningTask(true /* filterOnlyVisibleRecents */))); () -> mAM.getRunningTask(false /* filterOnlyVisibleRecents */)));
return gestureState; return gestureState;
} }
@@ -596,10 +596,18 @@ public class TouchInteractionService extends Service implements PluginListener<O
return createDeviceLockedInputConsumer(gestureState); return createDeviceLockedInputConsumer(gestureState);
} }
RunningTaskInfo runningTask = gestureState.getRunningTask(); boolean forceOverviewInputConsumer = false;
ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent(); if (AssistantUtilities.isExcludedAssistant(gestureState.getRunningTask())) {
boolean forceOverviewInputConsumer = runningTask != null // In the case where we are in the excluded assistant state, ignore it and treat the
&& runningTask.baseIntent.getComponent().equals(homeComponent); // running activity as the task behind the assistant
gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.assistant",
() -> mAM.getRunningTask(true /* filterOnlyVisibleRecents */)));
ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent();
ComponentName runningComponent =
gestureState.getRunningTask().baseIntent.getComponent();
forceOverviewInputConsumer =
runningComponent != null && runningComponent.equals(homeComponent);
}
if (previousGestureState.getFinishingRecentsAnimationTaskId() > 0) { if (previousGestureState.getFinishingRecentsAnimationTaskId() > 0) {
// If the finish animation was interrupted, then continue using the other activity input // If the finish animation was interrupted, then continue using the other activity input