- AltosHashSet[] sets = AltosHashSet.array(backend.getString(frequenciesPreference,null));
- if (sets != null) {
- ArrayList<AltosFrequency> freqs = new ArrayList<AltosFrequency>();
-
- for (int i = 0; i < sets.length; i++) {
- AltosFrequency f = AltosFrequency.fromHashSet(sets[i], null);
- if (f != null)
- freqs.add(f);
- }
- frequencies = freqs.toArray(new AltosFrequency[0]);
+ try {
+ AltosJson json = AltosJson.fromString(backend.getString(frequenciesPreference,
+ null));
+ frequencies = (AltosFrequency[]) json.make(frequencies.getClass());
+ } catch (Exception e) {