Log back key events from Overview in live tile mode.

Change-Id: If633df84fc46f8b2c80785f983ac5b77a5553747
Fixes: 127837913
Test: N/A
This commit is contained in:
Tracy Zhou 2019-03-12 11:37:10 -07:00
parent e50274d15a
commit e8edaff41a
1 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,7 @@ package com.android.launcher3.uioverrides;
import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;
import android.graphics.Rect;
@ -30,8 +31,8 @@ import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.Workspace;
import com.android.launcher3.allapps.DiscoveryBounce;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
@ -139,6 +140,8 @@ public class OverviewState extends LauncherState {
public void onBackPressed(Launcher launcher) {
TaskView taskView = launcher.<RecentsView>getOverviewPanel().getRunningTaskView();
if (taskView != null) {
launcher.getUserEventDispatcher().logActionCommand(Action.Command.BACK,
newContainerTarget(ContainerType.OVERVIEW));
taskView.launchTask(true);
} else {
super.onBackPressed(launcher);