removed trailing spaces

This commit is contained in:
Ronald Schaten 2011-06-22 07:49:58 +02:00
parent e336b8edee
commit 11a9a15329

View File

@ -31,9 +31,9 @@ import de.schatenseite.android.datepreference.DatePreference;
public class WaldemarWidget extends AppWidgetProvider { public class WaldemarWidget extends AppWidgetProvider {
private static final String PREFIX = WaldemarWidget.class.getPackage().getName() + "."; private static final String PREFIX = WaldemarWidget.class.getPackage().getName() + ".";
public static final String MIDNIGHTLY_WIDGET_UPDATE = PREFIX + "MIDNIGHTLY_WIDGET_UPDATE"; public static final String MIDNIGHTLY_WIDGET_UPDATE = PREFIX + "MIDNIGHTLY_WIDGET_UPDATE";
private static final double SECONDS_PER_DAY = 24 * 60 * 60; private static final double SECONDS_PER_DAY = 24 * 60 * 60;
private static final double MILLISECONDS_PER_DAY = SECONDS_PER_DAY * 1000; private static final double MILLISECONDS_PER_DAY = SECONDS_PER_DAY * 1000;
private static final int CURRENTLY_NOT_USED_REQUEST_CODE = 0; private static final int CURRENTLY_NOT_USED_REQUEST_CODE = 0;
private static final int SUSPICIOUS_FLAGS = 0; private static final int SUSPICIOUS_FLAGS = 0;
private static final boolean DEBUG = false; private static final boolean DEBUG = false;
static AlarmManager myAlarmManager; static AlarmManager myAlarmManager;
@ -113,14 +113,14 @@ public class WaldemarWidget extends AppWidgetProvider {
Integer mode = Integer.valueOf(prefs.getString("pref_mode", "1")); Integer mode = Integer.valueOf(prefs.getString("pref_mode", "1"));
Calendar calStart = DatePreference.getDateFor(PreferenceManager.getDefaultSharedPreferences(context), "pref_dateStart"); Calendar calStart = DatePreference.getDateFor(PreferenceManager.getDefaultSharedPreferences(context), "pref_dateStart");
long timeStart = calStart.getTimeInMillis(); long timeStart = calStart.getTimeInMillis();
Integer duration = Integer.parseInt(prefs.getString("pref_duration", context.getString(R.string.duration_default))); Integer duration = Integer.parseInt(prefs.getString("pref_duration", context.getString(R.string.duration_default)));
Calendar calThen = DatePreference.getDateFor(PreferenceManager.getDefaultSharedPreferences(context), "pref_dateThen"); Calendar calThen = DatePreference.getDateFor(PreferenceManager.getDefaultSharedPreferences(context), "pref_dateThen");
long timeThen = calThen.getTimeInMillis(); long timeThen = calThen.getTimeInMillis();
switch (mode) { switch (mode) {
case MODE_TIMETHEN: case MODE_TIMETHEN:
remoteViews.setViewVisibility(R.id.progressBarFrame, View.GONE); remoteViews.setViewVisibility(R.id.progressBarFrame, View.GONE);
@ -151,7 +151,7 @@ public class WaldemarWidget extends AppWidgetProvider {
remoteViews.setTextColor(R.id.days, daycountColor); remoteViews.setTextColor(R.id.days, daycountColor);
Integer percent = (int)(((double)(duration - days) / (double)duration)*100); Integer percent = (int)(((double)(duration - days) / (double)duration)*100);
String status = String.valueOf(duration - days)+"/"+String.valueOf(duration)+", "+String.valueOf(percent)+"%"; String status = String.valueOf(duration - days)+"/"+String.valueOf(duration)+", "+String.valueOf(percent)+"%";
if (mode == MODE_TIMETHEN) { if (mode == MODE_TIMETHEN) {
duration = days; duration = days;
@ -174,4 +174,4 @@ public class WaldemarWidget extends AppWidgetProvider {
myAlarmManager = alarmManager; myAlarmManager = alarmManager;
myPendingIntent = pendingIntent; myPendingIntent = pendingIntent;
} }
} }