Glunovo: catch SecurityException
This commit is contained in:
parent
1b3bb6ecdd
commit
e920b6bc2d
1 changed files with 67 additions and 63 deletions
|
@ -89,6 +89,7 @@ class GlunovoPlugin @Inject constructor(
|
||||||
private fun handleNewData() {
|
private fun handleNewData() {
|
||||||
if (!isEnabled()) return
|
if (!isEnabled()) return
|
||||||
|
|
||||||
|
try {
|
||||||
context.contentResolver.query(contentUri, null, null, null, null)?.let { cr ->
|
context.contentResolver.query(contentUri, null, null, null, null)?.let { cr ->
|
||||||
val glucoseValues = mutableListOf<CgmSourceTransaction.TransactionGlucoseValue>()
|
val glucoseValues = mutableListOf<CgmSourceTransaction.TransactionGlucoseValue>()
|
||||||
val calibrations = mutableListOf<CgmSourceTransaction.Calibration>()
|
val calibrations = mutableListOf<CgmSourceTransaction.Calibration>()
|
||||||
|
@ -164,6 +165,9 @@ class GlunovoPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e: SecurityException) {
|
||||||
|
aapsLogger.error(e.localizedMessage)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun shouldUploadToNs(glucoseValue: GlucoseValue): Boolean =
|
override fun shouldUploadToNs(glucoseValue: GlucoseValue): Boolean =
|
||||||
|
|
Loading…
Reference in a new issue