Launcher state management cleanup

> Removing Widgets and related states
> Fixing different durations being used when opening/closing all-apps
> Removing some unnecessary object allocations when changing state without animation
> Differentiating widget bootm sheel and full sheet in logs

Bug: 67678570
Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
This commit is contained in:
Sunny Goyal
2017-10-16 11:46:41 -07:00
parent 1797af41d1
commit aeb1643ec6
24 changed files with 520 additions and 636 deletions

View File

@@ -15,6 +15,8 @@
*/
package com.android.launcher3.widget;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -32,7 +34,6 @@ import android.view.animation.DecelerateInterpolator;
import android.widget.Toast;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeleteDropTarget;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.ItemInfo;
@@ -41,7 +42,6 @@ import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.graphics.GradientView;
import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
@@ -264,11 +264,16 @@ abstract class BaseWidgetSheet extends AbstractFloatingView
@Override
public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
targetParent.containerType = ContainerType.WIDGETS;
targetParent.cardinality = getElementsRowCount();
}
@Override
public final void logActionCommand(int command) {
// TODO: be more specific
mLauncher.getUserEventDispatcher().logActionCommand(command, ContainerType.WIDGETS);
Target target = newContainerTarget(ContainerType.WIDGETS);
target.cardinality = getElementsRowCount();
mLauncher.getUserEventDispatcher().logActionCommand(command, target);
}
protected abstract int getElementsRowCount();
}