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

Commit 07801468 authored by Winson's avatar Winson Committed by android-build-merger
Browse files

Only set the task description if the colors are opaque.

am: 2d47683a

* commit '2d47683a':
  Only set the task description if the colors are opaque.
parents 9d37268b 2d47683a
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);
            }
        }