update UI in onSharedPreferenceChangedListener in the UI thread

This commit is contained in:
Jimmy Shih
2012-11-02 14:21:59 -07:00
parent b4eaad984e
commit 3c59a33759
6 changed files with 45 additions and 27 deletions
@@ -63,7 +63,12 @@ public class BackupSettingsActivity extends AbstractSettingsActivity {
BackupSettingsActivity.this, R.string.recording_track_id_key);
}
if (key != null) {
updateUi();
runOnUiThread(new Runnable() {
@Override
public void run() {
updateUi();
}
});
}
}
};
@@ -47,7 +47,12 @@ public class StatsSettingsActivity extends AbstractSettingsActivity {
R.string.metric_units_key, PreferencesUtils.METRIC_UNITS_DEFAULT);
}
if (key != null) {
updateUi();
runOnUiThread(new Runnable() {
@Override
public void run() {
updateUi();
}
});
}
}
};