forked from upstream-mirrors/OpenTracks
Cleanup using AndroidStudio code analyzer.
Moved to iterator for loops for ChartView and ChartFragment.
This commit is contained in:
@@ -41,7 +41,7 @@ public class AnnouncementUtils {
|
||||
return context.getString(R.string.voice_template, totalDistance, getAnnounceTime(context, trackStatistics.getMovingTime()), rate);
|
||||
}
|
||||
|
||||
public static String getAnnounceTime(Context context, long time) {
|
||||
private static String getAnnounceTime(Context context, long time) {
|
||||
int[] parts = StringUtils.getTimeParts(time);
|
||||
String seconds = context.getResources()
|
||||
.getQuantityString(R.plurals.voiceSeconds, parts[0], parts[0]);
|
||||
@@ -71,7 +71,7 @@ public class AnnouncementUtils {
|
||||
*
|
||||
* @param d the double value
|
||||
*/
|
||||
public static int getQuantityCount(double d) {
|
||||
private static int getQuantityCount(double d) {
|
||||
if (d == 0) {
|
||||
return 0;
|
||||
} else if (d == 1) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PreferencesUtils {
|
||||
* @param keyId the key id
|
||||
* @param defaultValue the default value
|
||||
*/
|
||||
public static boolean getBoolean(Context context, int keyId, boolean defaultValue) {
|
||||
private static boolean getBoolean(Context context, int keyId, boolean defaultValue) {
|
||||
SharedPreferences sharedPreferences = getSharedPreferences(context);
|
||||
return sharedPreferences.getBoolean(getKey(context, keyId), defaultValue);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class PreferencesUtils {
|
||||
* @param keyId the key id
|
||||
* @param defaultValue the default value
|
||||
*/
|
||||
public static int getInt(Context context, int keyId, int defaultValue) {
|
||||
private static int getInt(Context context, int keyId, int defaultValue) {
|
||||
SharedPreferences sharedPreferences = getSharedPreferences(context);
|
||||
|
||||
try {
|
||||
@@ -215,7 +215,7 @@ public class PreferencesUtils {
|
||||
setBoolean(context, R.string.recording_track_paused_key, RECORDING_TRACK_PAUSED);
|
||||
}
|
||||
|
||||
public static String getBluetoothHeartRateSensorAddressNone(Context context) {
|
||||
private static String getBluetoothHeartRateSensorAddressNone(Context context) {
|
||||
return context.getString(R.string.sensor_type_value_none);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user