Removing some unused functionalities
> Removing obsolete progrard rules
> Removing BackgroundAlphaMultiplier from CellLayout, which is always 1
> Removign otiline animation from workspace. This animation never runs,
as it is called during startReordeing which always happens when
overview mode (workspaceInModalState() is true)
Change-Id: I43219e41ea188771bc818988c1bcbd523f28cba6
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 57db805..48ddfe6 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -103,8 +103,6 @@
private float FOREGROUND_ALPHA_DAMPER = 0.65f;
private int mForegroundAlpha = 0;
private float mBackgroundAlpha;
- private float mBackgroundAlphaMultiplier = 1.0f;
- private boolean mDrawBackground = true;
private Drawable mNormalBackground;
private Drawable mActiveGlowBackground;
@@ -423,10 +421,6 @@
}
}
- void disableBackground() {
- mDrawBackground = false;
- }
-
void disableDragTarget() {
mIsDragTarget = false;
}
@@ -448,12 +442,16 @@
@Override
protected void onDraw(Canvas canvas) {
+ if (!mIsDragTarget) {
+ return;
+ }
+
// When we're large, we are either drawn in a "hover" state (ie when dragging an item to
// a neighboring page) or with just a normal background (if backgroundAlpha > 0.0f)
// When we're small, we are either drawn normally or in the "accepts drops" state (during
// a drag). However, we also drag the mini hover background *over* one of those two
// backgrounds
- if (mDrawBackground && mBackgroundAlpha > 0.0f) {
+ if (mBackgroundAlpha > 0.0f) {
Drawable bg;
if (mIsDragOverlapping) {
@@ -463,7 +461,7 @@
bg = mNormalBackground;
}
- bg.setAlpha((int) (mBackgroundAlpha * mBackgroundAlphaMultiplier * 255));
+ bg.setAlpha((int) (mBackgroundAlpha * 255));
bg.setBounds(mBackgroundRect);
bg.draw(canvas);
}
@@ -951,17 +949,6 @@
return mBackgroundAlpha;
}
- public void setBackgroundAlphaMultiplier(float multiplier) {
- if (mBackgroundAlphaMultiplier != multiplier) {
- mBackgroundAlphaMultiplier = multiplier;
- invalidate();
- }
- }
-
- public float getBackgroundAlphaMultiplier() {
- return mBackgroundAlphaMultiplier;
- }
-
public void setBackgroundAlpha(float alpha) {
if (mBackgroundAlpha != alpha) {
mBackgroundAlpha = alpha;