mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Merge branch 'master' into new_GUI
This commit is contained in:
commit
4edfc44d64
@ -34,6 +34,20 @@ public class MiBandPreferencesActivity extends AbstractSettingsActivity {
|
||||
|
||||
addPreferencesFromResource(R.xml.miband_preferences);
|
||||
|
||||
addTryListeners();
|
||||
|
||||
final Preference enableHeartrateSleepSupport = findPreference(PREF_MIBAND_USE_HR_FOR_SLEEP_DETECTION);
|
||||
enableHeartrateSleepSupport.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newVal) {
|
||||
GBApplication.deviceService().onEnableHeartRateSleepSupport(Boolean.TRUE.equals(newVal));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
final Preference developmentMiaddr = findPreference(PREF_MIBAND_ADDRESS);
|
||||
developmentMiaddr.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
@ -45,17 +59,6 @@ public class MiBandPreferencesActivity extends AbstractSettingsActivity {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
addTryListeners();
|
||||
|
||||
final Preference enableHeartrateSleepSupport = findPreference(PREF_MIBAND_USE_HR_FOR_SLEEP_DETECTION);
|
||||
enableHeartrateSleepSupport.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newVal) {
|
||||
GBApplication.deviceService().onEnableHeartRateSleepSupport(Boolean.TRUE.equals(newVal));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addTryListeners() {
|
||||
|
Loading…
Reference in New Issue
Block a user