Removed 'mytracks' from documentation, code, and filenames.

This commit is contained in:
Dennis Guse
2019-07-23 21:59:03 +02:00
parent 6dc03f567a
commit 5cfae845b7
33 changed files with 36 additions and 43 deletions
@@ -25,7 +25,7 @@ import android.content.Intent;
import android.util.Log;
/**
* This class handles MyTracks related broadcast messages.
* This class react to the BOOT_COMPLETED broadcast.
*
* One example of a broadcast message that this class is interested in,
* is notification about the phone boot. We may want to resume a previously
@@ -400,7 +400,7 @@ public class TrackDetailActivity extends AbstractTrackActivity implements Choose
File file = new File(dir, FileUtils.buildUniqueFileName(dir, fileName, JPEG_EXTENSION));
if (file != null) {
photoUri = FileProvider.getUriForFile(this, "com.google.android.apps.mytracks.fileprovider", file);
photoUri = FileProvider.getUriForFile(this, FileUtils.FILEPROVIDER, file);
Log.d(TAG, "Taking photo to URI: " + photoUri);
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE)
.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
@@ -55,7 +55,7 @@ public class CustomContentProvider extends ContentProvider {
static final int DATABASE_VERSION = 23;
@VisibleForTesting
static final String DATABASE_NAME = "mytracks.db";
static final String DATABASE_NAME = "database.db";
/**
* Database helper for creating and upgrading the database.
@@ -30,7 +30,7 @@ import com.google.android.maps.mytracks.R;
/**
* A service to control starting and stopping of a recording. This service,
* through the AndroidManifest.xml, is configured to only allow components of
* the same application to invoke it. Thus this service can be used my MyTracks
* the same application to invoke it. Thus this service can be used my the
* app widget, {@link TrackWidgetProvider}, but not by other applications. This
* application delegates starting and stopping a recording to
* {@link TrackRecordingService} using RPC calls.
@@ -22,7 +22,7 @@ import com.google.android.apps.mytracks.content.sensor.SensorDataSet;
import com.google.android.apps.mytracks.content.sensor.SensorState;
/**
* MyTracks service.
* App's service.
* This service is the process that actually records and manages tracks.
*/
public interface ITrackRecordingService {
@@ -238,13 +238,6 @@ public class TrackRecordingService extends Service {
}
};
/*
* Note that this service, through the AndroidManifest.xml, is configured to
* allow both MyTracks and third party apps to invoke it. For the onCreate
* callback, we cannot tell whether the caller is MyTracks or a third party
* app, thus it cannot start/stop a recording or write/update MyTracks
* database.
*/
@Override
public void onCreate() {
super.onCreate();
@@ -282,13 +275,6 @@ public class TrackRecordingService extends Service {
}
}
/*
* Note that this service, through the AndroidManifest.xml, is configured to
* allow both MyTracks and third party apps to invoke it. For the
* onStartCommand callback, we cannot tell whether the caller is MyTracks or a
* third party app, thus it cannot start/stop a recording or write/update
* MyTracks database.
*/
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
handleStartCommand(intent, startId);
@@ -36,6 +36,13 @@ public class FileUtils {
*/
static final String SDCARD_TOP_DIR = "MyTracks";
static final String TRACK_PREFIX = "MyTracks";
/**
* Used to transfer picture from the camera.
*/
public static final String FILEPROVIDER = "com.google.android.apps.mytracks.fileprovider";
/**
* The maximum FAT32 path length. See the FAT32 spec at
* http://msdn.microsoft.com/en-us/windows/hardware/gg463080
@@ -96,7 +103,7 @@ public class FileUtils {
}
public static File getPhotoDir(long trackId) {
return new File(getPath(PICTURES_DIR, "MyTracks" + trackId));
return new File(getPath(PICTURES_DIR, TRACK_PREFIX + trackId));
}
/**