Create storage dir for file transfers if doesn't exists
This commit is contained in:
parent
88000c6f72
commit
40c006f24d
1 changed files with 7 additions and 1 deletions
|
@ -759,7 +759,13 @@ public final class LinphoneUtils {
|
|||
}
|
||||
|
||||
public static String getStorageDirectory(Context mContext) {
|
||||
return Environment.getExternalStorageDirectory() + "/" + mContext.getString(mContext.getResources().getIdentifier("app_name", "string", mContext.getPackageName()));
|
||||
String storageDir = Environment.getExternalStorageDirectory() + "/" + mContext.getString(mContext.getResources().getIdentifier("app_name", "string", mContext.getPackageName()));
|
||||
File file = new File(storageDir);
|
||||
if (!file.isDirectory() || !file.exists()) {
|
||||
Log.w("Directory " + file + " doesn't seem to exists yet, let's create it");
|
||||
file.mkdirs();
|
||||
}
|
||||
return storageDir;
|
||||
}
|
||||
|
||||
public static void hideKeyboard(Activity activity) {
|
||||
|
|
Loading…
Reference in a new issue