MCPcopy Create free account
hub / github.com/M66B/NetGuard / setTaskColor

Method setTaskColor

app/src/main/java/eu/faircode/netguard/Util.java:521–526  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

519 }
520
521 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
522 private static void setTaskColor(Context context) {
523 TypedValue tv = new TypedValue();
524 context.getTheme().resolveAttribute(R.attr.colorPrimary, tv, true);
525 ((Activity) context).setTaskDescription(new ActivityManager.TaskDescription(null, null, tv.data));
526 }
527
528 public static int dips2pixels(int dips, Context context) {
529 return Math.round(dips * context.getResources().getDisplayMetrics().density + 0.5f);

Callers 1

setThemeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected