Loading src/com/android/alarmclock/DigitalWidgetViewsFactory.java +2 −6 Original line number Original line Diff line number Diff line Loading @@ -101,11 +101,7 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo clock.setString(clockId2, "setTimeZone", cityObj.mTimeZone); clock.setString(clockId2, "setTimeZone", cityObj.mTimeZone); // Home city or city not in DB , use data from the save selected cities list // Home city or city not in DB , use data from the save selected cities list if (cityObj.mCityId == null || cityInDb == null) { clock.setTextViewText(labelId, Utils.getCityName(cityObj, cityInDb)); clock.setTextViewText(labelId, cityObj.mCityName); }else { clock.setTextViewText(labelId, cityInDb.mCityName); } if (myDayOfWeek != cityDayOfWeek) { if (myDayOfWeek != cityDayOfWeek) { clock.setTextViewText(dayId, mContext.getString( clock.setTextViewText(dayId, mContext.getString( Loading src/com/android/deskclock/Utils.java +12 −8 Original line number Original line Diff line number Diff line Loading @@ -421,4 +421,8 @@ public class Utils { }); }); return tempList; return tempList; } } public static String getCityName(CityObj city, CityObj dbCity) { return (city.mCityId == null || dbCity == null) ? city.mCityName : dbCity.mCityName; } } } src/com/android/deskclock/worldclock/CitiesActivity.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -191,7 +191,8 @@ public class CitiesActivity extends Activity implements OnCheckedChangeListener, public int getSectionForPosition(int p) { public int getSectionForPosition(int p) { if (mSectionPositions != null) { if (mSectionPositions != null) { for (int i = 0; i < mSectionPositions.length - 1; i++) { for (int i = 0; i < mSectionPositions.length - 1; i++) { if (p >= (Integer)mSectionPositions[i] && p < (Integer)mSectionPositions[i + 1]) { if (p >= (Integer) mSectionPositions[i] && p < (Integer) mSectionPositions[i + 1]) { return i; return i; } } } } Loading src/com/android/deskclock/worldclock/WorldClockAdapter.java +4 −7 Original line number Original line Diff line number Diff line Loading @@ -239,11 +239,8 @@ public class WorldClockAdapter extends BaseAdapter { } } CityObj cityInDb = mCitiesDb.get(cityObj.mCityId); CityObj cityInDb = mCitiesDb.get(cityObj.mCityId); // Home city or city not in DB , use data from the save selected cities list // Home city or city not in DB , use data from the save selected cities list if (cityObj.mCityId == null || cityInDb == null) { name.setText(Utils.getCityName(cityObj, cityInDb)); name.setText(cityObj.mCityName); }else { name.setText(cityInDb.mCityName); } final Calendar now = Calendar.getInstance(); final Calendar now = Calendar.getInstance(); now.setTimeZone(TimeZone.getDefault()); now.setTimeZone(TimeZone.getDefault()); int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK); int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK); Loading Loading
src/com/android/alarmclock/DigitalWidgetViewsFactory.java +2 −6 Original line number Original line Diff line number Diff line Loading @@ -101,11 +101,7 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo clock.setString(clockId2, "setTimeZone", cityObj.mTimeZone); clock.setString(clockId2, "setTimeZone", cityObj.mTimeZone); // Home city or city not in DB , use data from the save selected cities list // Home city or city not in DB , use data from the save selected cities list if (cityObj.mCityId == null || cityInDb == null) { clock.setTextViewText(labelId, Utils.getCityName(cityObj, cityInDb)); clock.setTextViewText(labelId, cityObj.mCityName); }else { clock.setTextViewText(labelId, cityInDb.mCityName); } if (myDayOfWeek != cityDayOfWeek) { if (myDayOfWeek != cityDayOfWeek) { clock.setTextViewText(dayId, mContext.getString( clock.setTextViewText(dayId, mContext.getString( Loading
src/com/android/deskclock/Utils.java +12 −8 Original line number Original line Diff line number Diff line Loading @@ -421,4 +421,8 @@ public class Utils { }); }); return tempList; return tempList; } } public static String getCityName(CityObj city, CityObj dbCity) { return (city.mCityId == null || dbCity == null) ? city.mCityName : dbCity.mCityName; } } }
src/com/android/deskclock/worldclock/CitiesActivity.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -191,7 +191,8 @@ public class CitiesActivity extends Activity implements OnCheckedChangeListener, public int getSectionForPosition(int p) { public int getSectionForPosition(int p) { if (mSectionPositions != null) { if (mSectionPositions != null) { for (int i = 0; i < mSectionPositions.length - 1; i++) { for (int i = 0; i < mSectionPositions.length - 1; i++) { if (p >= (Integer)mSectionPositions[i] && p < (Integer)mSectionPositions[i + 1]) { if (p >= (Integer) mSectionPositions[i] && p < (Integer) mSectionPositions[i + 1]) { return i; return i; } } } } Loading
src/com/android/deskclock/worldclock/WorldClockAdapter.java +4 −7 Original line number Original line Diff line number Diff line Loading @@ -239,11 +239,8 @@ public class WorldClockAdapter extends BaseAdapter { } } CityObj cityInDb = mCitiesDb.get(cityObj.mCityId); CityObj cityInDb = mCitiesDb.get(cityObj.mCityId); // Home city or city not in DB , use data from the save selected cities list // Home city or city not in DB , use data from the save selected cities list if (cityObj.mCityId == null || cityInDb == null) { name.setText(Utils.getCityName(cityObj, cityInDb)); name.setText(cityObj.mCityName); }else { name.setText(cityInDb.mCityName); } final Calendar now = Calendar.getInstance(); final Calendar now = Calendar.getInstance(); now.setTimeZone(TimeZone.getDefault()); now.setTimeZone(TimeZone.getDefault()); int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK); int myDayOfWeek = now.get(Calendar.DAY_OF_WEEK); Loading