// Path: adal-utils/src/main/java/com/massivedisaster/adal/utils/LogUtils.java
// public final class LogUtils {
// 
//     /**
//      * Private constructor to avoid user implement as a single instance instead of a Singleton
//      */
//     private LogUtils() {
// 
//     }
// 
//     /**
//      * Logs a error exception
//      *
//      * @param enclosingClass the caller class
//      * @param exception      the exception
//      */
//     public static void logErrorException(@NonNull Class<?> enclosingClass, @NonNull Throwable exception) {
//         String message = exception.getMessage() == null ? "Exception error." : exception.getMessage();
//         Log.e(enclosingClass.getName(), message, exception);
//     }
// 
// }


import android.preference.PreferenceManager;
import com.massivedisaster.adal.utils.LogUtils;
import org.json.JSONArray;
import org.json.JSONException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
     */
    private static void removeAlarmId(Context context, int id) {
        List<Integer> idsAlarms = getAlarmIds(context);

        for (int i = 0; i < idsAlarms.size(); i++) {
            if (idsAlarms.get(i) == id) {
                idsAlarms.remove(i);
            }
        }

        saveIdsInPreferences(context, idsAlarms);
    }

    /**
     * Get all alarms identifiers.
     *
     * @param context the context.
     * @return list of alarm identifiers.
     */
    private static List<Integer> getAlarmIds(Context context) {
        List<Integer> ids = new ArrayList<>();
        try {
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
            JSONArray jsonArray2 = new JSONArray(prefs.getString(context.getPackageName() + TAG_ALARMS, "[]"));

            for (int i = 0; i < jsonArray2.length(); i++) {
                ids.add(jsonArray2.getInt(i));
            }

        } catch (JSONException e) {
// Path: adal-utils/src/main/java/com/massivedisaster/adal/utils/LogUtils.java
// public final class LogUtils {
// 
//     /**
//      * Private constructor to avoid user implement as a single instance instead of a Singleton
//      */
//     private LogUtils() {
// 
//     }
// 
//     /**
//      * Logs a error exception
//      *
//      * @param enclosingClass the caller class
//      * @param exception      the exception
//      */
//     public static void logErrorException(@NonNull Class<?> enclosingClass, @NonNull Throwable exception) {
//         String message = exception.getMessage() == null ? "Exception error." : exception.getMessage();
//         Log.e(enclosingClass.getName(), message, exception);
//     }
// 
// }


// Path: adal-alarm/src/main/java/com/massivedisaster/adal/alarm/AlarmManager.java
import android.preference.PreferenceManager;
import com.massivedisaster.adal.utils.LogUtils;
import org.json.JSONArray;
import org.json.JSONException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;

     */
    private static void removeAlarmId(Context context, int id) {
        List<Integer> idsAlarms = getAlarmIds(context);

        for (int i = 0; i < idsAlarms.size(); i++) {
            if (idsAlarms.get(i) == id) {
                idsAlarms.remove(i);
            }
        }

        saveIdsInPreferences(context, idsAlarms);
    }

    /**
     * Get all alarms identifiers.
     *
     * @param context the context.
     * @return list of alarm identifiers.
     */
    private static List<Integer> getAlarmIds(Context context) {
        List<Integer> ids = new ArrayList<>();
        try {
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
            JSONArray jsonArray2 = new JSONArray(prefs.getString(context.getPackageName() + TAG_ALARMS, "[]"));

            for (int i = 0; i < jsonArray2.length(); i++) {
                ids.add(jsonArray2.getInt(i));
            }

        } catch (JSONException e) {
            LogUtils.logErrorException(AlarmManager.class, e);