|
|
@@ -725,26 +725,39 @@ public class ImageDeepDetector {
|
|
|
if (category != CATEGORY_UNKNOWN) {
|
|
|
return category;
|
|
|
}
|
|
|
- if (isGallery()) {
|
|
|
- return CATEGORY_GALLERY;
|
|
|
- } else if (isWechat()) {
|
|
|
- return CATEGORY_WECHAT;
|
|
|
+ if (isWechat()) {
|
|
|
+ category = CATEGORY_WECHAT;
|
|
|
} else if (isQQ()) {
|
|
|
- return CATEGORY_QQ;
|
|
|
+ category = CATEGORY_QQ;
|
|
|
+ } else if (isGallery()) {
|
|
|
+ category = CATEGORY_GALLERY;
|
|
|
} else {
|
|
|
- return CATEGORY_OTHER;
|
|
|
+ category = CATEGORY_OTHER;
|
|
|
}
|
|
|
+ return category;
|
|
|
}
|
|
|
|
|
|
private boolean isQQ() {
|
|
|
if (TextUtils.isEmpty(path)) {
|
|
|
return false;
|
|
|
}
|
|
|
- return path.contains("com.tencent.mobileqq") || path.contains("com.tencent.tim");
|
|
|
+ return path.contains("com.tencent.mobileqq")
|
|
|
+ || path.contains("com.tencent.tim")
|
|
|
+ || path.contains("Pictures%2FQQ")
|
|
|
+ || path.contains("Download%2FQQ")
|
|
|
+ || path.contains("Download%2FQQMail")
|
|
|
+ || path.contains("Download%2FQQBrowser")
|
|
|
+ || path.contains("Tencent%2F")
|
|
|
+ ;
|
|
|
}
|
|
|
|
|
|
private boolean isWechat() {
|
|
|
- return !TextUtils.isEmpty(path) && path.contains("com.tencent.mm");
|
|
|
+ return !TextUtils.isEmpty(path) && (
|
|
|
+ path.contains("com.tencent.mm")
|
|
|
+ || path.contains("Download%2FWeiXin")
|
|
|
+ || path.contains("Pictures%2FWeiXin")
|
|
|
+ || path.contains("DCIM%2FWeixinWork")
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
private boolean isGallery() {
|
|
|
@@ -760,7 +773,17 @@ public class ImageDeepDetector {
|
|
|
path.contains("DCIM") ||
|
|
|
path.contains("Pictures") ||
|
|
|
path.contains(".RecycleBin") ||
|
|
|
- path.contains(".photoShare")
|
|
|
+ path.contains(".photoShare") ||
|
|
|
+ path.contains("Huawei") ||
|
|
|
+ path.contains("HUAWEI") ||
|
|
|
+ path.contains("Honor") ||
|
|
|
+ path.contains("HONOR") ||
|
|
|
+ path.contains("MIUI") ||
|
|
|
+ path.contains("Oppo") ||
|
|
|
+ path.contains("OPPO") ||
|
|
|
+ path.contains("vivo") ||
|
|
|
+ path.contains("Samsung") ||
|
|
|
+ path.contains("OnePlus")
|
|
|
);
|
|
|
}
|
|
|
}
|