Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6c3d036 authored by Matheo Levallois's avatar Matheo Levallois
Browse files

Merge branch...

Merge branch '3335-factorize-foundation-e-parentalControl-provider-string-into-variable' into 'main'

refactor: factorize foundation e parentalControl provider string into a variable

See merge request !611
parents 4fa8b7bc 72ab7baa
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -31,15 +31,17 @@ class ParentalControlRepository @Inject constructor(
) {

    companion object {
        private const val URI_PARENTAL_CONTROL_PROVIDER =
            "content://foundation.e.parentalcontrol.provider/age"
        private const val PARENTAL_CONTROL_PROVIDER =
            "foundation.e.parentalcontrol.provider"
        private const val URI_PARENTAL_CONTROL_AGE =
            "content://$PARENTAL_CONTROL_PROVIDER/age"
        private const val URI_PARENTAL_CONTROL_INSTALL_TYPE_APP_MANAGEMENT =
            "content://foundation.e.parentalcontrol.provider/protectionmode"
            "content://$PARENTAL_CONTROL_PROVIDER/protectionmode"
        const val KEY_PARENTAL_GUIDANCE = "parental guidance"
    }

    fun getSelectedAgeGroup(): Age {
        val uri = URI_PARENTAL_CONTROL_PROVIDER.toUri()
        val uri = URI_PARENTAL_CONTROL_AGE.toUri()
        val cursor = context.contentResolver.query(uri, null, null, null, null)

        cursor?.use {