Debug: task description

This commit is contained in:
M66B
2024-03-06 12:58:26 +01:00
parent a9da966035
commit 8d1c2875fa
4 changed files with 35 additions and 7 deletions

View File

@@ -166,11 +166,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
d.setTint(Color.WHITE);
d.draw(canvas);
int colorPrimary = colorPrimaryDark;
if (colorPrimary != 0 && Color.alpha(colorPrimary) != 255) {
Log.w("Task color primary=" + Integer.toHexString(colorPrimary));
colorPrimary = ColorUtils.setAlphaComponent(colorPrimary, 255);
}
boolean task_description = prefs.getBoolean("task_description", true);
int colorPrimary;
if (task_description) {
colorPrimary = colorPrimaryDark;
if (colorPrimary != 0 && Color.alpha(colorPrimary) != 255) {
Log.w("Task color primary=" + Integer.toHexString(colorPrimary));
colorPrimary = ColorUtils.setAlphaComponent(colorPrimary, 255);
}
} else
colorPrimary = getColor(R.color.lightBluePrimary);
ActivityManager.TaskDescription td = new ActivityManager.TaskDescription(
null, bm, colorPrimary);