diff --git a/app/build.gradle b/app/build.gradle index 3690c8cbf..eb471d2d3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { //noinspection ExpiredTargetSdkVersion targetSdk 29 versionCode 71 - versionName "1.2.3-beta4" + versionName "1.2.3-beta6" } buildTypes { release { diff --git a/app/src/main/java/pansong291/xposed/quickenergy/AntForestToast.java b/app/src/main/java/pansong291/xposed/quickenergy/AntForestToast.java index e66a6f4f4..a8891e16e 100644 --- a/app/src/main/java/pansong291/xposed/quickenergy/AntForestToast.java +++ b/app/src/main/java/pansong291/xposed/quickenergy/AntForestToast.java @@ -2,7 +2,6 @@ import android.annotation.SuppressLint; import android.content.Context; -import android.view.Gravity; import android.widget.Toast; import pansong291.xposed.quickenergy.util.Config; import pansong291.xposed.quickenergy.util.Log; diff --git a/app/src/main/java/pansong291/xposed/quickenergy/util/FileUtils.java b/app/src/main/java/pansong291/xposed/quickenergy/util/FileUtils.java index b4122cf77..824caed10 100644 --- a/app/src/main/java/pansong291/xposed/quickenergy/util/FileUtils.java +++ b/app/src/main/java/pansong291/xposed/quickenergy/util/FileUtils.java @@ -50,7 +50,9 @@ private static void copyFile(File srcDir, File dstDir, String filename) { @SuppressWarnings("deprecation") public static File getMainDirectoryFile() { if (mainDirectory == null) { - String storageDirStr = Environment.getExternalStorageDirectory() + File.separator + "Android" + File.separator + "media" + File.separator + ClassMember.PACKAGE_NAME; + String storageDirStr = + Environment.getExternalStorageDirectory() + File.separator + "Android" + File.separator + "media" + + File.separator + ClassMember.PACKAGE_NAME; File storageDir = new File(storageDirStr); if (!storageDir.exists()) { storageDir.mkdirs(); @@ -371,7 +373,7 @@ public synchronized static void append2RuntimeLogFile(String s) { public static boolean write2File(String s, File f) { if (f.exists() && !f.canWrite()) { - AntForestToast.show(f.getName() + "没有写入权限!", true); + AntForestToast.show(f.getAbsoluteFile() + "没有写入权限!", true); return false; } boolean success = false; @@ -391,7 +393,7 @@ public static boolean write2File(String s, File f) { public static boolean append2File(String s, File f) { if (f.exists() && !f.canWrite()) { - AntForestToast.show(f.getName() + "没有写入权限!", true); + AntForestToast.show(f.getAbsoluteFile() + "没有写入权限!", true); return false; } boolean success = false;