1.修复漏洞:BaseDao 中的 SQL 注入
2.移除ACCESS_MOCK_LOCATION 权限 3.MMKV启用AES-256加密保存
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:allowBackup="false"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true">
|
||||
<activity
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.content.ContentUris;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.database.DatabaseUtils;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
@@ -37,7 +36,6 @@ public class FileUtils {
|
||||
* TAG for log messages.
|
||||
*/
|
||||
static final String TAG = "FileUtils";
|
||||
private static final boolean DEBUG = false; // Set to true to enable logging
|
||||
/**
|
||||
* File and folder comparator. TODO Expose sorting option method
|
||||
*/
|
||||
@@ -216,7 +214,7 @@ public class FileUtils {
|
||||
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs
|
||||
, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
if (DEBUG) DatabaseUtils.dumpCursor(cursor);
|
||||
// if (DEBUG) DatabaseUtils.dumpCursor(cursor);
|
||||
|
||||
final int column_index = cursor.getColumnIndexOrThrow(column);
|
||||
return cursor.getString(column_index);
|
||||
@@ -248,12 +246,12 @@ public class FileUtils {
|
||||
|
||||
private static String getLocalPath(final Context context, final Uri uri) {
|
||||
|
||||
if (DEBUG)
|
||||
Log.d(TAG + " File -",
|
||||
"Authority: " + uri.getAuthority() + ", Fragment: " + uri.getFragment() + ", "
|
||||
+ "Port: " + uri.getPort() + ", Query: " + uri.getQuery() + ", Scheme"
|
||||
+ ": " + uri.getScheme() + ", Host: " + uri.getHost() + ", Segments: "
|
||||
+ uri.getPathSegments().toString());
|
||||
// if (DEBUG)
|
||||
// Log.d(TAG + " File -",
|
||||
// "Authority: " + uri.getAuthority() + ", Fragment: " + uri.getFragment() + ", "
|
||||
// + "Port: " + uri.getPort() + ", Query: " + uri.getQuery() + ", Scheme"
|
||||
// + ": " + uri.getScheme() + ", Host: " + uri.getHost() + ", Segments: "
|
||||
// + uri.getPathSegments().toString());
|
||||
|
||||
|
||||
// DocumentProvider
|
||||
@@ -487,12 +485,12 @@ public class FileUtils {
|
||||
}
|
||||
|
||||
private static void logDir(File dir) {
|
||||
if (!DEBUG) return;
|
||||
Log.d(TAG, "Dir=" + dir);
|
||||
File[] files = dir.listFiles();
|
||||
for (File file : files) {
|
||||
Log.d(TAG, "File=" + file.getPath());
|
||||
}
|
||||
// if (!DEBUG) return;
|
||||
// Log.d(TAG, "Dir=" + dir);
|
||||
// File[] files = dir.listFiles();
|
||||
// for (File file : files) {
|
||||
// Log.d(TAG, "File=" + file.getPath());
|
||||
// }
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user