mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
410 B
Java
21 lines
410 B
Java
package org.tasks;
|
|
|
|
import android.content.pm.PackageManager;
|
|
|
|
public abstract class PermissionUtil {
|
|
|
|
public static boolean verifyPermissions(int[] grantResults) {
|
|
if (grantResults.length == 0) {
|
|
// request canceled
|
|
return false;
|
|
}
|
|
|
|
for (int result : grantResults) {
|
|
if (result != PackageManager.PERMISSION_GRANTED) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|