1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

start using the android API for "/sdcard"

This commit is contained in:
Jesse Vincent 2010-05-29 21:56:09 +00:00
parent 291f6d18a2
commit cce6a95c2c
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Environment;
import android.util.Log;
import android.webkit.WebSettings;
@ -48,7 +49,7 @@ public class K9 extends Application
* on the phone, without adb. Set to null to disable
*/
public static final String logFile = null;
//public static final String logFile = "/sdcard/k9mail/debug.log";
//public static final String logFile = Environment.getExternalStorageDirectory() + "/k9mail/debug.log";
/**
* If this is enabled there will be additional logging information sent to

View File

@ -10,6 +10,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.os.Environment;
import android.util.Log;
import com.fsck.k9.Account;
import com.fsck.k9.K9;
@ -165,7 +166,7 @@ public class AttachmentProvider extends ContentProvider
File file = new File(attachmentsDir, id);
if (!file.exists())
{
file = new File("/sdcard" + attachmentsDir.getCanonicalPath().substring("/data".length()), id);
file = new File(Environment.getExternalStorageDirectory() + attachmentsDir.getCanonicalPath().substring("/data".length()), id);
if (!file.exists())
{
throw new FileNotFoundException();