Skip to content

Commit

Permalink
Update checker was crashing on boot - fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yeriomin committed Feb 24, 2017
1 parent 5d15578 commit e90153c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public void onReceive(Context context, Intent intent) {

private int getUpdateInterval(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getInt(PreferenceActivity.PREFERENCE_BACKGROUND_UPDATE_INTERVAL, 0);
return Integer.parseInt(prefs.getString(PreferenceActivity.PREFERENCE_BACKGROUND_UPDATE_INTERVAL, "0"));
}
}
1 change: 0 additions & 1 deletion app/src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<ListPreference
android:defaultValue="false"
android:key="PREFERENCE_BACKGROUND_UPDATE_INTERVAL"
android:title="@string/pref_background_update_interval"
android:entries="@array/updateIntervalLabels"
Expand Down

0 comments on commit e90153c

Please sign in to comment.