Only set the task description if the colors are opaque.

am: 2d47683ab9

* commit '2d47683ab969a1da30209e44712ce6513e324b89':
  Only set the task description if the colors are opaque.
This commit is contained in:
Winson
2016-02-18 00:18:06 +00:00
committed by android-build-merger

View File

@@ -49,6 +49,7 @@ import android.content.res.TypedArray;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
@@ -3988,8 +3989,12 @@ public class Activity extends ContextThemeWrapper
a.recycle();
if (colorPrimary != 0) {
ActivityManager.TaskDescription td = new ActivityManager.TaskDescription();
td.setPrimaryColor(colorPrimary);
td.setBackgroundColor(colorBg);
if (Color.alpha(colorPrimary) == 0xFF) {
td.setPrimaryColor(colorPrimary);
}
if (Color.alpha(colorBg) == 0xFF) {
td.setBackgroundColor(colorBg);
}
setTaskDescription(td);
}
}