fix crash when launching
This commit is contained in:
parent
fbaf027ce4
commit
75c5c09ba6
|
@ -45,7 +45,11 @@ public class ActivitySupport {
|
|||
}
|
||||
|
||||
private static TaskDescription toNativeTaskDescription(TaskDescriptionCompat taskDescription) {
|
||||
return new TaskDescription(taskDescription.getLabel(), taskDescription.getPrimaryColor());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
return new TaskDescription(taskDescription.getLabel(), taskDescription.getPrimaryColor());
|
||||
} else {
|
||||
return new TaskDescription(taskDescription.getLabel(), taskDescription.getIcon(), taskDescription.getPrimaryColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue