Skip to content

Commit

Permalink
Revert "Dev/waqas"
Browse files Browse the repository at this point in the history
  • Loading branch information
qureshiwaqas authored Feb 16, 2024
1 parent 9cbd992 commit 5c88ebc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/sonarcloud.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ public TrackDeleteResultReceiver(Handler handler, @NonNull Receiver receiver) {

@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
if(resultCode==RESULT_CODE_SUCCESS){
receiver.onDeleteFinished();
} else{
throw new RuntimeException("Unknown resultCode.");
}

switch (resultCode) {
case RESULT_CODE_SUCCESS -> receiver.onDeleteFinished();
default -> throw new RuntimeException("Unknown resultCode.");
}
}

public interface Receiver {
void onDeleteFinished();
}
Expand Down
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 && !PermissionRequester.RECORDING.hasPermission(this)) {

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
if (!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 Expand Up @@ -285,7 +285,7 @@ public Marker.Id insertMarker(String name, String category, String description,
return trackRecordingManager.insertMarker(name, category, description, photoUrl);
}

@Deprecated(since = "14.0.0", forRemoval = true)
@Deprecated
@VisibleForTesting
public TrackPointCreator getTrackPointCreator() {
return trackPointCreator;
Expand Down Expand Up @@ -354,4 +354,4 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, @Null
trackPointCreator.onSharedPreferenceChanged(sharedPreferences, key);
notificationManager.onSharedPreferenceChanged(sharedPreferences, key);
}
}
}

0 comments on commit 5c88ebc

Please sign in to comment.