Small improvement

pull/215/head
M66B 7 months ago
parent ddae8ca407
commit d21951df1e

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

Loading…
Cancel
Save