forked from upstream-mirrors/OpenTracks
Cleanup.
This commit is contained in:
@@ -48,10 +48,8 @@ public class CustomSQLiteOpenHelperTest {
|
||||
public static Map<String, String> getSQL(SQLiteDatabase db, String type) {
|
||||
HashMap<String, String> sqlMap = new HashMap<>();
|
||||
try (Cursor cursor = db.query("sqlite_master", new String[]{"name", "SQL"}, "type=?", new String[]{type}, null, null, "name")) {
|
||||
if (cursor != null) {
|
||||
while (cursor.moveToNext()) {
|
||||
sqlMap.put(cursor.getString(0), cursor.getString(1));
|
||||
}
|
||||
while (cursor.moveToNext()) {
|
||||
sqlMap.put(cursor.getString(0), cursor.getString(1));
|
||||
}
|
||||
}
|
||||
return sqlMap;
|
||||
@@ -64,12 +62,10 @@ public class CustomSQLiteOpenHelperTest {
|
||||
*/
|
||||
private static boolean hasSqlCreate(SQLiteDatabase db, String sqlCreate) {
|
||||
try (Cursor cursor = db.rawQuery("SELECT SQL FROM sqlite_master", null)) {
|
||||
if (cursor != null) {
|
||||
while (cursor.moveToNext()) {
|
||||
String sql = cursor.getString(0);
|
||||
if (sqlCreate.equals(sql)) {
|
||||
return true;
|
||||
}
|
||||
while (cursor.moveToNext()) {
|
||||
String sql = cursor.getString(0);
|
||||
if (sqlCreate.equals(sql)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package de.dennisguse.opentracks.chart;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.DashPathEffect;
|
||||
import android.graphics.Paint;
|
||||
@@ -49,10 +48,8 @@ import de.dennisguse.opentracks.R;
|
||||
import de.dennisguse.opentracks.data.models.Marker;
|
||||
import de.dennisguse.opentracks.settings.UnitSystem;
|
||||
import de.dennisguse.opentracks.stats.ExtremityMonitor;
|
||||
import de.dennisguse.opentracks.ui.markers.MarkerDetailActivity;
|
||||
import de.dennisguse.opentracks.ui.markers.MarkerUtils;
|
||||
import de.dennisguse.opentracks.ui.util.ThemeUtils;
|
||||
import de.dennisguse.opentracks.util.IntentUtils;
|
||||
import de.dennisguse.opentracks.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -857,7 +854,7 @@ public class ChartView extends View {
|
||||
* @param chartValueSeries the chart value series
|
||||
* @param canvas the canvas
|
||||
* @param xPosition the right most x position
|
||||
* @parm yOffset offset to apply to y position
|
||||
* @param yOffset offset to apply to y position
|
||||
* @param yValue the y value
|
||||
* @return the marker width.
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,6 @@ public class ChooseActivityTypeDialogFragment extends DialogFragment implements
|
||||
|
||||
private static final String CHOOSE_ACTIVITY_TYPE_DIALOG_TAG = "chooseActivityType";
|
||||
|
||||
@Deprecated
|
||||
public static void showDialog(FragmentManager fragmentManager, Context context, String activityTypeLocalized) {
|
||||
ActivityType activityType = ActivityType.findByLocalizedString(context, activityTypeLocalized);
|
||||
showDialog(fragmentManager, activityType);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class ImportActivity extends AbstractActivity {
|
||||
|
||||
importer = new Importer(this, documentFiles);
|
||||
importer.getLiveData()
|
||||
.observe(this, summary -> setProgress(summary));
|
||||
.observe(this, this::setProgress);
|
||||
importer.startImport();
|
||||
|
||||
//Works for a directory, but we might have received multiple files via SEND_MULTIPLE.
|
||||
|
||||
+1
-2
@@ -105,8 +105,7 @@ class TrackRecordingServiceNotificationManager implements SharedPreferences.OnSh
|
||||
Notification setGPSonlyStarted(Context context) {
|
||||
Intent intent = IntentUtils.newIntent(context, TrackListActivity.class);
|
||||
|
||||
int pendingIntentFlags = 0;
|
||||
pendingIntentFlags = PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT;
|
||||
int pendingIntentFlags = PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT;
|
||||
PendingIntent pendingIntent = TaskStackBuilder.create(context)
|
||||
.addParentStack(TrackListActivity.class)
|
||||
.addNextIntent(intent)
|
||||
|
||||
@@ -21,7 +21,7 @@ public class IntervalStatisticsAdapter extends RecyclerView.Adapter<RecyclerView
|
||||
private List<IntervalStatistics.Interval> intervalList;
|
||||
private final Context context;
|
||||
private final StackMode stackMode;
|
||||
private UnitSystem unitSystem = UnitSystem.defaultUnitSystem();
|
||||
private UnitSystem unitSystem;
|
||||
private boolean isReportSpeed;
|
||||
|
||||
public IntervalStatisticsAdapter(Context context, StackMode stackMode, UnitSystem unitSystem, boolean isReportSpeed) {
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
android:translateY="24">
|
||||
<path
|
||||
android:pathData="M85.133,20.59C85.731,18.546 84.756,17.817 82.965,18.968L23.874,56.967c-1.791,1.152 -1.519,2.224 0.604,2.382L49.019,61.18c2.124,0.159 4.477,1.918 5.229,3.91l8.7,23.021c0.753,1.992 1.857,1.949 2.455,-0.094z"
|
||||
android:fillColor="#FFFFFF"></path>
|
||||
android:fillColor="#FFFFFF" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -44,7 +44,7 @@ limitations under the License.
|
||||
<string name="sensor_unit_power" translatable="false">w</string>
|
||||
|
||||
<string name="value_unknown" translatable="false">-</string>
|
||||
<string name="empty" translatable="false"></string>
|
||||
<string name="empty" translatable="false" />
|
||||
<string name="report_issue_link" translatable="false">https://codeberg.org/OpenTracksApp/OpenTracks/issues/new?labels=bug&template=bug_report.md&body=%1$s</string>
|
||||
|
||||
<string-array name="marker_types">
|
||||
|
||||
Reference in New Issue
Block a user