mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-05-03 00:30:28 +00:00
Android 14+ FIX
This commit is contained in:
parent
4ec46836e8
commit
80ee0d58b2
2 changed files with 10 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ public class SplashActivity extends AppCompatActivity implements Runnable {
|
|||
String filesDir = activity.getFilesDir().getAbsolutePath();
|
||||
String nativeLibDir = activity.getApplicationInfo().nativeLibraryDir;
|
||||
|
||||
File tmpDir = new File(context.getFilesDir(), "tmp");
|
||||
File tmpDir = new File(activity.getFilesDir(), "tmp");
|
||||
if (!tmpDir.isDirectory()) {
|
||||
tmpDir.mkdirs();
|
||||
FileUtils.chmod(tmpDir, 0771);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import android.os.Environment;
|
|||
import android.provider.DocumentsContract;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.OpenableColumns;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
|
@ -59,6 +61,13 @@ public class FileUtils {
|
|||
return new File(Environment.getExternalStorageDirectory(), "Documents/VectrasVM");
|
||||
}
|
||||
|
||||
public static void chmod(File file, int mode) {
|
||||
try {
|
||||
Os.chmod(file.getAbsolutePath(), mode);
|
||||
}
|
||||
catch (ErrnoException e) {}
|
||||
}
|
||||
|
||||
private static Uri contentUri = null;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue