|
@@ -1119,10 +1119,10 @@ public class FileUtils {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
- public static String getFilePath(Bitmap bitmap, String fileName) {
|
|
|
+ public static String getFilePath(Context context, Bitmap bitmap, String fileName) {
|
|
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
|
|
bitmap.compress(Bitmap.CompressFormat.PNG, 80, baos);
|
|
|
- String path = Environment.getExternalStorageDirectory() + "/dayaWhiteBroad";
|
|
|
+ String path = getCacheDir(context, "dayaWhiteBroad");
|
|
|
File dir = new File(path);
|
|
|
if (!dir.exists()) {
|
|
|
dir.mkdirs();
|
|
@@ -1145,8 +1145,8 @@ public class FileUtils {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static String getFilePath(Bitmap bitmap) {
|
|
|
- return getFilePath(bitmap, String.valueOf(System.currentTimeMillis()));
|
|
|
+ public static String getFilePath(Context context,Bitmap bitmap) {
|
|
|
+ return getFilePath(context,bitmap, String.valueOf(System.currentTimeMillis()));
|
|
|
}
|
|
|
|
|
|
/**
|