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

Skip to content
Commit 195c698c authored by Matías Hernández's avatar Matías Hernández
Browse files

Fix refresh of "apps that can interrupt" segment

Switching from Priority Apps to None would still show the icons of the priority apps. There were several minor things wrong:
* We were keeping the AppSession when a mode switches from "priority apps" to "none", and because onResume always fires the callback, we were loading the icons.
* Even when deactivating the session, its own onResume lifecycle listener was still firing one extra time, before we had a chance to deactivate it.

Also two minor improvements to CircularIconsPreference:
* Update mLoadedIcons when we early exit due to mIconSet having no items. Mostly for testing, since the icons wouldn't be visible anyway.
* Use notifyChanged() when we get a measured view, instead of holding a reference to the view. Technically the previous code violated the "shouldn't keep references to views outside of onBindViewHolder" (although I didn't see this having an effect in practice).

Fixes: 360077747
Test: atest ZenModeAppsLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I6d4b7a344542da46f5ebfcd0774f1af27ed113ac
parent e3702e9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment