diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-12-14 15:13:00 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-12-15 08:05:09 -0800 |
commit | f5440cbd6c0525769d24b890e16313a728831e04 (patch) | |
tree | 5af627139853df45b24c890fb91bef558ebe2aa1 /src/com/android/launcher3/CellLayout.java | |
parent | e96798e885e3ac97b6de0a1c598eb09cf62349af (diff) | |
download | packages_apps_Trebuchet-f5440cbd6c0525769d24b890e16313a728831e04.tar.gz packages_apps_Trebuchet-f5440cbd6c0525769d24b890e16313a728831e04.tar.bz2 packages_apps_Trebuchet-f5440cbd6c0525769d24b890e16313a728831e04.zip |
Removing FeatureFlag.LAUNCHER3_LEGACY_WORKSPACE_DND and corresponding logic
Change-Id: Ie10c087b4f72ee27be5bf12e2c81be5b7a3a6176
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 2eed26492..aef94c1eb 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -33,7 +33,6 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.graphics.drawable.TransitionDrawable; import android.os.Build; import android.os.Parcelable; import android.support.annotation.IntDef; @@ -53,7 +52,6 @@ import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate; import com.android.launcher3.accessibility.FolderAccessibilityHelper; import com.android.launcher3.accessibility.WorkspaceAccessibilityHelper; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.config.ProviderConfig; import com.android.launcher3.folder.FolderIcon; import com.android.launcher3.graphics.DragPreviewProvider; @@ -112,9 +110,9 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { private float mBackgroundAlpha; - private static final int BACKGROUND_ACTIVATE_DURATION = - FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? 120 : 0; - private final TransitionDrawable mBackground; + private static final int[] BACKGROUND_STATE_ACTIVE = new int[] { android.R.attr.state_active }; + private static final int[] BACKGROUND_STATE_DEFAULT = new int[0]; + private final Drawable mBackground; // These values allow a fixed measurement to be set on the CellLayout. private int mFixedWidth = -1; @@ -227,9 +225,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { setAlwaysDrawnWithCacheEnabled(false); final Resources res = getResources(); - mBackground = (TransitionDrawable) res.getDrawable( - FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? R.drawable.bg_screenpanel - : R.drawable.bg_celllayout); + mBackground = res.getDrawable(R.drawable.bg_celllayout); mBackground.setCallback(this); mBackground.setAlpha((int) (mBackgroundAlpha * 255)); @@ -424,15 +420,8 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { void setIsDragOverlapping(boolean isDragOverlapping) { if (mIsDragOverlapping != isDragOverlapping) { mIsDragOverlapping = isDragOverlapping; - if (mIsDragOverlapping) { - mBackground.startTransition(BACKGROUND_ACTIVATE_DURATION); - } else { - if (mBackgroundAlpha > 0f) { - mBackground.reverseTransition(BACKGROUND_ACTIVATE_DURATION); - } else { - mBackground.resetTransition(); - } - } + mBackground.setState(mIsDragOverlapping + ? BACKGROUND_STATE_ACTIVE : BACKGROUND_STATE_DEFAULT); invalidate(); } } |