MultiGrantFakeManager
A GrantManager fake that behaves statefully across calls, unlike FakeGrantManager.
Calling request doesn't just return a canned value — it writes the result back into the status map, so a subsequent checkStatus for the same permission sees the post-request state. This matters for tests of code that requests a permission and then immediately re-checks it (e.g. a dev.brewkits.grant.GrantGroupHandler driving several permissions and re-evaluating which ones are still outstanding), where FakeGrantManager's stateless per-call return values would make every re-check look identical to the first one.
Prefer FakeGrantManager for most tests — reach for this one specifically when the behavior under test depends on status changing as a consequence of a request, not just on what the request returns.
Properties
Simulates a slow platform call — request suspends for this long first.
True once openSettings has been called.
Total number of times request has resolved, across every permission.
Functions
Sets what request resolves to for grant — checkStatus reflects this afterward too.
Sets what checkStatus returns for grant until a request changes it.