Commit 3c3abf9f authored by yangwu.jia's avatar yangwu.jia

兼容compileSdk低于28

parent 7e30fa0b
......@@ -126,11 +126,11 @@ public class XPlatformPlugin implements ActivityLifecycleListener {
// Linter refuses to believe we're only executing this code in API 28 unless we use distinct if blocks and
// hardcode the API 28 constant.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P && Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT < 28 && Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
activity.setTaskDescription(new TaskDescription(description.label));
}
if (Build.VERSION.SDK_INT >= 28) {
TaskDescription taskDescription = new TaskDescription(description.label, 0, description.color);
TaskDescription taskDescription = new TaskDescription(description.label, null, description.color);
activity.setTaskDescription(taskDescription);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment