mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 11:26:47 +01:00
Also use getGenericType() for the "summary" types
This commit is contained in:
parent
f877a4a485
commit
1fc44034f0
@ -6,6 +6,9 @@ import android.preference.Preference;
|
|||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
|
||||||
@ -81,20 +84,18 @@ public class MiBandPreferencesActivity extends AbstractSettingsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String[] getPreferenceKeysWithSummary() {
|
protected String[] getPreferenceKeysWithSummary() {
|
||||||
String[] strings1 = {
|
Set<String> prefKeys = new HashSet<>();
|
||||||
PREF_USER_ALIAS,
|
prefKeys.add(PREF_USER_ALIAS);
|
||||||
PREF_MIBAND_ADDRESS,
|
prefKeys.add(PREF_MIBAND_ADDRESS);
|
||||||
PREF_MIBAND_FITNESS_GOAL,
|
prefKeys.add(PREF_MIBAND_FITNESS_GOAL);
|
||||||
PREF_MIBAND_RESERVE_ALARM_FOR_CALENDAR,
|
prefKeys.add(PREF_MIBAND_RESERVE_ALARM_FOR_CALENDAR);
|
||||||
PREF_MIBAND_DEVICE_TIME_OFFSET_HOURS,
|
prefKeys.add(PREF_MIBAND_DEVICE_TIME_OFFSET_HOURS);
|
||||||
getNotificationPrefKey(VIBRATION_COUNT, ORIGIN_INCOMING_CALL)
|
prefKeys.add(getNotificationPrefKey(VIBRATION_COUNT, ORIGIN_INCOMING_CALL));
|
||||||
};
|
|
||||||
String[] strings2 = new String[NotificationType.values().length];
|
|
||||||
int i = 0;
|
|
||||||
for (NotificationType type : NotificationType.values()) {
|
for (NotificationType type : NotificationType.values()) {
|
||||||
strings2[i++] = type.getFixedValue();
|
prefKeys.add(type.getGenericType());
|
||||||
}
|
}
|
||||||
|
|
||||||
return org.apache.commons.lang3.ArrayUtils.addAll(strings1, strings2);
|
return prefKeys.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user