mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 10:22:15 -05:00
start using the android API for "/sdcard"
This commit is contained in:
parent
291f6d18a2
commit
cce6a95c2c
@ -10,6 +10,7 @@ import android.content.pm.PackageInfo;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Environment;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ public class K9 extends Application
|
|||||||
* on the phone, without adb. Set to null to disable
|
* on the phone, without adb. Set to null to disable
|
||||||
*/
|
*/
|
||||||
public static final String logFile = null;
|
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
|
* If this is enabled there will be additional logging information sent to
|
||||||
|
@ -10,6 +10,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
|
import android.os.Environment;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.fsck.k9.Account;
|
import com.fsck.k9.Account;
|
||||||
import com.fsck.k9.K9;
|
import com.fsck.k9.K9;
|
||||||
@ -165,7 +166,7 @@ public class AttachmentProvider extends ContentProvider
|
|||||||
File file = new File(attachmentsDir, id);
|
File file = new File(attachmentsDir, id);
|
||||||
if (!file.exists())
|
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())
|
if (!file.exists())
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
|
Loading…
Reference in New Issue
Block a user