Fade in background scrim when resuming from screen off.

This change hides the hard cut off that appears when the Launcher
window is transitioning upwards when resuming from when the screen
is off.

Bug: 36446766

Change-Id: I0c0fe13ee9e08d27b94916d0407ef431d82b8d6a
This commit is contained in:
Jon Miranda
2017-05-04 11:47:53 -07:00
parent e37d2b9f32
commit 2d89ea8453
3 changed files with 38 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.R;
/**
@@ -119,7 +120,8 @@ public class AllAppsBackgroundDrawable extends Drawable {
int finalAlphaI = (int) (finalAlpha * 255f);
if (getAlpha() != finalAlphaI) {
mBackgroundAnim = cancelAnimator(mBackgroundAnim);
mBackgroundAnim = ObjectAnimator.ofInt(this, "alpha", finalAlphaI);
mBackgroundAnim = ObjectAnimator.ofInt(this, LauncherAnimUtils.DRAWABLE_ALPHA,
finalAlphaI);
mBackgroundAnim.setDuration(duration);
mBackgroundAnim.start();
}