}
}
+ /**
+ * Called when the user stops interacting with the launcher.
+ * This implies that the user is now on the homescreen and is not doing housekeeping.
+ */
+ protected void onInteractionEnd() {}
+
+ /**
+ * Called when the user starts interacting with the launcher.
+ * The possible interactions are:
+ * - open all apps
+ * - reorder an app shortcut, or a widget
+ * - open the overview mode.
+ * This is a good time to stop doing things that only make sense
+ * when the user is on the homescreen and not doing housekeeping.
+ */
+ protected void onInteractionBegin() {}
+
void startApplicationDetailsActivity(ComponentName componentName) {
String packageName = componentName.getPackageName();
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
onWorkspaceShown(animated);
+ onInteractionEnd();
}
public void onWorkspaceShown(boolean animated) {
// Change the state *after* we've called all the transition code
mState = State.APPS_CUSTOMIZE;
+ onInteractionBegin();
// Pause the auto-advance of widgets until we are out of AllApps
mUserPresent = false;
mIsDragOccuring = true;
updateChildrenLayersEnabled(false);
mLauncher.lockScreenOrientation();
+ mLauncher.onInteractionBegin();
setChildrenBackgroundAlphaMultipliers(1f);
// Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
InstallShortcutReceiver.enableInstallQueue();
removeExtraEmptyScreen();
mDragSourceInternal = null;
+ mLauncher.onInteractionEnd();
}
/**
}
public void enterOverviewMode() {
+ mLauncher.onInteractionBegin();
enableOverviewMode(true, -1, true);
}
public void exitOverviewMode(boolean animated) {
exitOverviewMode(-1, animated);
+ mLauncher.onInteractionEnd();
}
public void exitOverviewMode(int snapPage, boolean animated) {
enableOverviewMode(false, snapPage, animated);
+ mLauncher.onInteractionEnd();
}
private void enableOverviewMode(boolean enable, int snapPage, boolean animated) {