Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d47683a authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Only set the task description if the colors are opaque.

Bug: 27214638
Change-Id: I75e0b8871087f0b8e6acd16dc751bb6374c0f968
parent 7998e48c
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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();
                if (Color.alpha(colorPrimary) == 0xFF) {
                    td.setPrimaryColor(colorPrimary);
                }
                if (Color.alpha(colorBg) == 0xFF) {
                    td.setBackgroundColor(colorBg);
                }
                setTaskDescription(td);
            }
        }