Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Guard TaskDescription with API version 21 #13

Merged
merged 1 commit into from
Jul 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.ActivityNotFoundException;
import android.net.Uri;
import android.util.Log;
import android.os.Build;

import org.chromium.mojo.system.MojoException;
import org.chromium.mojom.activity.Activity;
Expand Down Expand Up @@ -83,6 +84,9 @@ public void setTaskDescription(TaskDescription description) {
if (sCurrentActivity == null) {
return;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
sCurrentActivity.setTaskDescription(
new android.app.ActivityManager.TaskDescription(
description.label,
Expand Down