Loading app/src/main/java/net/fabiszewski/ulogger/LoggerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,16 @@ public class LoggerService extends Service { handlePrefsUpdated(); } else { final Notification notification = notificationHelper.showNotification(); boolean isForeground = false; try { startForeground(notificationHelper.getId(), notification); if (!initializeLocationUpdates()) { isForeground = true; } catch (SecurityException e) { if (Logger.DEBUG) { Log.d(TAG, "[SecurityException on startForeground: " + e.getMessage() + "]"); } BroadcastHelper.sendBroadcast(this, BROADCAST_LOCATION_PERMISSION_DENIED); } if (!isForeground || !initializeLocationUpdates()) { setRunning(false); stopSelf(); } Loading Loading
app/src/main/java/net/fabiszewski/ulogger/LoggerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,16 @@ public class LoggerService extends Service { handlePrefsUpdated(); } else { final Notification notification = notificationHelper.showNotification(); boolean isForeground = false; try { startForeground(notificationHelper.getId(), notification); if (!initializeLocationUpdates()) { isForeground = true; } catch (SecurityException e) { if (Logger.DEBUG) { Log.d(TAG, "[SecurityException on startForeground: " + e.getMessage() + "]"); } BroadcastHelper.sendBroadcast(this, BROADCAST_LOCATION_PERMISSION_DENIED); } if (!isForeground || !initializeLocationUpdates()) { setRunning(false); stopSelf(); } Loading