Skip to content

Commit

Permalink
Fixed adding profile exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-yun committed Jul 6, 2018
1 parent 62b06ef commit 6456abd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.cogentworks.overwidget"
minSdkVersion 16
targetSdkVersion 27
versionCode 10
versionName "0.5.0"
versionCode 11
versionName "0.5.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import com.woxthebox.draglistview.DragItemAdapter;

import java.io.IOException;

public class AddProfileTask extends AsyncTask<String, Void, Profile> {

private Context context;
Expand All @@ -31,9 +29,9 @@ protected Profile doInBackground(String... params) {
Profile profile = WidgetUtils.getProfile(battleTag, platform, region, null, null);
profile.Id = profile.BattleTag.hashCode();
return profile;
} catch (IOException ex) {
} catch (Exception ex) {
ex.printStackTrace();
Snackbar.make(((Activity) context).findViewById(R.id.swiperefresh), "An error occurred", Snackbar.LENGTH_LONG).show();
//Toast.makeText(context, "An error occurred", Toast.LENGTH_SHORT).show();
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class SQLHelper extends SQLiteOpenHelper {
private static final String DB_NAME = "com.cogentworks.overwidget.db";
private static final String TABLE_NAME = "LIST";
private static final String COL_NAME = "GsonData";
private static final int DB_VERSION = 5;
private static final int DB_VERSION = 6;

public SQLHelper(Context context) {
//1 is to-do list database version
Expand Down

0 comments on commit 6456abd

Please sign in to comment.