Merge "Clear command queue of OverviewCommandHelper on home tap" into sc-dev
This commit is contained in:
commit
dec3330a83
|
@ -58,6 +58,7 @@ import com.android.launcher3.uioverrides.RecentsViewStateController;
|
||||||
import com.android.launcher3.util.ActivityOptionsWrapper;
|
import com.android.launcher3.util.ActivityOptionsWrapper;
|
||||||
import com.android.launcher3.util.ObjectWrapper;
|
import com.android.launcher3.util.ObjectWrapper;
|
||||||
import com.android.launcher3.util.UiThreadHelper;
|
import com.android.launcher3.util.UiThreadHelper;
|
||||||
|
import com.android.quickstep.OverviewCommandHelper;
|
||||||
import com.android.quickstep.RecentsModel;
|
import com.android.quickstep.RecentsModel;
|
||||||
import com.android.quickstep.SysUINavigationMode;
|
import com.android.quickstep.SysUINavigationMode;
|
||||||
import com.android.quickstep.SysUINavigationMode.Mode;
|
import com.android.quickstep.SysUINavigationMode.Mode;
|
||||||
|
@ -98,12 +99,15 @@ public abstract class BaseQuickstepLauncher extends Launcher
|
||||||
private OverviewActionsView mActionsView;
|
private OverviewActionsView mActionsView;
|
||||||
|
|
||||||
private @Nullable TaskbarManager mTaskbarManager;
|
private @Nullable TaskbarManager mTaskbarManager;
|
||||||
|
private @Nullable OverviewCommandHelper mOverviewCommandHelper;
|
||||||
private @Nullable LauncherTaskbarUIController mTaskbarUIController;
|
private @Nullable LauncherTaskbarUIController mTaskbarUIController;
|
||||||
private final ServiceConnection mTisBinderConnection = new ServiceConnection() {
|
private final ServiceConnection mTisBinderConnection = new ServiceConnection() {
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
mTaskbarManager = ((TISBinder) iBinder).getTaskbarManager();
|
mTaskbarManager = ((TISBinder) iBinder).getTaskbarManager();
|
||||||
mTaskbarManager.setLauncher(BaseQuickstepLauncher.this);
|
mTaskbarManager.setLauncher(BaseQuickstepLauncher.this);
|
||||||
|
|
||||||
|
mOverviewCommandHelper = ((TISBinder) iBinder).getOverviewCommandHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -136,6 +140,15 @@ public abstract class BaseQuickstepLauncher extends Launcher
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onNewIntent(Intent intent) {
|
||||||
|
super.onNewIntent(intent);
|
||||||
|
|
||||||
|
if (mOverviewCommandHelper != null) {
|
||||||
|
mOverviewCommandHelper.clearPendingCommands();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public QuickstepTransitionManager getAppTransitionManager() {
|
public QuickstepTransitionManager getAppTransitionManager() {
|
||||||
return mAppTransitionManager;
|
return mAppTransitionManager;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,11 @@ public class OverviewCommandHelper {
|
||||||
MAIN_EXECUTOR.execute(() -> addCommand(cmd));
|
MAIN_EXECUTOR.execute(() -> addCommand(cmd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@UiThread
|
||||||
|
public void clearPendingCommands() {
|
||||||
|
mPendingCommands.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private TaskView getNextTask(RecentsView view) {
|
private TaskView getNextTask(RecentsView view) {
|
||||||
final TaskView runningTaskView = view.getRunningTaskView();
|
final TaskView runningTaskView = view.getRunningTaskView();
|
||||||
|
|
||||||
|
|
|
@ -277,6 +277,10 @@ public class TouchInteractionService extends Service implements PluginListener<O
|
||||||
public TaskbarManager getTaskbarManager() {
|
public TaskbarManager getTaskbarManager() {
|
||||||
return mTaskbarManager;
|
return mTaskbarManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OverviewCommandHelper getOverviewCommandHelper() {
|
||||||
|
return mOverviewCommandHelper;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean sConnected = false;
|
private static boolean sConnected = false;
|
||||||
|
|
Loading…
Reference in New Issue