From 6fc38f68ab2639a96a4a1a2d6dfb1ad59e68b7fd Mon Sep 17 00:00:00 2001 From: Alex Bykov Date: Sun, 5 Nov 2017 13:56:31 +0300 Subject: [PATCH] onFailure method is deprecated --- .../alexbykov/nopermission/PermissionHelper.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/library/src/main/java/ru/alexbykov/nopermission/PermissionHelper.java b/library/src/main/java/ru/alexbykov/nopermission/PermissionHelper.java index 591ecb6..5e41ba2 100644 --- a/library/src/main/java/ru/alexbykov/nopermission/PermissionHelper.java +++ b/library/src/main/java/ru/alexbykov/nopermission/PermissionHelper.java @@ -88,6 +88,15 @@ public PermissionHelper onDenied(Runnable listener) { return this; } + /** + * @deprecated use method onFailure instead that + * + */ + @Deprecated + public PermissionHelper onFailure(Runnable listener) { + this.deniedListener = listener; + return this; + } /** * This method setup never ask again callback @@ -142,6 +151,12 @@ private void checkPermissions() { } } + + /** + * This method ask permission + * @param permissionsForRequest array of permissions which you want to ask + */ + @SuppressLint("NewApi") private void askPermissions(String[] permissionsForRequest) { if (activity != null) {