Skip to content

Commit

Permalink
Merge pull request #85 from forrestguice/prep-release-0.3.0
Browse files Browse the repository at this point in the history
Prep release 0.3.0
  • Loading branch information
forrestguice authored Feb 23, 2017
2 parents 5048096 + c055eb9 commit 8d885d0
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 70 deletions.
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android
applicationId "com.forrestguice.suntimeswidget"
minSdkVersion 10
targetSdkVersion 24
versionCode 8
versionName "0.2.3"
versionCode 9
versionName "0.3.0"

buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + getDateAsMillis() + "L)"
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
Expand All @@ -45,12 +45,12 @@ android
}

dependencies
{
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.github.forrestguice:sunrisesunsetlib-java:SunriseSunsetCalculator-1.2-p0-fixdst'
compile 'com.github.caarmen.SunriseSunset:lib-sunrise-sunset:1.1.0'
}
{
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.github.forrestguice:sunrisesunsetlib-java:SunriseSunsetCalculator-1.2-p0-fixdst'
compile 'com.github.caarmen.SunriseSunset:lib-sunrise-sunset:1.1.0'
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ public void onClick(DialogInterface dialog, int which)
initViews(myParent, dialogContent);
if (savedInstanceState != null)
{
Log.d("DEBUG", "AlarmDialog onCreate (restoreState)");
//Log.d("DEBUG", "AlarmDialog onCreate (restoreState)");
loadSettings(savedInstanceState);

} else {
Log.d("DEBUG", "AlarmDialog onCreate (newState)");
//Log.d("DEBUG", "AlarmDialog onCreate (newState)");
loadSettings(myParent);
}
return dialog;
Expand All @@ -166,7 +166,7 @@ public void onClick(DialogInterface dialog, int which)
@Override
public void onSaveInstanceState( Bundle outState )
{
Log.d("DEBUG", "AlarmDialog onSaveInstanceState");
//Log.d("DEBUG", "AlarmDialog onSaveInstanceState");
saveSettings(outState);
super.onSaveInstanceState(outState);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState)
initViews(dialogContent);
if (savedInstanceState != null)
{
Log.d("DEBUG", "HelpDialog onCreate (restoreState)");
//Log.d("DEBUG", "HelpDialog onCreate (restoreState)");
rawContent = savedInstanceState.getString(KEY_HELPTEXT);
}
setContent(rawContent);
Expand All @@ -92,7 +92,7 @@ public void initViews(View dialogView)
@Override
public void onSaveInstanceState( Bundle outState )
{
Log.d("DEBUG", "HelpDialog onSaveInstanceState");
//Log.d("DEBUG", "HelpDialog onSaveInstanceState");
outState.putString(KEY_HELPTEXT, rawContent);
super.onSaveInstanceState(outState);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private void drawPoint( Calendar calendar, int radius, Canvas c, Paint p )
*/
protected void loadSettings(Context context)
{
Log.d("DEBUG", "LightMapView loadSettings (prefs)");
//Log.d("DEBUG", "LightMapView loadSettings (prefs)");
if (isInEditMode())
return;
}
Expand All @@ -325,15 +325,15 @@ protected void loadSettings(Context context)
*/
protected void loadSettings(Context context, Bundle bundle )
{
Log.d("DEBUG", "LightMapView loadSettings (bundle)");
//Log.d("DEBUG", "LightMapView loadSettings (bundle)");
}

/**
*
*/
protected boolean saveSettings(Context context)
{
Log.d("DEBUG", "LightMap loadSettings (prefs)");
//Log.d("DEBUG", "LightMap loadSettings (prefs)");
return false;
}

Expand All @@ -343,7 +343,7 @@ protected boolean saveSettings(Context context)
*/
protected boolean saveSettings(Bundle bundle)
{
Log.d("DEBUG", "LightMapView saveSettings (bundle)");
//Log.d("DEBUG", "LightMapView saveSettings (bundle)");
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void onClick(View view)
@Override
public void onSaveInstanceState( Bundle outState )
{
Log.d("DEBUG", "LocationConfigDialog onSaveInstanceState");
//Log.d("DEBUG", "LocationConfigDialog onSaveInstanceState");
saveSettings(outState);
super.onSaveInstanceState(outState);
}
Expand All @@ -227,7 +227,7 @@ public void onSaveInstanceState( Bundle outState )
*/
protected void saveSettings(Bundle bundle)
{
Log.d("DEBUG", "LocationConfigDialog saveSettings (bundle)");
//Log.d("DEBUG", "LocationConfigDialog saveSettings (bundle)");
bundle.putBoolean(KEY_LOCATION_HIDETITLE, hideTitle);
if (dialogContent != null)
{
Expand All @@ -240,7 +240,7 @@ protected void saveSettings(Bundle bundle)
*/
protected void loadSettings(Bundle bundle)
{
Log.d("DEBUG", "LocationConfigDialog loadSettings (bundle)");
//Log.d("DEBUG", "LocationConfigDialog loadSettings (bundle)");
hideTitle = bundle.getBoolean(KEY_LOCATION_HIDETITLE);
setHideTitle(hideTitle);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public LocationViewMode getMode()
}
public void setMode( LocationViewMode mode )
{
Log.d("DEBUG", "LocationViewMode setMode " + mode.name());
//Log.d("DEBUG", "LocationViewMode setMode " + mode.name());
FrameLayout autoButtonLayout = (FrameLayout)findViewById(R.id.appwidget_location_auto_layout);

if (this.mode != mode)
Expand Down Expand Up @@ -286,7 +286,7 @@ public void setMode( LocationViewMode mode )
*/
protected void initViews( Context context )
{
Log.d("DEBUG", "LocationConfigView initViews");
//Log.d("DEBUG", "LocationConfigView initViews");
WidgetSettings.initDisplayStrings(context);

flipper = (ViewFlipper)findViewById(R.id.view_flip);
Expand Down Expand Up @@ -397,7 +397,7 @@ public void updateGPSButtonIcons()

public void onResume()
{
Log.d("DEBUG", "LocationConfigView onResume");
//Log.d("DEBUG", "LocationConfigView onResume");
updateGPSButtonIcons();
getFixHelper.onResume();
}
Expand All @@ -417,7 +417,7 @@ private void updateViews(WidgetSettings.Location location)
*/
protected void loadSettings(Context context)
{
Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");
//Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");
if (isInEditMode())
return;

Expand All @@ -438,7 +438,7 @@ protected void loadSettings(Context context)
*/
protected void loadSettings(Context context, Bundle bundle )
{
Log.d("DEBUG", "LocationConfigView loadSettings (bundle)");
//Log.d("DEBUG", "LocationConfigView loadSettings (bundle)");

// restore LocationMode spinner
String modeString = bundle.getString(KEY_LOCATION_MODE);
Expand Down Expand Up @@ -479,7 +479,7 @@ protected void loadSettings(Context context, Bundle bundle )
try {
viewMode = LocationViewMode.valueOf(viewModeString);
} catch (IllegalArgumentException e) {
Log.d("DEBUG", "Bundle contained bad viewModeString! " + e.toString());
Log.w("DEBUG", "Bundle contained bad viewModeString! " + e.toString());
viewMode = LocationViewMode.MODE_CUSTOM_SELECT;
}
setMode(viewMode);
Expand All @@ -494,7 +494,7 @@ protected void loadSettings(Context context, Bundle bundle )
*/
protected void loadSettings(Context context, Uri data )
{
Log.d("DEBUG", "LocationConfigView loadSettings (uri)");
//Log.d("DEBUG", "LocationConfigView loadSettings (uri)");
loadSettings(context, bundleData(data, context.getString(R.string.gps_lastfix_title_set)));
}

Expand All @@ -503,7 +503,7 @@ protected void loadSettings(Context context, Uri data )
*/
protected boolean saveSettings(Context context)
{
Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");
//Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");

WidgetSettings.LocationMode locationMode = getLocationMode();
WidgetSettings.saveLocationModePref(context, appWidgetId, locationMode);
Expand All @@ -526,7 +526,7 @@ protected boolean saveSettings(Context context)
*/
protected boolean saveSettings(Bundle bundle)
{
Log.d("DEBUG", "LocationConfigView saveSettings (bundle)");
//Log.d("DEBUG", "LocationConfigView saveSettings (bundle)");

WidgetSettings.LocationMode locationMode = getLocationMode();
String latitude = text_locationLat.getText().toString();
Expand Down Expand Up @@ -778,7 +778,7 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
{
final WidgetSettings.LocationMode[] locationModes = WidgetSettings.LocationMode.values();
WidgetSettings.LocationMode locationMode = locationModes[parent.getSelectedItemPosition()];
Log.d("DEBUG", "onLocationModeSelected " + locationMode.name());
//Log.d("DEBUG", "onLocationModeSelected " + locationMode.name());

LocationViewMode dialogMode;
if (locationMode == WidgetSettings.LocationMode.CUSTOM_LOCATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,38 +270,38 @@ public void onResume()
{
timezoneDialog.setOnAcceptedListener(onConfigTimeZone);
timezoneDialog.setOnCanceledListener(onCancelTimeZone);
Log.d("DEBUG", "TimeZoneDialog listeners restored.");
//Log.d("DEBUG", "TimeZoneDialog listeners restored.");
}

AlarmDialog alarmDialog = (AlarmDialog) fragments.findFragmentByTag(DIALOGTAG_ALARM);
if (alarmDialog != null)
{
alarmDialog.setData(dataset);
alarmDialog.setOnAcceptedListener(alarmDialog.scheduleAlarmClickListener);
Log.d("DEBUG", "AlarmDialog listeners restored.");
//Log.d("DEBUG", "AlarmDialog listeners restored.");
}

LocationConfigDialog locationDialog = (LocationConfigDialog) fragments.findFragmentByTag(DIALOGTAG_LOCATION);
if (locationDialog != null)
{
locationDialog.setOnAcceptedListener( onConfigLocation(locationDialog) );
Log.d("DEBUG", "LocationDialog listeners restored.");
//Log.d("DEBUG", "LocationDialog listeners restored.");
}

TimeDateDialog dateDialog = (TimeDateDialog) fragments.findFragmentByTag(DIALOGTAG_DATE);
if (dateDialog != null)
{
dateDialog.setOnAcceptedListener(onConfigDate);
dateDialog.setOnCanceledListener(onCancelDate);
Log.d("DEBUG", "TimeDateDialog listeners restored.");
//Log.d("DEBUG", "TimeDateDialog listeners restored.");
}

LightMapDialog lightMapDialog = (LightMapDialog) fragments.findFragmentByTag(DIALOGTAG_LIGHTMAP);
if (lightMapDialog != null)
{
lightMapDialog.setData(dataset);
lightMapDialog.updateViews(dataset);
Log.d("DEBUG", "LightMapDialog updated on restore.");
//Log.d("DEBUG", "LightMapDialog updated on restore.");
}
}

Expand Down Expand Up @@ -1341,7 +1341,7 @@ public void run()
protected void updateTimeViews(Context context)
{
Calendar now = dataset.now();
Log.d("DEBUG", "" + now.getTimeZone());
//Log.d("DEBUG", "" + now.getTimeZone());
SuntimesUtils.TimeDisplayText timeText = utils.calendarTimeShortDisplayString(this, now);
txt_time.setText(timeText.getValue());
txt_time_suffix.setText(timeText.getSuffix());
Expand Down Expand Up @@ -1701,7 +1701,7 @@ private View.OnClickListener createTimeFieldClickListener( final SolarEvents.Sol
@Override
public void onClick(View view)
{
Log.d("DEBUG", "TimeField clicked: " + event.toString());
//Log.d("DEBUG", "TimeField clicked: " + event.toString());
notes.showNote(event);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,13 @@ protected void saveAppearanceSettings(Context context)
final WidgetSettings.WidgetMode1x1[] modes = WidgetSettings.WidgetMode1x1.values();
WidgetSettings.WidgetMode1x1 mode = modes[ spinner_1x1mode.getSelectedItemPosition() ];
WidgetSettings.save1x1ModePref(context, appWidgetId, mode);
Log.d("DEBUG", "Saved mode: " + mode.name());
//Log.d("DEBUG", "Saved mode: " + mode.name());

// save: theme
final ThemeDescriptor[] themes = WidgetThemes.values();
ThemeDescriptor theme = themes[ spinner_theme.getSelectedItemPosition() ];
WidgetSettings.saveThemePref(context, appWidgetId, theme.name());
Log.d("DEBUG", "Saved theme: " + theme.name());
//Log.d("DEBUG", "Saved theme: " + theme.name());

// save: allow resize
boolean allowResize = checkbox_allowResize.isChecked();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
{
if (key.equals(AppSettings.PREF_KEY_LOCALE) || key.equals(AppSettings.PREF_KEY_LOCALE_MODE))
{
Log.d("SettingsActivity", "Locale change detected; restarting activity");
//Log.d("SettingsActivity", "Locale change detected; restarting activity");
AppSettings.initLocale(this);
SuntimesWidget.triggerWidgetUpdate(this, SuntimesWidget.class);
SuntimesWidget.triggerWidgetUpdate(this, SuntimesWidget1.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ public void onClick(DialogInterface dialog, int which)
initViews(myParent, dialogContent);
if (savedInstanceState != null)
{
Log.d("DEBUG", "TimeDateDialog onCreate (restoreState)");
//Log.d("DEBUG", "TimeDateDialog onCreate (restoreState)");
loadSettings(savedInstanceState);

} else {
// no saved dialog state; load from preferences
Log.d("DEBUG", "TimeDateDialog onCreate (newState)");
//Log.d("DEBUG", "TimeDateDialog onCreate (newState)");
loadSettings(myParent);
}

Expand All @@ -208,7 +208,7 @@ public void onClick(DialogInterface dialog, int which)
@Override
public void onSaveInstanceState( Bundle outState )
{
Log.d("DEBUG", "TimeDateDialog onSaveInstanceState");
//Log.d("DEBUG", "TimeDateDialog onSaveInstanceState");
saveSettings(outState);
super.onSaveInstanceState(outState);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ protected void onPostExecute(WidgetTimezones.TimeZoneItemAdapter result)
if (savedInstanceState != null)
{
// saved dialog state; restore it
Log.d("DEBUG", "TimeZoneDialog onCreate (restoreState)");
//Log.d("DEBUG", "TimeZoneDialog onCreate (restoreState)");
loadSettings(savedInstanceState);

} else {
// no saved dialog state; load from preferences
Log.d("DEBUG", "TimeZoneDialog onCreate (newState)");
//Log.d("DEBUG", "TimeZoneDialog onCreate (newState)");
loadSettings(myParent);
}
loadTask.execute(sortZonesBy);
Expand All @@ -176,7 +176,7 @@ protected void onPostExecute(WidgetTimezones.TimeZoneItemAdapter result)
@Override
public void onSaveInstanceState(Bundle outState)
{
Log.d("DEBUG", "TimeZoneDialog onSaveInstanceState");
//Log.d("DEBUG", "TimeZoneDialog onSaveInstanceState");
saveSettings(outState);
super.onSaveInstanceState(outState);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void initCalculators()
SuntimesCalculatorDescriptor.addValue(com.forrestguice.suntimeswidget.calculator.sunrisesunset_java.SunriseSunsetSuntimesCalculator.getDescriptor());
SuntimesCalculatorDescriptor.addValue(com.forrestguice.suntimeswidget.calculator.ca.rmen.sunrisesunset.SunriseSunsetSuntimesCalculator.getDescriptor());
initialized = true;
Log.d("CalculatorFactory", "Initialized suntimes calculator list.");
//Log.d("CalculatorFactory", "Initialized suntimes calculator list.");
}

private SuntimesCalculatorDescriptor current;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public class ClearPlacesTask extends AsyncTask<Object, Object, Boolean>
public void pauseTask()
{
isPaused = true;
Log.d("DEBUG", "ClearPlacesTask paused");
//Log.d("DEBUG", "ClearPlacesTask paused");
}
public void resumeTask()
{
isPaused = false;
Log.d("DEBUG", "ClearPlacesTask resumed");
//Log.d("DEBUG", "ClearPlacesTask resumed");
}
public boolean isPaused()
{
Expand Down
Loading

0 comments on commit 8d885d0

Please sign in to comment.