// Path: dexter/src/main/java/com/karumi/dexter/MultiplePermissionsReport.java
// public final class MultiplePermissionsReport {
// 
//   private final Set<PermissionGrantedResponse> grantedPermissionResponses;
//   private final Set<PermissionDeniedResponse> deniedPermissionResponses;
// 
//   MultiplePermissionsReport() {
//     grantedPermissionResponses = new LinkedHashSet<>();
//     deniedPermissionResponses = new LinkedHashSet<>();
//   }
// 
//   /**
//    * Returns a collection with all the permissions that has been granted
//    */
//   public List<PermissionGrantedResponse> getGrantedPermissionResponses() {
//     return new LinkedList<>(grantedPermissionResponses);
//   }
// 
//   /**
//    * Returns a collection with all the permissions that has been denied
//    */
//   public List<PermissionDeniedResponse> getDeniedPermissionResponses() {
//     return new LinkedList<>(deniedPermissionResponses);
//   }
// 
//   /**
//    * Returns whether the user has granted all the requested permission
//    */
//   public boolean areAllPermissionsGranted() {
//     return deniedPermissionResponses.isEmpty();
//   }
// 
//   /**
//    * Returns whether the user has permanently denied any of the requested permissions
//    */
//   public boolean isAnyPermissionPermanentlyDenied() {
//     boolean hasPermanentlyDeniedAnyPermission = false;
// 
//     for (PermissionDeniedResponse deniedResponse : deniedPermissionResponses) {
//       if (deniedResponse.isPermanentlyDenied()) {
//         hasPermanentlyDeniedAnyPermission = true;
//         break;
//       }
//     }
// 
//     return hasPermanentlyDeniedAnyPermission;
//   }
// 
//   boolean addGrantedPermissionResponse(PermissionGrantedResponse response) {
//     return grantedPermissionResponses.add(response);
//   }
// 
//   boolean addDeniedPermissionResponse(PermissionDeniedResponse response) {
//     return deniedPermissionResponses.add(response);
//   }
// 
//   void clear() {
//     grantedPermissionResponses.clear();
//     deniedPermissionResponses.clear();
//   }
// }
// 
// Path: dexter/src/main/java/com/karumi/dexter/listener/SettingsClickListener.java
// public class SettingsClickListener implements View.OnClickListener {
//     @Override
//     public void onClick(View view) {
//         Context context = view.getContext();
//         Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
//                 Uri.parse("package:" + context.getPackageName()));
//         myAppSettings.addCategory(Intent.CATEGORY_DEFAULT);
//         myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//         context.startActivity(myAppSettings);
//     }
// }
// 
// Path: dexter/src/main/java/com/karumi/dexter/listener/SnackbarUtils.java
// public class SnackbarUtils {
// 
//     public static void show(View view, String text, int duration, String buttonText,
//             View.OnClickListener onButtonClickListener,
//             BaseTransientBottomBar.BaseCallback<Snackbar> snackbarCallback) {
//         Snackbar snackbar = Snackbar.make(view, text, duration);
//         if (buttonText != null && onButtonClickListener != null) {
//             snackbar.setAction(buttonText, onButtonClickListener);
//         }
//         if (snackbarCallback != null) {
//             snackbar.addCallback(snackbarCallback);
//         }
//         snackbar.show();
//     }
// }


import android.view.View;
import com.google.android.material.snackbar.Snackbar;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.listener.SettingsClickListener;
import com.karumi.dexter.listener.SnackbarUtils;
import androidx.annotation.StringRes;
/*
 * Copyright (C) 2015 Karumi.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.karumi.dexter.listener.multi;




/**
 * Utility listener that shows a {@link Snackbar} with a custom text whenever a permission has been
 * permanently denied
 */
public class SnackbarOnAnyPermanentlyDeniedMultiplePermissionsListener
    extends BaseMultiplePermissionsListener {

  private final View view;
  private final String text;
  private final String buttonText;
  private final View.OnClickListener onButtonClickListener;
  private final Snackbar.Callback snackbarCallback;
// Path: dexter/src/main/java/com/karumi/dexter/MultiplePermissionsReport.java
// public final class MultiplePermissionsReport {
// 
//   private final Set<PermissionGrantedResponse> grantedPermissionResponses;
//   private final Set<PermissionDeniedResponse> deniedPermissionResponses;
// 
//   MultiplePermissionsReport() {
//     grantedPermissionResponses = new LinkedHashSet<>();
//     deniedPermissionResponses = new LinkedHashSet<>();
//   }
// 
//   /**
//    * Returns a collection with all the permissions that has been granted
//    */
//   public List<PermissionGrantedResponse> getGrantedPermissionResponses() {
//     return new LinkedList<>(grantedPermissionResponses);
//   }
// 
//   /**
//    * Returns a collection with all the permissions that has been denied
//    */
//   public List<PermissionDeniedResponse> getDeniedPermissionResponses() {
//     return new LinkedList<>(deniedPermissionResponses);
//   }
// 
//   /**
//    * Returns whether the user has granted all the requested permission
//    */
//   public boolean areAllPermissionsGranted() {
//     return deniedPermissionResponses.isEmpty();
//   }
// 
//   /**
//    * Returns whether the user has permanently denied any of the requested permissions
//    */
//   public boolean isAnyPermissionPermanentlyDenied() {
//     boolean hasPermanentlyDeniedAnyPermission = false;
// 
//     for (PermissionDeniedResponse deniedResponse : deniedPermissionResponses) {
//       if (deniedResponse.isPermanentlyDenied()) {
//         hasPermanentlyDeniedAnyPermission = true;
//         break;
//       }
//     }
// 
//     return hasPermanentlyDeniedAnyPermission;
//   }
// 
//   boolean addGrantedPermissionResponse(PermissionGrantedResponse response) {
//     return grantedPermissionResponses.add(response);
//   }
// 
//   boolean addDeniedPermissionResponse(PermissionDeniedResponse response) {
//     return deniedPermissionResponses.add(response);
//   }
// 
//   void clear() {
//     grantedPermissionResponses.clear();
//     deniedPermissionResponses.clear();
//   }
// }
// 
// Path: dexter/src/main/java/com/karumi/dexter/listener/SettingsClickListener.java
// public class SettingsClickListener implements View.OnClickListener {
//     @Override
//     public void onClick(View view) {
//         Context context = view.getContext();
//         Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
//                 Uri.parse("package:" + context.getPackageName()));
//         myAppSettings.addCategory(Intent.CATEGORY_DEFAULT);
//         myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//         context.startActivity(myAppSettings);
//     }
// }
// 
// Path: dexter/src/main/java/com/karumi/dexter/listener/SnackbarUtils.java
// public class SnackbarUtils {
// 
//     public static void show(View view, String text, int duration, String buttonText,
//             View.OnClickListener onButtonClickListener,
//             BaseTransientBottomBar.BaseCallback<Snackbar> snackbarCallback) {
//         Snackbar snackbar = Snackbar.make(view, text, duration);
//         if (buttonText != null && onButtonClickListener != null) {
//             snackbar.setAction(buttonText, onButtonClickListener);
//         }
//         if (snackbarCallback != null) {
//             snackbar.addCallback(snackbarCallback);
//         }
//         snackbar.show();
//     }
// }


// Path: dexter/src/main/java/com/karumi/dexter/listener/multi/SnackbarOnAnyPermanentlyDeniedMultiplePermissionsListener.java
import android.view.View;
import com.google.android.material.snackbar.Snackbar;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.listener.SettingsClickListener;
import com.karumi.dexter.listener.SnackbarUtils;
import androidx.annotation.StringRes;

/*
 * Copyright (C) 2015 Karumi.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.karumi.dexter.listener.multi;




/**
 * Utility listener that shows a {@link Snackbar} with a custom text whenever a permission has been
 * permanently denied
 */
public class SnackbarOnAnyPermanentlyDeniedMultiplePermissionsListener
    extends BaseMultiplePermissionsListener {

  private final View view;
  private final String text;
  private final String buttonText;
  private final View.OnClickListener onButtonClickListener;
  private final Snackbar.Callback snackbarCallback;
  private final int duration;