mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix but with prefence update and screen.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
# used if you are only targeting Android 2.0 or later.) Make sure you
|
# used if you are only targeting Android 2.0 or later.) Make sure you
|
||||||
# test thoroughly if you go this route.
|
# test thoroughly if you go this route.
|
||||||
-optimizations code/simplification/arithmetic,code/simplification/cast,field/*,class/merging/*
|
-optimizations code/simplification/arithmetic,code/simplification/cast,field/*,class/merging/*
|
||||||
-optimizationpasses 6
|
-optimizationpasses 24
|
||||||
-allowaccessmodification
|
-allowaccessmodification
|
||||||
-dontpreverify
|
-dontpreverify
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,12 @@ import android.widget.TextView;
|
|||||||
public class CurrentValuesAdapter extends BaseAdapter {
|
public class CurrentValuesAdapter extends BaseAdapter {
|
||||||
private StartActivity context;
|
private StartActivity context;
|
||||||
|
|
||||||
private int[] keys;
|
private int[] keys;
|
||||||
private String[] values = new String[RideService.KEYS.length];
|
private String[] values = new String[RideService.KEYS.length];
|
||||||
private String[] keyLabels = new String[RideService.KEYS.length];
|
private String[] keyLabels = new String[RideService.KEYS.length];
|
||||||
private int size = 20;
|
private int size = 20;
|
||||||
private boolean imperial = false;
|
private boolean imperial = false;
|
||||||
|
private SharedPreferences settings = null;
|
||||||
|
|
||||||
private GridView layout;
|
private GridView layout;
|
||||||
|
|
||||||
@@ -34,10 +35,11 @@ public class CurrentValuesAdapter extends BaseAdapter {
|
|||||||
layout.setVerticalSpacing(4);
|
layout.setVerticalSpacing(4);
|
||||||
layout.setHorizontalSpacing(4);
|
layout.setHorizontalSpacing(4);
|
||||||
|
|
||||||
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
|
settings = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
Set<String> sensors = settings.getStringSet(context.getString(R.string.PREF_TRACKING_SENSORS), null);
|
Set<String> sensors = settings.getStringSet(context.getString(R.string.PREF_TRACKING_SENSORS), null);
|
||||||
size = Integer.valueOf(settings.getString(context.getString(R.string.PREF_TRACKING_SIZE), "20"));
|
|
||||||
imperial = settings.getBoolean(context.getString(R.string.PREF_TRACKING_IMPERIAL_UNITS), false);
|
size = Integer.valueOf(settings.getString(context.getString(R.string.PREF_TRACKING_SIZE), "20"));
|
||||||
|
imperial = settings.getBoolean(context.getString(R.string.PREF_TRACKING_IMPERIAL_UNITS), false);
|
||||||
|
|
||||||
|
|
||||||
if(sensors != null && sensors.size() > 0) {
|
if(sensors != null && sensors.size() > 0) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.util.Timer;
|
|||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceType;
|
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceType;
|
||||||
|
import com.dsi.ant.plugins.utility.log.LogAnt;
|
||||||
import com.ridelogger.formats.BaseFormat;
|
import com.ridelogger.formats.BaseFormat;
|
||||||
import com.ridelogger.formats.JsonFormat;
|
import com.ridelogger.formats.JsonFormat;
|
||||||
import com.ridelogger.listners.Base;
|
import com.ridelogger.listners.Base;
|
||||||
@@ -223,6 +224,8 @@ public class RideService extends Service
|
|||||||
fileFormat.createFile();
|
fileFormat.createFile();
|
||||||
fileFormat.writeHeader();
|
fileFormat.writeHeader();
|
||||||
|
|
||||||
|
LogAnt.setDebugLevel(LogAnt.DebugLevel.NONE, this);
|
||||||
|
|
||||||
final Set<String> pairedAnts = settings.getStringSet(getString(R.string.PREF_PAIRED_ANTS), null);
|
final Set<String> pairedAnts = settings.getStringSet(getString(R.string.PREF_PAIRED_ANTS), null);
|
||||||
|
|
||||||
if(pairedAnts != null && !pairedAnts.isEmpty()){
|
if(pairedAnts != null && !pairedAnts.isEmpty()){
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.dsi.ant.plugins.antplus.pcc.defines.DeviceType;
|
|||||||
import com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult;
|
import com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult;
|
||||||
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch;
|
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch;
|
||||||
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch.MultiDeviceSearchResult;
|
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch.MultiDeviceSearchResult;
|
||||||
|
import com.dsi.ant.plugins.utility.log.LogAnt;
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.ActivityManager.RunningServiceInfo;
|
import android.app.ActivityManager.RunningServiceInfo;
|
||||||
@@ -168,6 +169,8 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
|
|
||||||
updateList(foundDevices);
|
updateList(foundDevices);
|
||||||
|
|
||||||
|
LogAnt.setDebugLevel(LogAnt.DebugLevel.NONE, this.getActivity());
|
||||||
|
|
||||||
mCallback = new MultiDeviceSearch.SearchCallbacks(){
|
mCallback = new MultiDeviceSearch.SearchCallbacks(){
|
||||||
public void onDeviceFound(final MultiDeviceSearchResult deviceFound)
|
public void onDeviceFound(final MultiDeviceSearchResult deviceFound)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user