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

Commit 62e3a827 authored by Arc Wang's avatar Arc Wang
Browse files

[Wi-Fi] Fix EntityHeader signal strength icon invisible problem

WifiDetailPreferenceController2#onUpdated() triggers each controller
to displayPreference(PreferenceScreen screen) for visibility
updating. However, WifiDetailPreferenceController2 is a much
complex controller which should controll it's components visibility
by itself.

Bug: 152886237
Test: manual visual
      Observe EntityHeader signal strength icon UI display.
Change-Id: I80a8341ae051f21410070a81e01716eb49d2c8da
parent 75d6c9fc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -235,6 +235,13 @@ public class WifiNetworkDetailsFragment2 extends DashboardFragment implements
    public void refreshPreferences() {
        final PreferenceScreen screen = getPreferenceScreen();
        for (AbstractPreferenceController controller : mControllers) {
            // WifiDetailPreferenceController2 gets the callback WifiEntryCallback#onUpdated,
            // it can control the visibility change by itself.
            // And WifiDetailPreferenceController2#updatePreference renew mEntityHeaderController
            // instance which will cause icon reset.
            if (controller instanceof WifiDetailPreferenceController2) {
                continue;
            }
            controller.displayPreference(screen);
        }
    }