Skip to content

Commit b2cfd99

Browse files
committed
Catch SecurityException on SDK 34
1 parent 900bb37 commit b2cfd99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
applicationId "com.drnoob.datamonitor"
1212
minSdkVersion 23
1313
targetSdkVersion 34
14-
versionCode 29
14+
versionCode 30
1515
versionName 'v2.4.0'
1616
resConfigs "en", "ar", "cs", "de", "es", "fr", "hi", "in", "it", "iw", "ja", "ko", "ml", "mr", "ms",
1717
"nb-rNO", "nl", "pl", "pt-rBR", "ro", "ru", "tr", "uk", "uz", "vi", "zh-rCN", "zh-rTW"

app/src/main/java/com/drnoob/datamonitor/utils/LiveNetworkMonitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public void onAvailable(@NonNull Network network) {
483483
else {
484484
mLiveNetworkMonitor.startForeground(NETWORK_SIGNAL_NOTIFICATION_ID, mBuilder.build());
485485
}
486-
} catch (ForegroundServiceStartNotAllowedException e) {
486+
} catch (Exception e) {
487487
e.printStackTrace();
488488
Toast.makeText(context, context.getString(R.string.error_network_monitor_start),
489489
Toast.LENGTH_LONG).show();

0 commit comments

Comments
 (0)