// 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;
            // Fall through and be balanced when there's nothing saying not to.
            default:
            case ScanSettings.SCAN_MODE_BALANCED:
                scanIdleMillis = BALANCED_IDLE_MILLIS;
                scanActiveMillis = BALANCED_ACTIVE_MILLIS;
                break;
        }
    }

    protected int getScanModePriority(int mode) {
        switch (mode) {
            case ScanSettings.SCAN_MODE_LOW_LATENCY:
            case ScanSettings.SCAN_MODE_BALANCED:
            case ScanSettings.SCAN_MODE_LOW_POWER:
                return mode;
            default:
                Logger.logError("Unknown scan mode " + mode);
                return 0;
        }
    }

    protected Clock getClock() {
        return clock;
    }

    protected AlarmManager getAlarmManager() {
        return alarmManager;
    }

    protected PendingIntent 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;

            // Fall through and be balanced when there's nothing saying not to.
            default:
            case ScanSettings.SCAN_MODE_BALANCED:
                scanIdleMillis = BALANCED_IDLE_MILLIS;
                scanActiveMillis = BALANCED_ACTIVE_MILLIS;
                break;
        }
    }

    protected int getScanModePriority(int mode) {
        switch (mode) {
            case ScanSettings.SCAN_MODE_LOW_LATENCY:
            case ScanSettings.SCAN_MODE_BALANCED:
            case ScanSettings.SCAN_MODE_LOW_POWER:
                return mode;
            default:
                Logger.logError("Unknown scan mode " + mode);
                return 0;
        }
    }

    protected Clock getClock() {
        return clock;
    }

    protected AlarmManager getAlarmManager() {
        return alarmManager;
    }

    protected PendingIntent getAlarmIntent() {
        return alarmIntent;