提交 ea1531a3 编写于 作者: I Ian Hickson

Merge pull request #2272 from Hixie/activity

setTaskDescription: Guard against bad values from Dart.
......@@ -126,11 +126,14 @@ public class ActivityImpl implements Activity {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
int color = description.primaryColor;
if (color != 0) // 0 means color isn't set, use system default
color = color | 0xFF000000; // color must be opaque if set
sCurrentActivity.setTaskDescription(
new android.app.ActivityManager.TaskDescription(
description.label,
null,
description.primaryColor
color
)
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册