Skip to content

Commit 52bac26

Browse files
Fixed a bug
1 parent 16135aa commit 52bac26

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ android {
2828
applicationId "com.bald.uriah.baldphone"
2929
minSdkVersion 21
3030
targetSdkVersion 28
31-
versionCode 82
32-
versionName "11.4.1"
31+
versionCode 83
32+
versionName "11.4.2"
3333
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3434
}
3535

app/src/androidTest/java/com/bald/uriah/baldphone/activities/BaseActivityTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,5 @@ public void after() {
5151

5252
public void sleep() {
5353
getInstrumentation().waitForIdleSync();
54-
5554
}
5655
}

app/src/main/java/com/bald/uriah/baldphone/activities/HomeScreenActivity.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
import com.bald.uriah.baldphone.views.home.HomePage1;
7575
import com.bald.uriah.baldphone.views.home.NotesView;
7676

77+
import org.acra.ACRA;
78+
7779
import java.lang.ref.WeakReference;
7880
import java.util.ArrayList;
7981
import java.util.List;
@@ -199,7 +201,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
199201
// .show();
200202
// }
201203

202-
startService(new Intent(this, NotificationListenerService.class));
204+
try {
205+
startService(new Intent(this, NotificationListenerService.class));
206+
} catch (Exception e) {
207+
Log.e(TAG, S.str(e.getMessage()));
208+
e.printStackTrace();
209+
ACRA.getErrorReporter().handleSilentException(new RuntimeException("Can't start notification listener service", e));
210+
BaldToast.from(this).setType(BaldToast.TYPE_ERROR).setText("Could not start Notification Listener Service!").show();
211+
}
203212
new UpdateApps(this).execute(this.getApplicationContext());
204213

205214
audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);

0 commit comments

Comments
 (0)