Skip to content

Commit 8d885d0

Browse files
authored
Merge pull request #85 from forrestguice/prep-release-0.3.0
Prep release 0.3.0
2 parents 5048096 + c055eb9 commit 8d885d0

20 files changed

+70
-70
lines changed

app/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ android
2121
applicationId "com.forrestguice.suntimeswidget"
2222
minSdkVersion 10
2323
targetSdkVersion 24
24-
versionCode 8
25-
versionName "0.2.3"
24+
versionCode 9
25+
versionName "0.3.0"
2626

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

4747
dependencies
48-
{
49-
compile 'com.android.support:design:24.2.1'
50-
compile 'com.android.support:appcompat-v7:24.2.1'
51-
compile 'com.github.forrestguice:sunrisesunsetlib-java:SunriseSunsetCalculator-1.2-p0-fixdst'
52-
compile 'com.github.caarmen.SunriseSunset:lib-sunrise-sunset:1.1.0'
53-
}
48+
{
49+
compile 'com.android.support:design:24.2.1'
50+
compile 'com.android.support:appcompat-v7:24.2.1'
51+
compile 'com.github.forrestguice:sunrisesunsetlib-java:SunriseSunsetCalculator-1.2-p0-fixdst'
52+
compile 'com.github.caarmen.SunriseSunset:lib-sunrise-sunset:1.1.0'
53+
}
5454

5555
configurations.all {
5656
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

app/src/main/java/com/forrestguice/suntimeswidget/AlarmDialog.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ public void onClick(DialogInterface dialog, int which)
150150
initViews(myParent, dialogContent);
151151
if (savedInstanceState != null)
152152
{
153-
Log.d("DEBUG", "AlarmDialog onCreate (restoreState)");
153+
//Log.d("DEBUG", "AlarmDialog onCreate (restoreState)");
154154
loadSettings(savedInstanceState);
155155

156156
} else {
157-
Log.d("DEBUG", "AlarmDialog onCreate (newState)");
157+
//Log.d("DEBUG", "AlarmDialog onCreate (newState)");
158158
loadSettings(myParent);
159159
}
160160
return dialog;
@@ -166,7 +166,7 @@ public void onClick(DialogInterface dialog, int which)
166166
@Override
167167
public void onSaveInstanceState( Bundle outState )
168168
{
169-
Log.d("DEBUG", "AlarmDialog onSaveInstanceState");
169+
//Log.d("DEBUG", "AlarmDialog onSaveInstanceState");
170170
saveSettings(outState);
171171
super.onSaveInstanceState(outState);
172172
}

app/src/main/java/com/forrestguice/suntimeswidget/HelpDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState)
7373
initViews(dialogContent);
7474
if (savedInstanceState != null)
7575
{
76-
Log.d("DEBUG", "HelpDialog onCreate (restoreState)");
76+
//Log.d("DEBUG", "HelpDialog onCreate (restoreState)");
7777
rawContent = savedInstanceState.getString(KEY_HELPTEXT);
7878
}
7979
setContent(rawContent);
@@ -92,7 +92,7 @@ public void initViews(View dialogView)
9292
@Override
9393
public void onSaveInstanceState( Bundle outState )
9494
{
95-
Log.d("DEBUG", "HelpDialog onSaveInstanceState");
95+
//Log.d("DEBUG", "HelpDialog onSaveInstanceState");
9696
outState.putString(KEY_HELPTEXT, rawContent);
9797
super.onSaveInstanceState(outState);
9898
}

app/src/main/java/com/forrestguice/suntimeswidget/LightMapView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ private void drawPoint( Calendar calendar, int radius, Canvas c, Paint p )
315315
*/
316316
protected void loadSettings(Context context)
317317
{
318-
Log.d("DEBUG", "LightMapView loadSettings (prefs)");
318+
//Log.d("DEBUG", "LightMapView loadSettings (prefs)");
319319
if (isInEditMode())
320320
return;
321321
}
@@ -325,15 +325,15 @@ protected void loadSettings(Context context)
325325
*/
326326
protected void loadSettings(Context context, Bundle bundle )
327327
{
328-
Log.d("DEBUG", "LightMapView loadSettings (bundle)");
328+
//Log.d("DEBUG", "LightMapView loadSettings (bundle)");
329329
}
330330

331331
/**
332332
*
333333
*/
334334
protected boolean saveSettings(Context context)
335335
{
336-
Log.d("DEBUG", "LightMap loadSettings (prefs)");
336+
//Log.d("DEBUG", "LightMap loadSettings (prefs)");
337337
return false;
338338
}
339339

@@ -343,7 +343,7 @@ protected boolean saveSettings(Context context)
343343
*/
344344
protected boolean saveSettings(Bundle bundle)
345345
{
346-
Log.d("DEBUG", "LightMapView saveSettings (bundle)");
346+
//Log.d("DEBUG", "LightMapView saveSettings (bundle)");
347347
return true;
348348
}
349349

app/src/main/java/com/forrestguice/suntimeswidget/LocationConfigDialog.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public void onClick(View view)
217217
@Override
218218
public void onSaveInstanceState( Bundle outState )
219219
{
220-
Log.d("DEBUG", "LocationConfigDialog onSaveInstanceState");
220+
//Log.d("DEBUG", "LocationConfigDialog onSaveInstanceState");
221221
saveSettings(outState);
222222
super.onSaveInstanceState(outState);
223223
}
@@ -227,7 +227,7 @@ public void onSaveInstanceState( Bundle outState )
227227
*/
228228
protected void saveSettings(Bundle bundle)
229229
{
230-
Log.d("DEBUG", "LocationConfigDialog saveSettings (bundle)");
230+
//Log.d("DEBUG", "LocationConfigDialog saveSettings (bundle)");
231231
bundle.putBoolean(KEY_LOCATION_HIDETITLE, hideTitle);
232232
if (dialogContent != null)
233233
{
@@ -240,7 +240,7 @@ protected void saveSettings(Bundle bundle)
240240
*/
241241
protected void loadSettings(Bundle bundle)
242242
{
243-
Log.d("DEBUG", "LocationConfigDialog loadSettings (bundle)");
243+
//Log.d("DEBUG", "LocationConfigDialog loadSettings (bundle)");
244244
hideTitle = bundle.getBoolean(KEY_LOCATION_HIDETITLE);
245245
setHideTitle(hideTitle);
246246

app/src/main/java/com/forrestguice/suntimeswidget/LocationConfigView.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public LocationViewMode getMode()
179179
}
180180
public void setMode( LocationViewMode mode )
181181
{
182-
Log.d("DEBUG", "LocationViewMode setMode " + mode.name());
182+
//Log.d("DEBUG", "LocationViewMode setMode " + mode.name());
183183
FrameLayout autoButtonLayout = (FrameLayout)findViewById(R.id.appwidget_location_auto_layout);
184184

185185
if (this.mode != mode)
@@ -286,7 +286,7 @@ public void setMode( LocationViewMode mode )
286286
*/
287287
protected void initViews( Context context )
288288
{
289-
Log.d("DEBUG", "LocationConfigView initViews");
289+
//Log.d("DEBUG", "LocationConfigView initViews");
290290
WidgetSettings.initDisplayStrings(context);
291291

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

398398
public void onResume()
399399
{
400-
Log.d("DEBUG", "LocationConfigView onResume");
400+
//Log.d("DEBUG", "LocationConfigView onResume");
401401
updateGPSButtonIcons();
402402
getFixHelper.onResume();
403403
}
@@ -417,7 +417,7 @@ private void updateViews(WidgetSettings.Location location)
417417
*/
418418
protected void loadSettings(Context context)
419419
{
420-
Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");
420+
//Log.d("DEBUG", "LocationConfigView loadSettings (prefs)");
421421
if (isInEditMode())
422422
return;
423423

@@ -438,7 +438,7 @@ protected void loadSettings(Context context)
438438
*/
439439
protected void loadSettings(Context context, Bundle bundle )
440440
{
441-
Log.d("DEBUG", "LocationConfigView loadSettings (bundle)");
441+
//Log.d("DEBUG", "LocationConfigView loadSettings (bundle)");
442442

443443
// restore LocationMode spinner
444444
String modeString = bundle.getString(KEY_LOCATION_MODE);
@@ -479,7 +479,7 @@ protected void loadSettings(Context context, Bundle bundle )
479479
try {
480480
viewMode = LocationViewMode.valueOf(viewModeString);
481481
} catch (IllegalArgumentException e) {
482-
Log.d("DEBUG", "Bundle contained bad viewModeString! " + e.toString());
482+
Log.w("DEBUG", "Bundle contained bad viewModeString! " + e.toString());
483483
viewMode = LocationViewMode.MODE_CUSTOM_SELECT;
484484
}
485485
setMode(viewMode);
@@ -494,7 +494,7 @@ protected void loadSettings(Context context, Bundle bundle )
494494
*/
495495
protected void loadSettings(Context context, Uri data )
496496
{
497-
Log.d("DEBUG", "LocationConfigView loadSettings (uri)");
497+
//Log.d("DEBUG", "LocationConfigView loadSettings (uri)");
498498
loadSettings(context, bundleData(data, context.getString(R.string.gps_lastfix_title_set)));
499499
}
500500

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

508508
WidgetSettings.LocationMode locationMode = getLocationMode();
509509
WidgetSettings.saveLocationModePref(context, appWidgetId, locationMode);
@@ -526,7 +526,7 @@ protected boolean saveSettings(Context context)
526526
*/
527527
protected boolean saveSettings(Bundle bundle)
528528
{
529-
Log.d("DEBUG", "LocationConfigView saveSettings (bundle)");
529+
//Log.d("DEBUG", "LocationConfigView saveSettings (bundle)");
530530

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

783783
LocationViewMode dialogMode;
784784
if (locationMode == WidgetSettings.LocationMode.CUSTOM_LOCATION)

app/src/main/java/com/forrestguice/suntimeswidget/SuntimesActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,38 +270,38 @@ public void onResume()
270270
{
271271
timezoneDialog.setOnAcceptedListener(onConfigTimeZone);
272272
timezoneDialog.setOnCanceledListener(onCancelTimeZone);
273-
Log.d("DEBUG", "TimeZoneDialog listeners restored.");
273+
//Log.d("DEBUG", "TimeZoneDialog listeners restored.");
274274
}
275275

276276
AlarmDialog alarmDialog = (AlarmDialog) fragments.findFragmentByTag(DIALOGTAG_ALARM);
277277
if (alarmDialog != null)
278278
{
279279
alarmDialog.setData(dataset);
280280
alarmDialog.setOnAcceptedListener(alarmDialog.scheduleAlarmClickListener);
281-
Log.d("DEBUG", "AlarmDialog listeners restored.");
281+
//Log.d("DEBUG", "AlarmDialog listeners restored.");
282282
}
283283

284284
LocationConfigDialog locationDialog = (LocationConfigDialog) fragments.findFragmentByTag(DIALOGTAG_LOCATION);
285285
if (locationDialog != null)
286286
{
287287
locationDialog.setOnAcceptedListener( onConfigLocation(locationDialog) );
288-
Log.d("DEBUG", "LocationDialog listeners restored.");
288+
//Log.d("DEBUG", "LocationDialog listeners restored.");
289289
}
290290

291291
TimeDateDialog dateDialog = (TimeDateDialog) fragments.findFragmentByTag(DIALOGTAG_DATE);
292292
if (dateDialog != null)
293293
{
294294
dateDialog.setOnAcceptedListener(onConfigDate);
295295
dateDialog.setOnCanceledListener(onCancelDate);
296-
Log.d("DEBUG", "TimeDateDialog listeners restored.");
296+
//Log.d("DEBUG", "TimeDateDialog listeners restored.");
297297
}
298298

299299
LightMapDialog lightMapDialog = (LightMapDialog) fragments.findFragmentByTag(DIALOGTAG_LIGHTMAP);
300300
if (lightMapDialog != null)
301301
{
302302
lightMapDialog.setData(dataset);
303303
lightMapDialog.updateViews(dataset);
304-
Log.d("DEBUG", "LightMapDialog updated on restore.");
304+
//Log.d("DEBUG", "LightMapDialog updated on restore.");
305305
}
306306
}
307307

@@ -1341,7 +1341,7 @@ public void run()
13411341
protected void updateTimeViews(Context context)
13421342
{
13431343
Calendar now = dataset.now();
1344-
Log.d("DEBUG", "" + now.getTimeZone());
1344+
//Log.d("DEBUG", "" + now.getTimeZone());
13451345
SuntimesUtils.TimeDisplayText timeText = utils.calendarTimeShortDisplayString(this, now);
13461346
txt_time.setText(timeText.getValue());
13471347
txt_time_suffix.setText(timeText.getSuffix());
@@ -1701,7 +1701,7 @@ private View.OnClickListener createTimeFieldClickListener( final SolarEvents.Sol
17011701
@Override
17021702
public void onClick(View view)
17031703
{
1704-
Log.d("DEBUG", "TimeField clicked: " + event.toString());
1704+
//Log.d("DEBUG", "TimeField clicked: " + event.toString());
17051705
notes.showNote(event);
17061706
}
17071707
};

app/src/main/java/com/forrestguice/suntimeswidget/SuntimesConfigActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,13 @@ protected void saveAppearanceSettings(Context context)
597597
final WidgetSettings.WidgetMode1x1[] modes = WidgetSettings.WidgetMode1x1.values();
598598
WidgetSettings.WidgetMode1x1 mode = modes[ spinner_1x1mode.getSelectedItemPosition() ];
599599
WidgetSettings.save1x1ModePref(context, appWidgetId, mode);
600-
Log.d("DEBUG", "Saved mode: " + mode.name());
600+
//Log.d("DEBUG", "Saved mode: " + mode.name());
601601

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

608608
// save: allow resize
609609
boolean allowResize = checkbox_allowResize.isChecked();

app/src/main/java/com/forrestguice/suntimeswidget/SuntimesSettingsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
213213
{
214214
if (key.equals(AppSettings.PREF_KEY_LOCALE) || key.equals(AppSettings.PREF_KEY_LOCALE_MODE))
215215
{
216-
Log.d("SettingsActivity", "Locale change detected; restarting activity");
216+
//Log.d("SettingsActivity", "Locale change detected; restarting activity");
217217
AppSettings.initLocale(this);
218218
SuntimesWidget.triggerWidgetUpdate(this, SuntimesWidget.class);
219219
SuntimesWidget.triggerWidgetUpdate(this, SuntimesWidget1.class);

app/src/main/java/com/forrestguice/suntimeswidget/TimeDateDialog.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ public void onClick(DialogInterface dialog, int which)
188188
initViews(myParent, dialogContent);
189189
if (savedInstanceState != null)
190190
{
191-
Log.d("DEBUG", "TimeDateDialog onCreate (restoreState)");
191+
//Log.d("DEBUG", "TimeDateDialog onCreate (restoreState)");
192192
loadSettings(savedInstanceState);
193193

194194
} else {
195195
// no saved dialog state; load from preferences
196-
Log.d("DEBUG", "TimeDateDialog onCreate (newState)");
196+
//Log.d("DEBUG", "TimeDateDialog onCreate (newState)");
197197
loadSettings(myParent);
198198
}
199199

@@ -208,7 +208,7 @@ public void onClick(DialogInterface dialog, int which)
208208
@Override
209209
public void onSaveInstanceState( Bundle outState )
210210
{
211-
Log.d("DEBUG", "TimeDateDialog onSaveInstanceState");
211+
//Log.d("DEBUG", "TimeDateDialog onSaveInstanceState");
212212
saveSettings(outState);
213213
super.onSaveInstanceState(outState);
214214
}

0 commit comments

Comments
 (0)