diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-07-29 15:01:24 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-07-29 15:01:24 -0700 |
commit | 9150cff64abc79927ade28061ac99a1ebf812905 (patch) | |
tree | 14b5f709dc003c723f557de040d8e7b5689c1573 /tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java | |
parent | f0fa8416e13b2885b858b6974b101c70833e4729 (diff) | |
parent | 8b85dceadf281705a94d7546556fa5969364a658 (diff) | |
download | frameworks_base-9150cff64abc79927ade28061ac99a1ebf812905.zip frameworks_base-9150cff64abc79927ade28061ac99a1ebf812905.tar.gz frameworks_base-9150cff64abc79927ade28061ac99a1ebf812905.tar.bz2 |
Merge "Replaced /sdcard with Environment.getExternalStorageDirectory()"
Diffstat (limited to 'tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java')
-rw-r--r-- | tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java b/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java index 98d0a50..4cfdf6c 100644 --- a/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java +++ b/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java @@ -28,6 +28,7 @@ import android.content.Intent; import android.database.Cursor; import android.location.LocationManager; import android.os.Bundle; +import android.os.Environment; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -210,12 +211,11 @@ public class TrackerActivity extends ListActivity { } private String getUniqueFileName(String ext) { - File dir = new File("/sdcard/locationtracker"); + File dir = new File(Environment.getExternalStorageDirectory() + "/locationtracker"); if (!dir.exists()) { dir.mkdir(); } - return "/sdcard/locationtracker/tracking-" + - DateUtils.getCurrentTimestamp() + "." + ext; + return dir + "/tracking-" + DateUtils.getCurrentTimestamp() + "." + ext; } private void launchSettings() { |