forked from upstream-mirrors/OpenTracks
Cleanup: removed unused methods and constants.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
package de.dennisguse.opentracks.util;
|
package de.dennisguse.opentracks.util;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.allOf;
|
|
||||||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
|
|
||||||
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
|
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
|
||||||
|
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||||
|
import static org.hamcrest.Matchers.allOf;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
@@ -14,11 +14,11 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import androidx.test.espresso.PerformException;
|
import androidx.test.espresso.PerformException;
|
||||||
import androidx.test.espresso.UiController;
|
import androidx.test.espresso.UiController;
|
||||||
import androidx.test.espresso.ViewAction;
|
import androidx.test.espresso.ViewAction;
|
||||||
|
import androidx.test.espresso.util.HumanReadables;
|
||||||
|
import androidx.test.espresso.util.TreeIterables;
|
||||||
import androidx.test.platform.app.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry;
|
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry;
|
||||||
import androidx.test.runner.lifecycle.Stage;
|
import androidx.test.runner.lifecycle.Stage;
|
||||||
import androidx.test.espresso.util.HumanReadables;
|
|
||||||
import androidx.test.espresso.util.TreeIterables;
|
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
@@ -33,8 +33,6 @@ import java.util.function.Predicate;
|
|||||||
|
|
||||||
public class EspressoUtils {
|
public class EspressoUtils {
|
||||||
|
|
||||||
private static final long VIEW_POLLING_INTERVAL_MS = 50;
|
|
||||||
|
|
||||||
public static Matcher<View> withRecyclerViewItemCount(final int count) {
|
public static Matcher<View> withRecyclerViewItemCount(final int count) {
|
||||||
return new TypeSafeMatcher<>() {
|
return new TypeSafeMatcher<>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -50,15 +50,6 @@ public class ExtremityMonitor {
|
|||||||
return min;
|
return min;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the minimum value.
|
|
||||||
*
|
|
||||||
* @param min the minimum value
|
|
||||||
*/
|
|
||||||
public void setMin(double min) {
|
|
||||||
this.min = min;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the maximum value seen.
|
* Gets the maximum value seen.
|
||||||
*/
|
*/
|
||||||
@@ -66,15 +57,6 @@ public class ExtremityMonitor {
|
|||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the maximum value.
|
|
||||||
*
|
|
||||||
* @param max the maximum value
|
|
||||||
*/
|
|
||||||
public void setMax(double max) {
|
|
||||||
this.max = max;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the min and the max with a new value.
|
* Updates the min and the max with a new value.
|
||||||
*
|
*
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@ public class ChooseActivityTypeDialogFragment extends DialogFragment implements
|
|||||||
ActivityType.WORKOUT
|
ActivityType.WORKOUT
|
||||||
);
|
);
|
||||||
|
|
||||||
private static int getPosition(Context context, ActivityType activityType) {
|
private static int getPosition(ActivityType activityType) {
|
||||||
if (activityType == null) {
|
if (activityType == null) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ public class ChooseActivityTypeDialogFragment extends DialogFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
final ChooseActivityTypeImageAdapter imageAdapter = new ChooseActivityTypeImageAdapter(iconDrawableIds);
|
final ChooseActivityTypeImageAdapter imageAdapter = new ChooseActivityTypeImageAdapter(iconDrawableIds);
|
||||||
int position = getPosition(getContext(), preselectedActivityType);
|
int position = getPosition(preselectedActivityType);
|
||||||
if (position != -1) {
|
if (position != -1) {
|
||||||
imageAdapter.setSelected(position);
|
imageAdapter.setSelected(position);
|
||||||
}
|
}
|
||||||
|
|||||||
-2
@@ -27,8 +27,6 @@ import kotlinx.coroutines.BuildersKt;
|
|||||||
*/
|
*/
|
||||||
public class HealthConnectUtils {
|
public class HealthConnectUtils {
|
||||||
|
|
||||||
private static final String TAG = HealthConnectUtils.class.getSimpleName();
|
|
||||||
|
|
||||||
static final String WRITE_EXERCISE_PERMISSION = HealthPermission.getWritePermission(JvmClassMappingKt.getKotlinClass(ExerciseSessionRecord.class));
|
static final String WRITE_EXERCISE_PERMISSION = HealthPermission.getWritePermission(JvmClassMappingKt.getKotlinClass(ExerciseSessionRecord.class));
|
||||||
static final String WRITE_EXERCISE_ROUTE_PERMISSION = HealthPermission.PERMISSION_WRITE_EXERCISE_ROUTE;
|
static final String WRITE_EXERCISE_ROUTE_PERMISSION = HealthPermission.PERMISSION_WRITE_EXERCISE_ROUTE;
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ import de.dennisguse.opentracks.settings.PreferencesUtils;
|
|||||||
*/
|
*/
|
||||||
class GpsStatusManager {
|
class GpsStatusManager {
|
||||||
|
|
||||||
private static final String TAG = GpsStatusManager.class.getSimpleName();
|
|
||||||
|
|
||||||
// The duration that GpsStatus waits from minimal interval to consider GPS lost.
|
// The duration that GpsStatus waits from minimal interval to consider GPS lost.
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public static final Duration SIGNAL_LOST_THRESHOLD = Duration.ofSeconds(30);
|
public static final Duration SIGNAL_LOST_THRESHOLD = Duration.ofSeconds(30);
|
||||||
|
|||||||
-6
@@ -136,12 +136,6 @@ public class FilterDialogFragment extends DialogFragment {
|
|||||||
public final String value;
|
public final String value;
|
||||||
public boolean isChecked;
|
public boolean isChecked;
|
||||||
|
|
||||||
public FilterItem(String id, String value) {
|
|
||||||
this.id = id;
|
|
||||||
this.value = value;
|
|
||||||
this.isChecked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public FilterItem(String id, String value, boolean isChecked) {
|
public FilterItem(String id, String value, boolean isChecked) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -104,10 +104,6 @@ public class FileUtils {
|
|||||||
return fileName.substring(index + 1);
|
return fileName.substring(index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getExtension(DocumentFile file) {
|
|
||||||
return getExtension(file.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getExtension(Uri uri) {
|
public static String getExtension(Uri uri) {
|
||||||
return getExtension(uri.toString());
|
return getExtension(uri.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ public class IntentUtils {
|
|||||||
|
|
||||||
private static final String TAG = IntentUtils.class.getSimpleName();
|
private static final String TAG = IntentUtils.class.getSimpleName();
|
||||||
|
|
||||||
private static final String JPEG_EXTENSION = "jpeg";
|
|
||||||
|
|
||||||
private IntentUtils() {
|
private IntentUtils() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user