mirror of
https://github.com/AU-COVIDSafe/mobile-android.git
synced 2025-01-18 16:56:34 +00:00
Include final pull request for release 2.0. (#39)
This commit is contained in:
parent
26ca20fc3d
commit
47d4b1e2e5
4 changed files with 6 additions and 6 deletions
|
@ -167,9 +167,8 @@ class PeekActivity : AppCompatActivity() {
|
||||||
return timePeriod
|
return timePeriod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun startService() {
|
private fun startService() {
|
||||||
Utils.startBluetoothMonitoringService(this)
|
// Utils.startBluetoothMonitoringService(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun stopService() {
|
private fun stopService() {
|
||||||
|
|
|
@ -14,7 +14,7 @@ class UpgradeReceiver : BroadcastReceiver() {
|
||||||
if (Intent.ACTION_MY_PACKAGE_REPLACED != intent!!.action) return
|
if (Intent.ACTION_MY_PACKAGE_REPLACED != intent!!.action) return
|
||||||
context?.let {
|
context?.let {
|
||||||
CentralLog.i("UpgradeReceiver", "Starting service from upgrade receiver")
|
CentralLog.i("UpgradeReceiver", "Starting service from upgrade receiver")
|
||||||
Utils.startBluetoothMonitoringService(context)
|
// Utils.startBluetoothMonitoringService(context)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
CentralLog.e("UpgradeReceiver", "Unable to handle upgrade: ${e.localizedMessage}")
|
CentralLog.e("UpgradeReceiver", "Unable to handle upgrade: ${e.localizedMessage}")
|
||||||
|
|
|
@ -98,7 +98,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
|
||||||
Utils.cancelBMUpdateCheck(this.applicationContext)
|
Utils.cancelBMUpdateCheck(this.applicationContext)
|
||||||
Utils.cancelNextScan(this.applicationContext)
|
Utils.cancelNextScan(this.applicationContext)
|
||||||
Utils.cancelNextAdvertise(this.applicationContext)
|
Utils.cancelNextAdvertise(this.applicationContext)
|
||||||
sensor?.stop()
|
// sensor?.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupNotifications() {
|
private fun setupNotifications() {
|
||||||
|
@ -332,6 +332,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
|
||||||
job.cancel()
|
job.cancel()
|
||||||
|
|
||||||
CentralLog.i(TAG, "BluetoothMonitoringService destroyed")
|
CentralLog.i(TAG, "BluetoothMonitoringService destroyed")
|
||||||
|
sensor?.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showForegroundNotification() {
|
private fun showForegroundNotification() {
|
||||||
|
@ -458,7 +459,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
|
||||||
}
|
}
|
||||||
BluetoothAdapter.STATE_ON -> {
|
BluetoothAdapter.STATE_ON -> {
|
||||||
CentralLog.d(TAG, "BluetoothAdapter.STATE_ON")
|
CentralLog.d(TAG, "BluetoothAdapter.STATE_ON")
|
||||||
Utils.startBluetoothMonitoringService(this@BluetoothMonitoringService.applicationContext)
|
// Utils.startBluetoothMonitoringService(this@BluetoothMonitoringService.applicationContext)
|
||||||
showForegroundNotification()
|
showForegroundNotification()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue