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

Skip to content
Commit e455c28f authored by Hai Zhang's avatar Hai Zhang
Browse files

Expose app op mode getter/setter/change listener directly on policy.

This allows the compat layer to call them with less ceremony of going
through URIs.

Also call UserState.requestWrite() upon changes.

It is unfortunate that we have to duplicate some code this way, but we
have to do it because Java/Kotlin generics doesn't allow primitive
ints and we want to avoid auto-boxing.

Also made mutateState()'s lambda crossinline so that the caller don't
accidentally stop the state mutation mid-way.

Bug: 182523293
Test: presubmit
Change-Id: I1f61c35352a9c614939976bf98ee2eeb9bb8d0e0
parent 8ec0b69d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment