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

Commit f97a869c authored by Jonathan Klee's avatar Jonathan Klee
Browse files

refactor(sync): simplify policy-controlled state check

parent 3ad93193
Loading
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -222,15 +222,8 @@ object SyncAdapterComponentManager {
    }

    internal fun isPolicyControlledState(componentState: Int): Boolean {
        if (componentState == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER) {
            return true
        }

        if (componentState == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) {
            return true
        }

        return false
        return componentState == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER ||
            componentState == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
    }

    private fun stateName(state: Int): String {