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

Commit af4cc03e authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AutoOnFeature: Prevent double metric log" into main am: 9e169640

parents 9e9f498b 9e169640
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -136,6 +136,10 @@ public fun setUserEnabled(
    if (!isUserSupported(context.contentResolver)) {
        throw IllegalStateException("AutoOnFeature not supported for user: ${context.getUser()}")
    }
    if (isFeatureEnabledForUser(context.contentResolver) && status == true) {
        Log.i(TAG, "setUserEnabled: Nothing to do, feature is already enabled")
        return
    }
    if (!setFeatureEnabledForUserUnchecked(context, status)) {
        throw IllegalStateException("AutoOnFeature database failure for user: ${context.getUser()}")
    }