Include final pull request for release 2.0. (#39)

This commit is contained in:
COVIDSafe Support 2020-12-21 12:19:00 +11:00 committed by GitHub
parent 26ca20fc3d
commit 47d4b1e2e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -167,9 +167,8 @@ class PeekActivity : AppCompatActivity() {
return timePeriod
}
private fun startService() {
Utils.startBluetoothMonitoringService(this)
// Utils.startBluetoothMonitoringService(this)
}
private fun stopService() {

View file

@ -14,7 +14,7 @@ class UpgradeReceiver : BroadcastReceiver() {
if (Intent.ACTION_MY_PACKAGE_REPLACED != intent!!.action) return
context?.let {
CentralLog.i("UpgradeReceiver", "Starting service from upgrade receiver")
Utils.startBluetoothMonitoringService(context)
// Utils.startBluetoothMonitoringService(context)
}
} catch (e: Exception) {
CentralLog.e("UpgradeReceiver", "Unable to handle upgrade: ${e.localizedMessage}")

View file

@ -98,7 +98,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
Utils.cancelBMUpdateCheck(this.applicationContext)
Utils.cancelNextScan(this.applicationContext)
Utils.cancelNextAdvertise(this.applicationContext)
sensor?.stop()
// sensor?.stop()
}
private fun setupNotifications() {
@ -332,6 +332,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
job.cancel()
CentralLog.i(TAG, "BluetoothMonitoringService destroyed")
sensor?.stop()
}
private fun showForegroundNotification() {
@ -458,7 +459,7 @@ class BluetoothMonitoringService : LifecycleService(), CoroutineScope, SensorDel
}
BluetoothAdapter.STATE_ON -> {
CentralLog.d(TAG, "BluetoothAdapter.STATE_ON")
Utils.startBluetoothMonitoringService(this@BluetoothMonitoringService.applicationContext)
// Utils.startBluetoothMonitoringService(this@BluetoothMonitoringService.applicationContext)
showForegroundNotification()
}
}