Skip to content

Commit

Permalink
Merge pull request #8 from OmniaAlam/dev/Ash
Browse files Browse the repository at this point in the history
#2 Merging this if statement with the enclosing one
  • Loading branch information
AishwaryaShinde07 authored Feb 13, 2024
2 parents 1c92737 + 411747e commit ce08fd8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ private synchronized void startSensors() {
wakeLock = SystemUtils.acquireWakeLock(this, wakeLock);
trackPointCreator.start(this, handler);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
if (!PermissionRequester.RECORDING.hasPermission(this)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && !PermissionRequester.RECORDING.hasPermission(this)) {

throw new RuntimeException("Android14: Please grant permissions LOCATION and NEARBY DEVICES (manually)");
}

}

ServiceCompat.startForeground(this, TrackRecordingServiceNotificationManager.NOTIFICATION_ID, notificationManager.setGPSonlyStarted(this), ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION + ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE);
Expand Down

0 comments on commit ce08fd8

Please sign in to comment.