mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Fix HOME/RECENTS/BACK duplicated, missing logging" into ub-launcher3-qt-dev
am: f46e3956dd
Change-Id: Ibbd4425e7dd972cd5c54e93ad52162ed8c68831b
This commit is contained in:
@@ -1353,19 +1353,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
|
||||
if (isActionMain) {
|
||||
if (!internalStateHandled) {
|
||||
// Note: There should be at most one log per method call. This is enforced
|
||||
// implicitly by using if-else statements.
|
||||
UserEventDispatcher ued = getUserEventDispatcher();
|
||||
AbstractFloatingView topOpenView = AbstractFloatingView.getTopOpenView(this);
|
||||
if (topOpenView != null) {
|
||||
topOpenView.logActionCommand(Action.Command.HOME_INTENT);
|
||||
} else if (alreadyOnHome) {
|
||||
Target target = newContainerTarget(mStateManager.getState().containerType);
|
||||
target.pageIndex = mWorkspace.getCurrentPage();
|
||||
ued.logActionCommand(Action.Command.HOME_INTENT, target,
|
||||
newContainerTarget(ContainerType.WORKSPACE));
|
||||
}
|
||||
|
||||
// In all these cases, only animate if we're already on home
|
||||
AbstractFloatingView.closeAllOpenViews(this, isStarted());
|
||||
|
||||
@@ -1385,6 +1372,13 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
}
|
||||
}
|
||||
|
||||
// Handle HOME_INTENT
|
||||
UserEventDispatcher ued = getUserEventDispatcher();
|
||||
Target target = newContainerTarget(mStateManager.getState().containerType);
|
||||
target.pageIndex = mWorkspace.getCurrentPage();
|
||||
ued.logActionCommand(Action.Command.HOME_INTENT, target,
|
||||
newContainerTarget(ContainerType.WORKSPACE));
|
||||
|
||||
final View v = getWindow().peekDecorView();
|
||||
if (v != null && v.getWindowToken() != null) {
|
||||
UiThreadHelper.hideKeyboardAsync(this, v.getWindowToken());
|
||||
|
||||
@@ -268,8 +268,6 @@ public class LauncherState {
|
||||
if (this != NORMAL) {
|
||||
LauncherStateManager lsm = launcher.getStateManager();
|
||||
LauncherState lastState = lsm.getLastState();
|
||||
launcher.getUserEventDispatcher().logActionCommand(Action.Command.BACK,
|
||||
containerType, lastState.containerType);
|
||||
lsm.goToState(lastState);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user