Make ZenModeRepository.modes a (single) StateFlow
Using regular Flows per caller means that every client of ZenModeRepository/ZenModeInteractor causes a new ContentObserver to be registered (and ZenModesBackend.getModes() to be called on each of those changes). With the current clients of the interactor, this could easily become 12 or more Binder calls per each zen change! Bug: 403434908 Test: atest ZenModeRepositoryTest + manual Flag: EXEMPT Simple (and urgent) performance improvement Change-Id: I428ef6ef03eb331115d53f878e742542963a11a8
Loading
Please register or sign in to comment