Skip to content

Commit

Permalink
Fix invisible paths, fix widget causing map to show
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgroot committed Feb 7, 2016
1 parent e2bed61 commit a6e44b8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
* @version $Id$
*/
public class ControlTracking extends AppCompatActivity {
public static final String EXTRA_DEFAULT_NAME = "EXTRA_DEFAULT_NAME";
private final View.OnClickListener mLoggingControlListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand All @@ -66,7 +67,11 @@ public void onClick(View v) {
int precision = Integer.valueOf(preferences.getString(Helper.PRECISION_PREFERENCE, Integer.toString(ExternalConstants.LOGGING_NORMAL)));
int interval = Integer.valueOf(preferences.getString(Helper.CUSTOMPRECISIONTIME_PREFERENCE, "1"));
float distance = Float.valueOf(preferences.getString(Helper.CUSTOMPRECISIONDISTANCE_PREFERENCE, "1"));
GPSLoggerServiceManager.startGPSLogging(ControlTracking.this, precision, interval, distance, null);
String trackName = null;
if (getIntent().getBooleanExtra(EXTRA_DEFAULT_NAME, false)) {
trackName = NameTrack.createDefaultTrackName(ControlTracking.this);
}
GPSLoggerServiceManager.startGPSLogging(ControlTracking.this, precision, interval, distance, trackName);
// Create data for the caller that a new track has been started
ComponentName caller = ControlTracking.this.getCallingActivity();
if (caller != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ protected void onPrepareDialog(int id, Dialog dialog) {
switch (id) {
case DIALOG_TRACKNAME:
String trackName;
Calendar c = Calendar.getInstance();
trackName = String.format(getString(R.string.dialog_routename_default), c, c, c, c, c);
trackName = createDefaultTrackName(this);
mTrackNameView.setText(trackName);
mTrackNameView.setSelection(0, trackName.length());
break;
Expand All @@ -200,5 +199,13 @@ protected void onPrepareDialog(int id, Dialog dialog) {
break;
}
}

public static String createDefaultTrackName(Context ctx) {
String trackName;
Calendar c = Calendar.getInstance();
trackName = String.format(ctx.getString(R.string.dialog_routename_default), c, c, c, c, c);

return trackName;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,7 @@ private void updateDataOverlays() {
}

private boolean isHardwareAccelerated() {
int trackColoringMethod = Integer.valueOf(mSharedPreferences.getString(Constants.TRACKCOLORING, "3")).intValue();
return trackColoringMethod != SegmentOverlay.DRAW_CALCULATED && trackColoringMethod != SegmentOverlay
.DRAW_MEASURED;
return false;
}

private void updateSpeedColoring() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public void onReceive(Context context, Intent intent) {
int buttonId = Integer.parseInt(data.getSchemeSpecificPart());
if (buttonId == BUTTON_TRACKINGCONTROL) {
Intent controlIntent = new Intent(context, ControlTracking.class);
controlIntent.putExtra(ControlTracking.EXTRA_DEFAULT_NAME, true);
controlIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
controlIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
context.startActivity(controlIntent);
Expand Down

0 comments on commit a6e44b8

Please sign in to comment.