mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-09 20:53:07 +02:00
Automated code cleanup using Android Studio.
This commit is contained in:
+1
@@ -671,6 +671,7 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
|
||||
cursor.moveToFirst();
|
||||
int count = cursor.getInt(0);
|
||||
cursor.close();
|
||||
// not count the first waypoint
|
||||
return count > 0 ? count - 1 : 0;
|
||||
}
|
||||
|
||||
@@ -88,8 +88,7 @@ public final class Sensor {
|
||||
state_ = com.google.android.apps.mytracks.content.Sensor.SensorState.NONE;
|
||||
}
|
||||
public final boolean isInitialized() {
|
||||
if (!hasState) return false;
|
||||
return true;
|
||||
return hasState;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
@@ -422,7 +421,7 @@ public final class Sensor {
|
||||
if (!getPower().isInitialized()) return false;
|
||||
}
|
||||
if (hasBatteryLevel()) {
|
||||
if (!getBatteryLevel().isInitialized()) return false;
|
||||
return getBatteryLevel().isInitialized();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user