Skip to content

Commit

Permalink
Fix crash at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
tijder committed Dec 3, 2019
1 parent 072ebeb commit 820036d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
tools:replace="allowBackup,label"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/eu/droogers/smsmatrix/MatrixService.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ private String createNotificationChannel(String channelId, String channelName){

@Override
public void onDestroy() {
mx.destroy();
if (mx != null) {
mx.destroy();
}
this.mms.stopMMSMonitoring();
this.mms = null;
super.onDestroy();
Expand Down

0 comments on commit 820036d

Please sign in to comment.