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

Commit 3945e358 authored by Julia Tuttle's avatar Julia Tuttle Committed by Android (Google) Code Review
Browse files

Merge "FakeDeviceProvisionedController: allow un-setting-up user" into main

parents 10fce490 f87fab8a
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -39,8 +39,16 @@ class FakeDeviceProvisionedController : DeviceProvisionedController {
        callbacks.toSet().forEach { it.onUserSwitched() }
    }

    fun setUserSetup(userId: Int) {
    fun setUserSetup(userId: Int, isSetup: Boolean = true) {
        if (isSetup) {
            usersSetup.add(userId)
        } else {
            usersSetup.remove(userId)
        }
        callbacks.toSet().forEach { it.onUserSetupChanged() }
    }

    fun setCurrentUserSetup(isSetup: Boolean) {
        setUserSetup(currentUser, isSetup)
    }
}