Commit 48fdbf57 authored by wanglei's avatar wanglei

Merge branch 'master' of gitlab.huolea.com:koko/data-recovery-white

# Conflicts:
#	app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
parents 744453eb 72060d58
......@@ -23,6 +23,9 @@ import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
import com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
import com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import com.base.datarecovery.utils.AppPreferences
import com.base.datarecovery.utils.CleanJunkStringResourceManager
import com.base.datarecovery.utils.DuplicatePhotoStringResourceManager
import com.base.datarecovery.utils.ScreenshotCleanupStringManager
import java.util.Random
/**
......@@ -44,19 +47,19 @@ object NotificationUtil {
when (actionId) {
ID_JUNK_CLEAN_PUSH -> {
icon = R.mipmap.cleanjunk_ss
desc = "Free up space on your phone! Clean unwanted junk files now."
desc = CleanJunkStringResourceManager.getNextStringResource()
btn = "Clean Up Space"
}
ID_SIMILAR_IMAGE -> {
icon = R.mipmap.h_similar
desc = "Check similar photos to release more space"
desc = DuplicatePhotoStringResourceManager.getNextCopy()
btn = "Clean up"
}
ID_SCREENSHOT_CLEAN -> {
icon = R.mipmap.repeatedphotos
desc = "Streamline your photo album! Remove old and unnecessary screenshots."
desc = ScreenshotCleanupStringManager.getNextCleanupCopy()
btn = "Remove Screenshots"
}
......
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class CleanJunkStringResourceManager {
private static final List<String> stringResources = new ArrayList<>();
private static int currentResourceIndex = 0;
static {
// 添加新的文案资源
stringResources.add("Find and delete phone junk files.");
stringResources.add("Clear remaining trash for more space.");
stringResources.add("Scan and remove mobile junk files.");
stringResources.add("Clean up and free storage space.");
stringResources.add("Save space by cleaning junk files.");
stringResources.add("Remove phone junk files easily.");
stringResources.add("Clear trash and free up space.");
stringResources.add("Scan and delete mobile junk files.");
stringResources.add("Clean up for more storage space.");
stringResources.add("Save storage, clean junk files!");
stringResources.add("You haven't cleaned your device in a long time");
}
public static String getNextStringResource() {
if (stringResources == null || stringResources.isEmpty()) {
return null; // 或者根据您的需要处理错误情况
}
String resource = stringResources.get(currentResourceIndex);
currentResourceIndex = (currentResourceIndex + 1) % stringResources.size();
return resource;
}
}
\ No newline at end of file
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class DuplicatePhotoStringResourceManager {
private static final List<String> duplicatePhotoCopyList = new ArrayList<>();
private static int currentCopyIndex = 0;
static {
// 添加推送文案到列表
duplicatePhotoCopyList.add("Discover duplicate photos and free up space on your device.");
duplicatePhotoCopyList.add("Neat trick: Find and remove duplicate photos to instantly gain more storage.");
duplicatePhotoCopyList.add("Twin photos taking up space? Identify and delete them easily with our app.");
duplicatePhotoCopyList.add("Clear the clutter: Spot and remove look-alike photos to free up your phone.");
duplicatePhotoCopyList.add("Don't let duplicates drain your storage. Clean up similar photos now.");
duplicatePhotoCopyList.add("Double trouble? Find and delete duplicate photos to reclaim your space.");
}
public static String getNextCopy() {
if (duplicatePhotoCopyList.isEmpty()) {
return null; // 或者抛出一个异常,根据您的错误处理策略
}
String copy = duplicatePhotoCopyList.get(currentCopyIndex);
currentCopyIndex = (currentCopyIndex + 1) % duplicatePhotoCopyList.size();
return copy;
}
}
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class ScreenshotCleanupStringManager {
private static final List<String> screenshotCleanupCopies = new ArrayList<>();
private static int currentCleanupIndex = 0;
static {
// 添加截图清理功能的推送文案到列表
screenshotCleanupCopies.add("Declutter your gallery: It's time to remove those old screenshots!");
screenshotCleanupCopies.add("Clean up your phone's memory: Delete unwanted screenshots now!");
screenshotCleanupCopies.add("Free up space with ease: Get rid of unnecessary screenshots.");
screenshotCleanupCopies.add("Regain control over your storage: Clear out old screenshots today.");
screenshotCleanupCopies.add("A tidy phone is a happy phone: Remove excess screenshots and save space.");
}
public static String getNextCleanupCopy() {
if (screenshotCleanupCopies.isEmpty()) {
return null; // 或者根据您的需要处理错误情况
}
String copy = screenshotCleanupCopies.get(currentCleanupIndex);
currentCleanupIndex = (currentCleanupIndex + 1) % screenshotCleanupCopies.size();
return copy;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment