Merge pull request #13 from eseidelGoogle/master

Guard TaskDescription with API version 21
This commit is contained in:
Eric Seidel 2015-07-16 14:18:42 -07:00
commit 181f3db4bb

View File

@ -7,6 +7,7 @@ package org.domokit.activity;
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;
@ -83,6 +84,9 @@ public class ActivityImpl implements Activity {
if (sCurrentActivity == null) {
return;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
sCurrentActivity.setTaskDescription(
new android.app.ActivityManager.TaskDescription(
description.label,