Browse Source

[New]图片扫描新增过滤自身文件夹

zhipeng 1 year ago
parent
commit
8f6d2d70c5

+ 4 - 0
app/src/main/java/com/datarecovery/master/utils/ImageDeepDetector.java

@@ -12,6 +12,7 @@ import android.os.PowerManager;
 import android.text.TextUtils;
 
 import com.atmob.common.crypto.CryptoUtils;
+import com.atmob.common.runtime.ContextUtil;
 import com.datarecovery.master.utils.xfile.XFile;
 import com.datarecovery.master.utils.xfile.XFileSearch;
 import com.datarecovery.master.utils.xfile.XPathFile;
@@ -155,6 +156,9 @@ public class ImageDeepDetector {
             if (TextUtils.isEmpty(path)) {
                 return false;
             }
+            if (path.endsWith(ContextUtil.getContext().getPackageName())) {
+                return false;
+            }
             if (path.contains("com.kuaishou.nebula") && (path.endsWith("live_gift_store_icon_directory") ||
                     path.endsWith("magic_finger_resource") || path.endsWith("theme_resource") ||
                     path.endsWith("magic_emoji_resource") || path.endsWith(".material_library_resource") ||