// Path: library/src/main/java/com/reelyactive/blesdk/support/ble/util/Clock.java
// public interface Clock {
// 
//   /**
//    * @return current time in milliseconds
//    */
//   public long currentTimeMillis();
// 
//   /**
//    * @return time since the device was booted, in nanoseconds
//    */
//   public long elapsedRealtimeNanos();
// 
// }
// 
// Path: library/src/main/java/com/reelyactive/blesdk/support/ble/util/Logger.java
// public class Logger {
// 
//   public static final String TAG = "BleScanCompatLib";
// 
//   public static void logVerbose(String message) {
//     if (Log.isLoggable(TAG, Log.VERBOSE)) {
//       Log.v(TAG, message);
//     }
//   }
// 
//   public static void logWarning(String message) {
//     if (Log.isLoggable(TAG, Log.WARN)) {
//       Log.w(TAG, message);
//     }
//   }
// 
//   public static void logDebug(String message) {
//     if (Log.isLoggable(TAG, Log.DEBUG)) {
//       Log.d(TAG, message);
//     }
//   }
// 
//   public static void logInfo(String message) {
//     if (Log.isLoggable(TAG, Log.INFO)) {
//       Log.i(TAG, message);
//     }
//   }
// 
//   public static void logError(String message, Exception... e) {
//     if (Log.isLoggable(TAG, Log.ERROR)) {
//       if (e == null || e.length == 0) {
//         Log.e(TAG, message);
//       } else {
//         Log.e(TAG, message, e[0]);
//       }
//     }
//   }
// }


import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.os.Build;
import com.reelyactive.blesdk.support.ble.util.Clock;
import com.reelyactive.blesdk.support.ble.util.Logger;
    }

    /**
     * Get the current active ble scan time that has been set
     *
     * @VisibleForTesting
     */
    int getScanActiveMillis() {
        return (overrideScanActiveMillis != -1) ? overrideScanActiveMillis : scanActiveMillis;
    }

    /**
     * Get the current idle ble scan time that has been set
     *
     * @VisibleForTesting
     */
    int getScanIdleMillis() {
        return (overrideScanActiveMillis != -1) ? overrideScanIdleMillis : scanIdleMillis;
    }

    /**
     * Update the repeating alarm wake-up based on the period defined for the scanner If there are
     * no clients, or a batch scan running, it will cancel the alarm.
     */
    protected void updateRepeatingAlarm() {
        // Apply Scan Mode (Cycle Parameters)
        setScanMode(getMaxPriorityScanMode());
        if (!hasClients()) {
            // No listeners.  Remove the repeating alarm, if there is one.
            getAlarmManager().cancel(getAlarmIntent());
// Path: library/src/main/java/com/reelyactive/blesdk/support/ble/util/Clock.java
// public interface Clock {
// 
//   /**
//    * @return current time in milliseconds
//    */
//   public long currentTimeMillis();
// 
//   /**
//    * @return time since the device was booted, in nanoseconds
//    */
//   public long elapsedRealtimeNanos();
// 
// }
// 
// Path: library/src/main/java/com/reelyactive/blesdk/support/ble/util/Logger.java
// public class Logger {
// 
//   public static final String TAG = "BleScanCompatLib";
// 
//   public static void logVerbose(String message) {
//     if (Log.isLoggable(TAG, Log.VERBOSE)) {
//       Log.v(TAG, message);
//     }
//   }
// 
//   public static void logWarning(String message) {
//     if (Log.isLoggable(TAG, Log.WARN)) {
//       Log.w(TAG, message);
//     }
//   }
// 
//   public static void logDebug(String message) {
//     if (Log.isLoggable(TAG, Log.DEBUG)) {
//       Log.d(TAG, message);
//     }
//   }
// 
//   public static void logInfo(String message) {
//     if (Log.isLoggable(TAG, Log.INFO)) {
//       Log.i(TAG, message);
//     }
//   }
// 
//   public static void logError(String message, Exception... e) {
//     if (Log.isLoggable(TAG, Log.ERROR)) {
//       if (e == null || e.length == 0) {
//         Log.e(TAG, message);
//       } else {
//         Log.e(TAG, message, e[0]);
//       }
//     }
//   }
// }


// Path: library/src/main/java/com/reelyactive/blesdk/support/ble/BluetoothLeScannerCompat.java
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.os.Build;
import com.reelyactive.blesdk.support.ble.util.Clock;
import com.reelyactive.blesdk.support.ble.util.Logger;

    }

    /**
     * Get the current active ble scan time that has been set
     *
     * @VisibleForTesting
     */
    int getScanActiveMillis() {
        return (overrideScanActiveMillis != -1) ? overrideScanActiveMillis : scanActiveMillis;
    }

    /**
     * Get the current idle ble scan time that has been set
     *
     * @VisibleForTesting
     */
    int getScanIdleMillis() {
        return (overrideScanActiveMillis != -1) ? overrideScanIdleMillis : scanIdleMillis;
    }

    /**
     * Update the repeating alarm wake-up based on the period defined for the scanner If there are
     * no clients, or a batch scan running, it will cancel the alarm.
     */
    protected void updateRepeatingAlarm() {
        // Apply Scan Mode (Cycle Parameters)
        setScanMode(getMaxPriorityScanMode());
        if (!hasClients()) {
            // No listeners.  Remove the repeating alarm, if there is one.
            getAlarmManager().cancel(getAlarmIntent());
            Logger.logInfo("Scan : No clients left, canceling alarm.");