mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-15 21:57:31 +01:00
EN: Do not log isEnabled calls
Some apps make excessive use of this method, so better not log it
This commit is contained in:
parent
c30e05ee68
commit
8b49b05585
@ -122,6 +122,10 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (oldVersion == 9) {
|
||||||
|
Log.d(TAG, "Get rid of isEnabled log entries")
|
||||||
|
db.delete(TABLE_APP_LOG, "method = ?", arrayOf("isEnabled"));
|
||||||
|
}
|
||||||
Log.d(TAG, "Finished database upgrade")
|
Log.d(TAG, "Finished database upgrade")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,7 +834,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val DB_NAME = "exposure.db"
|
private const val DB_NAME = "exposure.db"
|
||||||
private const val DB_VERSION = 9
|
private const val DB_VERSION = 10
|
||||||
private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024
|
private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024
|
||||||
private const val MAX_DELETE_TIME = 5000L
|
private const val MAX_DELETE_TIME = 5000L
|
||||||
private const val TABLE_ADVERTISEMENTS = "advertisements"
|
private const val TABLE_ADVERTISEMENTS = "advertisements"
|
||||||
|
@ -151,9 +151,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
|
|||||||
override fun isEnabled(params: IsEnabledParams) {
|
override fun isEnabled(params: IsEnabledParams) {
|
||||||
lifecycleScope.launchWhenStarted {
|
lifecycleScope.launchWhenStarted {
|
||||||
val isAuthorized = ExposureDatabase.with(context) { database ->
|
val isAuthorized = ExposureDatabase.with(context) { database ->
|
||||||
database.isAppAuthorized(packageName).also {
|
database.isAppAuthorized(packageName)
|
||||||
if (it) database.noteAppAction(packageName, "isEnabled")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
params.callback.onResult(Status.SUCCESS, isAuthorized && ExposurePreferences(context).enabled)
|
params.callback.onResult(Status.SUCCESS, isAuthorized && ExposurePreferences(context).enabled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user