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

Commit a0ebd1a9 authored by Fan Zhang's avatar Fan Zhang
Browse files

Refresh state after loading conditions from xml.

Fixes: 30330909

When start Settings, conditions is loaded from a xml with potentially
stale state. ConditionLoader needs to refresh states after reading xml
to make sure they are up to date.

Change-Id: Ice1b8bacb0486c5dd230b83670c1494710d1c061
parent d5b3043b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.os.AsyncTask;
import android.os.PersistableBundle;
import android.util.Log;
import android.util.Xml;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -241,10 +242,7 @@ public class ConditionManager {
        protected void onPostExecute(ArrayList<Condition> conditions) {
            mConditions.clear();
            mConditions.addAll(conditions);
            final int N = mListeners.size();
            for (int i = 0; i < N; i++) {
                mListeners.get(i).onConditionsChanged();
            }
            refreshAll();
        }
    }