mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-27 21:25:49 +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")
|
||||
}
|
||||
|
||||
@ -830,7 +834,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
||||
|
||||
companion object {
|
||||
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 MAX_DELETE_TIME = 5000L
|
||||
private const val TABLE_ADVERTISEMENTS = "advertisements"
|
||||
|
@ -151,9 +151,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
|
||||
override fun isEnabled(params: IsEnabledParams) {
|
||||
lifecycleScope.launchWhenStarted {
|
||||
val isAuthorized = ExposureDatabase.with(context) { database ->
|
||||
database.isAppAuthorized(packageName).also {
|
||||
if (it) database.noteAppAction(packageName, "isEnabled")
|
||||
}
|
||||
database.isAppAuthorized(packageName)
|
||||
}
|
||||
try {
|
||||
params.callback.onResult(Status.SUCCESS, isAuthorized && ExposurePreferences(context).enabled)
|
||||
|
Loading…
Reference in New Issue
Block a user