Skip to content

Commit d7d15fc

Browse files
committed
Merge branch 'hotfix/patches'
2 parents b43b5dd + a3927c8 commit d7d15fc

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ apply plugin: 'io.fabric'
77

88
def versionMajor = 2
99
def versionMinor = 1
10-
def versionPatch = 0
11-
def versionBuild = 6
10+
def versionPatch = 1
11+
def versionBuild = 0
1212

1313
def buildTime() {
1414
def df = new SimpleDateFormat("yyyyMMdd HH:mm 'UTC'")

app/src/main/java/org/gnucash/android/db/DatabaseHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
294294
Crashlytics.logException(e);
295295
throw new RuntimeException(e);
296296
} catch (InvocationTargetException e){
297-
Crashlytics.logException(e);
298-
throw new RuntimeException(e);
297+
Crashlytics.logException(e.getTargetException());
298+
throw new RuntimeException(e.getTargetException());
299299
}
300300
}
301301
}

app/src/main/java/org/gnucash/android/db/MigrationHelper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,9 +1466,11 @@ static int upgradeDbToVersion13(SQLiteDatabase db){
14661466
//cancel the existing pending intent so that the alarm can be rescheduled
14671467
Intent alarmIntent = new Intent(context, ScheduledActionService.class);
14681468
PendingIntent pendingIntent = PendingIntent.getService(context, 0, alarmIntent, PendingIntent.FLAG_NO_CREATE);
1469-
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
1470-
alarmManager.cancel(pendingIntent);
1471-
pendingIntent.cancel();
1469+
if (pendingIntent != null) {
1470+
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
1471+
alarmManager.cancel(pendingIntent);
1472+
pendingIntent.cancel();
1473+
}
14721474

14731475
GnuCashApplication.startScheduledActionExecutionService(GnuCashApplication.getAppContext());
14741476

0 commit comments

Comments
 (0)