1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-02-08 15:58:40 +01:00

fix crash when launching

This commit is contained in:
Tlaster 2020-12-01 14:35:47 +08:00
parent fbaf027ce4
commit 75c5c09ba6

View File

@ -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());
}
}
}