Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
return true for old android versions, since AppOpsManager is availabl…
Browse files Browse the repository at this point in the history
…e starting at 19 (#1634)
  • Loading branch information
luka5 authored and macdonst committed Mar 8, 2017
1 parent 75f2191 commit 945aa2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/android/com/adobe/phonegap/push/PermissionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
public class PermissionUtils {

private static final String CHECK_OP_NO_THROW = "checkOpNoThrow";
private static final int MIN_API_LEVEL = 19; // required by AppOpsManager

public static boolean hasPermission(Context appContext, String appOpsServiceId) throws UnknownError {
if (android.os.Build.VERSION.SDK_INT < MIN_API_LEVEL) {
return true;
}

ApplicationInfo appInfo = appContext.getApplicationInfo();

Expand Down

0 comments on commit 945aa2a

Please # to comment.