forked from upstream-mirrors/OpenTracks
Cleanup using Android Studio code analyzer.
This commit is contained in:
@@ -603,7 +603,6 @@ public class StatsFragment extends Fragment implements TrackDataListener {
|
||||
|
||||
private void setLocationValues() {
|
||||
boolean metricUnits = PreferencesUtils.isMetricUnits(getContext());
|
||||
boolean reportSpeed = PreferencesUtils.isReportSpeed(getContext(), category);
|
||||
boolean isRecording = isSelectedTrackRecording();
|
||||
|
||||
// Set speed/pace
|
||||
|
||||
@@ -74,7 +74,7 @@ public class KmlTrackWriter implements TrackWriter {
|
||||
* @param context the context
|
||||
* @param hasMultipleTracks should encode multiple tracks into one file?
|
||||
* @param exportTrackDetail should detailed information about the track be exported (e.g., title, description, waypoints, timing)?
|
||||
* @param exportSensorData should {@link TrackPointSensorDataSet} be exported?
|
||||
* @param exportSensorData should {@link TrackPoint}'s sensor data be exported?
|
||||
* @param exportPhotos should pictures be exported (if true: exports to KMZ)?
|
||||
*/
|
||||
public KmlTrackWriter(Context context, boolean hasMultipleTracks, boolean exportTrackDetail, boolean exportSensorData, boolean exportPhotos) {
|
||||
|
||||
@@ -42,7 +42,7 @@ import de.dennisguse.opentracks.util.FileUtils;
|
||||
* @author Jimmy Shih
|
||||
*/
|
||||
public class KmzTrackExporter implements TrackExporter {
|
||||
public static final String KMZ_IMAGES_DIR = "images";
|
||||
private static final String KMZ_IMAGES_DIR = "images";
|
||||
public static final String KMZ_KML_FILE = "doc.kml";
|
||||
|
||||
private static final String TAG = KmzTrackExporter.class.getSimpleName();
|
||||
|
||||
@@ -47,7 +47,7 @@ public class KmzTrackImporter implements TrackImporter {
|
||||
|
||||
private static final String TAG = KmzTrackImporter.class.getSimpleName();
|
||||
|
||||
public static final List<String> KMZ_IMAGES_EXT = Arrays.asList("jpeg", "jpg", "png");
|
||||
private static final List<String> KMZ_IMAGES_EXT = Arrays.asList("jpeg", "jpg", "png");
|
||||
|
||||
private static final int BUFFER_SIZE = 4096;
|
||||
|
||||
@@ -154,11 +154,7 @@ public class KmzTrackImporter implements TrackImporter {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (KMZ_IMAGES_EXT.contains(fileExt)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return KMZ_IMAGES_EXT.contains(fileExt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -717,7 +717,7 @@ public class TrackRecordingService extends Service {
|
||||
return remoteSensorManager.getSensorData();
|
||||
}
|
||||
|
||||
void fillWithSensorDataSet(TrackPoint trackPoint) {
|
||||
private void fillWithSensorDataSet(TrackPoint trackPoint) {
|
||||
SensorDataSet sensorData = getSensorDataSet();
|
||||
if (sensorData != null) {
|
||||
sensorData.fillTrackPoint(trackPoint);
|
||||
|
||||
@@ -47,8 +47,6 @@ public interface TrackRecordingServiceInterface {
|
||||
|
||||
/**
|
||||
* Resumes the track identified by trackId.
|
||||
*
|
||||
* @param trackId
|
||||
*/
|
||||
void resumeTrack(long trackId);
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import android.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import de.dennisguse.opentracks.R;
|
||||
import de.dennisguse.opentracks.content.data.Track;
|
||||
import de.dennisguse.opentracks.content.provider.ContentProviderUtils;
|
||||
import de.dennisguse.opentracks.services.TrackRecordingService;
|
||||
|
||||
+2
-4
@@ -94,8 +94,6 @@ public abstract class BluetoothLeSensorPreference extends DialogPreference {
|
||||
private int selectedEntryIndex;
|
||||
private final BluetoothLeAdapter listAdapter = new BluetoothLeAdapter();
|
||||
|
||||
private UUID sensorUUID;
|
||||
|
||||
private BluetoothLeScanner scanner = null;
|
||||
private final ScanCallback scanCallback = new ScanCallback() {
|
||||
@Override
|
||||
@@ -135,7 +133,7 @@ public abstract class BluetoothLeSensorPreference extends DialogPreference {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
sensorUUID = (UUID) getArguments().getSerializable(ARG_BLUETOOTH_UUID);
|
||||
UUID sensorUUID = (UUID) getArguments().getSerializable(ARG_BLUETOOTH_UUID);
|
||||
Log.i(TAG, "UUID: " + sensorUUID);
|
||||
|
||||
BluetoothAdapter bluetoothAdapter = BluetoothUtils.getDefaultBluetoothAdapter(TAG);
|
||||
@@ -147,7 +145,7 @@ public abstract class BluetoothLeSensorPreference extends DialogPreference {
|
||||
}
|
||||
|
||||
if (bluetoothAdapter.isDiscovering()) {
|
||||
Log.i(TAG, "Cancelling ongoing bluetooth discovery.");
|
||||
Log.i(TAG, "Cancelling ongoing B<aluetooth discovery.");
|
||||
bluetoothAdapter.cancelDiscovery();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ import de.dennisguse.opentracks.content.provider.ContentProviderUtils;
|
||||
*/
|
||||
public class IntentDashboardUtils {
|
||||
|
||||
public static final String ACTION_DASHBOARD = "Intent.OpenTracks-Dashboard";
|
||||
private static final String ACTION_DASHBOARD = "Intent.OpenTracks-Dashboard";
|
||||
|
||||
public static final String ACTION_DASHBOARD_PAYLOAD = ACTION_DASHBOARD + ".Payload";
|
||||
private static final String ACTION_DASHBOARD_PAYLOAD = ACTION_DASHBOARD + ".Payload";
|
||||
|
||||
private IntentDashboardUtils() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user