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

Commit 9e169640 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "AutoOnFeature: Prevent double metric log" into main

parents 19e9579e ccc66f43
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()}")
    }