Loading quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +17 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ import static android.view.MotionEvent.ACTION_UP; import static android.view.MotionEvent.INVALID_POINTER_ID; import static com.android.quickstep.RemoteRunnable.executeSafely; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_HOME; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_NONE; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; Loading Loading @@ -52,6 +55,7 @@ import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.AssistDataReceiver; import com.android.systemui.shared.system.BackgroundExecutor; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RecentsAnimationListener; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; Loading Loading @@ -83,6 +87,7 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC private BaseSwipeInteractionHandler mInteractionHandler; private int mDisplayRotation; private Rect mStableInsets = new Rect(); private @HitTarget int mDownHitTarget = HIT_TARGET_NONE; private VelocityTracker mVelocityTracker; Loading @@ -98,6 +103,11 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC mMainThreadExecutor = mainThreadExecutor; } @Override public void setDownHitTarget(@HitTarget int downHitTarget) { mDownHitTarget = downHitTarget; } @Override public void accept(MotionEvent ev) { if (mVelocityTracker == null) { Loading @@ -112,8 +122,9 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC mTouchSlop = ViewConfiguration.get(this).getScaledTouchSlop(); mTouchThresholdCrossed = false; // Start the window animation on down to give more time for launcher to draw if (!isUsingScreenShot()) { // Start the window animation on down to give more time for launcher to draw if the // user didn't start the gesture over the back button if (mDownHitTarget != HIT_TARGET_BACK && !isUsingScreenShot()) { startTouchTrackingForWindowAnimation(); } Loading Loading @@ -155,6 +166,10 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC if (isUsingScreenShot()) { startTouchTrackingForScreenshotAnimation(); } else if (mDownHitTarget == HIT_TARGET_BACK) { // If the window animation was deferred on DOWN due to it starting over // the back button, then start it now startTouchTrackingForWindowAnimation(); } notifyGestureStarted(); Loading quickstep/src/com/android/quickstep/TouchConsumer.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.os.Build; import android.support.annotation.IntDef; import android.view.MotionEvent; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.function.Consumer; Loading Loading @@ -50,6 +52,8 @@ public interface TouchConsumer extends Consumer<MotionEvent> { return false; } default void setDownHitTarget(@HitTarget int downHitTarget) { } default void updateTouchTracking(@InteractionType int interactionType) { } default void onQuickScrubEnd() { } Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +24 −15 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.Build; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.Choreographer; import android.view.MotionEvent; Loading @@ -52,6 +53,7 @@ import com.android.launcher3.model.ModelPreload; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; /** * Service connected by system-UI for handling touch interaction. Loading @@ -70,6 +72,11 @@ public class TouchInteractionService extends Service { private final IBinder mMyBinder = new IOverviewProxy.Stub() { @Override public void onPreMotionEvent(@HitTarget int downHitTarget) throws RemoteException { onBinderPreMotionEvent(downHitTarget); } @Override public void onMotionEvent(MotionEvent ev) { onBinderMotionEvent(ev); Loading Loading @@ -166,8 +173,7 @@ public class TouchInteractionService extends Service { return mMyBinder; } private void onBinderMotionEvent(MotionEvent ev) { if (ev.getActionMasked() == ACTION_DOWN) { private void onBinderPreMotionEvent(@HitTarget int downHitTarget) { mRunningTask = mAM.getRunningTask(); mCurrentConsumer.reset(); Loading @@ -179,10 +185,13 @@ public class TouchInteractionService extends Service { mCurrentConsumer = getOtherActivityConsumer(); } mCurrentConsumer.setDownHitTarget(downHitTarget); mEventQueue.setConsumer(mCurrentConsumer); mEventQueue.setInterimChoreographer(mCurrentConsumer.shouldUseBackgroundConsumer() ? mBackgroundThreadChoreographer : null); } private void onBinderMotionEvent(MotionEvent ev) { mCurrentConsumer.preProcessMotionEvent(ev); mEventQueue.queue(ev); } Loading Loading
quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +17 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ import static android.view.MotionEvent.ACTION_UP; import static android.view.MotionEvent.INVALID_POINTER_ID; import static com.android.quickstep.RemoteRunnable.executeSafely; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_HOME; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_NONE; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; Loading Loading @@ -52,6 +55,7 @@ import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.AssistDataReceiver; import com.android.systemui.shared.system.BackgroundExecutor; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RecentsAnimationListener; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; Loading Loading @@ -83,6 +87,7 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC private BaseSwipeInteractionHandler mInteractionHandler; private int mDisplayRotation; private Rect mStableInsets = new Rect(); private @HitTarget int mDownHitTarget = HIT_TARGET_NONE; private VelocityTracker mVelocityTracker; Loading @@ -98,6 +103,11 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC mMainThreadExecutor = mainThreadExecutor; } @Override public void setDownHitTarget(@HitTarget int downHitTarget) { mDownHitTarget = downHitTarget; } @Override public void accept(MotionEvent ev) { if (mVelocityTracker == null) { Loading @@ -112,8 +122,9 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC mTouchSlop = ViewConfiguration.get(this).getScaledTouchSlop(); mTouchThresholdCrossed = false; // Start the window animation on down to give more time for launcher to draw if (!isUsingScreenShot()) { // Start the window animation on down to give more time for launcher to draw if the // user didn't start the gesture over the back button if (mDownHitTarget != HIT_TARGET_BACK && !isUsingScreenShot()) { startTouchTrackingForWindowAnimation(); } Loading Loading @@ -155,6 +166,10 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC if (isUsingScreenShot()) { startTouchTrackingForScreenshotAnimation(); } else if (mDownHitTarget == HIT_TARGET_BACK) { // If the window animation was deferred on DOWN due to it starting over // the back button, then start it now startTouchTrackingForWindowAnimation(); } notifyGestureStarted(); Loading
quickstep/src/com/android/quickstep/TouchConsumer.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.os.Build; import android.support.annotation.IntDef; import android.view.MotionEvent; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.function.Consumer; Loading Loading @@ -50,6 +52,8 @@ public interface TouchConsumer extends Consumer<MotionEvent> { return false; } default void setDownHitTarget(@HitTarget int downHitTarget) { } default void updateTouchTracking(@InteractionType int interactionType) { } default void onQuickScrubEnd() { } Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +24 −15 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.Build; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.Choreographer; import android.view.MotionEvent; Loading @@ -52,6 +53,7 @@ import com.android.launcher3.model.ModelPreload; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.NavigationBarCompat.HitTarget; /** * Service connected by system-UI for handling touch interaction. Loading @@ -70,6 +72,11 @@ public class TouchInteractionService extends Service { private final IBinder mMyBinder = new IOverviewProxy.Stub() { @Override public void onPreMotionEvent(@HitTarget int downHitTarget) throws RemoteException { onBinderPreMotionEvent(downHitTarget); } @Override public void onMotionEvent(MotionEvent ev) { onBinderMotionEvent(ev); Loading Loading @@ -166,8 +173,7 @@ public class TouchInteractionService extends Service { return mMyBinder; } private void onBinderMotionEvent(MotionEvent ev) { if (ev.getActionMasked() == ACTION_DOWN) { private void onBinderPreMotionEvent(@HitTarget int downHitTarget) { mRunningTask = mAM.getRunningTask(); mCurrentConsumer.reset(); Loading @@ -179,10 +185,13 @@ public class TouchInteractionService extends Service { mCurrentConsumer = getOtherActivityConsumer(); } mCurrentConsumer.setDownHitTarget(downHitTarget); mEventQueue.setConsumer(mCurrentConsumer); mEventQueue.setInterimChoreographer(mCurrentConsumer.shouldUseBackgroundConsumer() ? mBackgroundThreadChoreographer : null); } private void onBinderMotionEvent(MotionEvent ev) { mCurrentConsumer.preProcessMotionEvent(ev); mEventQueue.queue(ev); } Loading