Merge "Do not consume motion events when there is no assistant available" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2019-03-06 20:17:07 +00:00 committed by Android (Google) Code Review
commit f520c6ca8e
3 changed files with 12 additions and 1 deletions

View File

@ -77,6 +77,11 @@ public class TouchInteractionService extends Service {
mOverviewCommandHelper.onTip(actionType, viewType);
}
@Override
public void onAssistantAvailable(boolean available) {
// TODO handle assistant
}
/** Deprecated methods **/
public void onQuickStep(MotionEvent motionEvent) { }

Binary file not shown.

View File

@ -121,6 +121,11 @@ public class TouchInteractionService extends Service {
mOverviewCommandHelper.onTip(actionType, viewType);
}
@Override
public void onAssistantAvailable(boolean available) {
mAssistantAvailable = available;
}
/** Deprecated methods **/
public void onQuickStep(MotionEvent motionEvent) { }
@ -174,6 +179,7 @@ public class TouchInteractionService extends Service {
private TaskOverlayFactory mTaskOverlayFactory;
private InputConsumerController mInputConsumer;
private SwipeSharedState mSwipeSharedState;
private boolean mAssistantAvailable;
private boolean mIsUserUnlocked;
private List<Runnable> mOnUserUnlockedCallbacks;
@ -308,7 +314,7 @@ public class TouchInteractionService extends Service {
if (runningTaskInfo == null && !mSwipeSharedState.goingToLauncher) {
return InputConsumer.NO_OP;
} else if (mOverviewInteractionState.isSwipeUpGestureEnabled()
} else if (mAssistantAvailable && mOverviewInteractionState.isSwipeUpGestureEnabled()
&& FeatureFlags.ENABLE_ASSISTANT_GESTURE.get()
&& AssistantTouchConsumer.withinTouchRegion(this, event.getX())) {
return new AssistantTouchConsumer(this, mRecentsModel.getSystemUiProxy());