Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53f1e59a authored by Isaac Katzenelson's avatar Isaac Katzenelson Committed by Android Git Automerger
Browse files

am 3f658977: Code formatting fixes.

* commit '3f658977':
  Code formatting fixes.
parents 46b6536b 3f658977
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -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(
+12 −8
Original line number Original line Diff line number Diff line
@@ -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;
    }
}
}
+3 −2
Original line number Original line Diff line number Diff line
@@ -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;
                    }
                    }
                }
                }
+4 −7
Original line number Original line Diff line number Diff line
@@ -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);