public class BluetoothCrashResolver
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
BluetoothCrashResolver.UpdateNotifier |
Constructor and Description |
---|
BluetoothCrashResolver(android.content.Context context)
Constructor should be called only once per long-running process that does Bluetooth LE
scanning.
|
Modifier and Type | Method and Description |
---|---|
void |
crashDetected() |
void |
disableDebug()
Disable debug logging
|
void |
enableDebug()
Enable debug logging.
|
void |
forceFlush()
Used to force a recovery operation
|
int |
getDetectedCrashCount() |
long |
getLastBluetoothCrashDetectionTime() |
int |
getRecoveryAttemptCount() |
boolean |
isLastRecoverySucceeded() |
boolean |
isRecoveryInProgress() |
void |
notifyScannedDevice(android.bluetooth.BluetoothDevice device,
android.bluetooth.BluetoothAdapter.LeScanCallback scanner)
Call this method from your BluetoothAdapter.LeScanCallback method.
|
void |
setUpdateNotifier(BluetoothCrashResolver.UpdateNotifier updateNotifier) |
void |
start()
Starts looking for crashes of the Bluetooth LE system and taking proactive steps to stop
crashes from happening.
|
void |
stop()
Stops looking for crashes.
|
public BluetoothCrashResolver(android.content.Context context)
context
- the Activity or Service that is doing the Bluetooth scanningpublic void start()
public void stop()
public void enableDebug()
public void disableDebug()
public void notifyScannedDevice(android.bluetooth.BluetoothDevice device, android.bluetooth.BluetoothAdapter.LeScanCallback scanner)
device
- public void crashDetected()
public long getLastBluetoothCrashDetectionTime()
public int getDetectedCrashCount()
public int getRecoveryAttemptCount()
public boolean isLastRecoverySucceeded()
public boolean isRecoveryInProgress()
public void setUpdateNotifier(BluetoothCrashResolver.UpdateNotifier updateNotifier)
public void forceFlush()