Revert "Fix Task Icon menu behavior."
This reverts commit 6df0148b07
.
Reason for revert: breaks the task icon behavior.
Change-Id: I6f654478e0ffe7827efeca1553622dad2e02c5da
This commit is contained in:
parent
8984fea211
commit
23986e9a84
|
@ -607,10 +607,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isCenterPageTask() {
|
||||
return getScrollX() == getScrollForPage(getPageNearestToCenterOfScreen());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPageBeginTransition() {
|
||||
super.onPageBeginTransition();
|
||||
|
@ -620,7 +616,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
|||
@Override
|
||||
protected void onPageEndTransition() {
|
||||
super.onPageEndTransition();
|
||||
if (isCenterPageTask()) {
|
||||
if (getScrollX() == getScrollForPage(getPageNearestToCenterOfScreen())) {
|
||||
LayoutUtils.setViewEnabled(mActionsView, true);
|
||||
}
|
||||
if (getNextPage() > 0) {
|
||||
|
|
|
@ -425,16 +425,13 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
|||
}
|
||||
|
||||
private boolean showTaskMenu(int action) {
|
||||
if (!getRecentsView().isCenterPageTask()) {
|
||||
getRecentsView().snapToPage(getRecentsView().indexOfChild(this));
|
||||
} else {
|
||||
mMenuView = TaskMenuView.showForTask(this);
|
||||
mActivity.getStatsLogManager().log(LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS, buildProto());
|
||||
UserEventDispatcher.newInstance(getContext()).logActionOnItem(action, Direction.NONE,
|
||||
LauncherLogProto.ItemType.TASK_ICON);
|
||||
if (mMenuView != null) {
|
||||
mMenuView.addOnAttachStateChangeListener(mTaskMenuStateListener);
|
||||
}
|
||||
getRecentsView().snapToPage(getRecentsView().indexOfChild(this));
|
||||
mMenuView = TaskMenuView.showForTask(this);
|
||||
mActivity.getStatsLogManager().log(LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS, buildProto());
|
||||
UserEventDispatcher.newInstance(getContext()).logActionOnItem(action, Direction.NONE,
|
||||
LauncherLogProto.ItemType.TASK_ICON);
|
||||
if (mMenuView != null) {
|
||||
mMenuView.addOnAttachStateChangeListener(mTaskMenuStateListener);
|
||||
}
|
||||
return mMenuView != null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue