Modifications for changes to SettingsLib
See associated changes in frameworks/base for details. Bug: 19058953 Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2132 Change-Id: Ic3393df28dd63ca75b203d1d0430d69cab7c40de
This commit is contained in:
@@ -165,7 +165,7 @@ public class DateTimeSettings extends SettingsPreferenceFragment
|
||||
Date dummyDate = mDummyDate.getTime();
|
||||
mDatePref.setSummary(DateFormat.getLongDateFormat(context).format(now.getTime()));
|
||||
mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
|
||||
mTimeZone.setSummary(ZoneGetter.getTimeZoneText(now.getTimeZone(), true));
|
||||
mTimeZone.setSummary(ZoneGetter.getTimeZoneOffsetAndName(now.getTimeZone(), now.getTime()));
|
||||
mTime24Pref.setSummary(DateFormat.getTimeFormat(getActivity()).format(dummyDate));
|
||||
}
|
||||
|
||||
|
@@ -87,8 +87,7 @@ public class ZonePicker extends ListFragment {
|
||||
|
||||
final String sortKey = (sortedByName ? ZoneGetter.KEY_DISPLAYNAME : ZoneGetter.KEY_OFFSET);
|
||||
final MyComparator comparator = new MyComparator(sortKey);
|
||||
final ZoneGetter zoneGetter = new ZoneGetter();
|
||||
final List<HashMap<String, Object>> sortedList = zoneGetter.getZones(context);
|
||||
final List<Map<String, Object>> sortedList = ZoneGetter.getZonesList(context);
|
||||
Collections.sort(sortedList, comparator);
|
||||
final SimpleAdapter adapter = new SimpleAdapter(context,
|
||||
sortedList,
|
||||
@@ -226,7 +225,7 @@ public class ZonePicker extends ListFragment {
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyComparator implements Comparator<HashMap<?, ?>> {
|
||||
private static class MyComparator implements Comparator<Map<?, ?>> {
|
||||
private String mSortingKey;
|
||||
|
||||
public MyComparator(String sortingKey) {
|
||||
@@ -237,7 +236,7 @@ public class ZonePicker extends ListFragment {
|
||||
mSortingKey = sortingKey;
|
||||
}
|
||||
|
||||
public int compare(HashMap<?, ?> map1, HashMap<?, ?> map2) {
|
||||
public int compare(Map<?, ?> map1, Map<?, ?> map2) {
|
||||
Object value1 = map1.get(mSortingKey);
|
||||
Object value2 = map2.get(mSortingKey);
|
||||
|
||||
|
Reference in New Issue
Block a user