Commit 5b6b24e0 authored by wanglei's avatar wanglei

Merge remote-tracking branch 'origin/master'

parents 5ee4cfc5 75639706
......@@ -24,9 +24,13 @@ 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.DocumentRecoveryStringManager
import com.base.datarecovery.utils.DuplicatePhotoStringResourceManager
import com.base.datarecovery.utils.EventUtils
import com.base.datarecovery.utils.PhotoRecoveryStringManager
import com.base.datarecovery.utils.PrivacySpaceStringManager
import com.base.datarecovery.utils.ScreenshotCleanupStringManager
import com.base.datarecovery.utils.VideoRecoveryStringManager
import java.util.Random
/**
......@@ -66,25 +70,25 @@ object NotificationUtil {
ID_RECOVERY_PHOTOS -> {
icon = R.mipmap.photos_ss
desc = "Has a photo gone missing? Try our recovery tool to get it back."
desc = PhotoRecoveryStringManager.getNextRecoveryCopy()
btn = "Retrieve Photo"
}
ID_RECOVERY_VIDEOS -> {
icon = R.mipmap.videos_ss
desc = "Regain lost video moments. Start your video recovery now!"
desc = VideoRecoveryStringManager.getNextRecoveryCopy()
btn = "Recover Video"
}
ID_RECOVERY_DOCUMENTS -> {
icon = R.mipmap.documents_ss
desc = "Lost a vital document? Our recovery service might be able to help."
desc = DocumentRecoveryStringManager.getNextRecoveryCopy()
btn = "Restore Document"
}
ID_PRIVACY_SPACE -> {
icon = R.mipmap.space
desc = "Secure your private content. Tuck away photos and videos in your hidden space."
desc = PrivacySpaceStringManager.getNextPrivacySpaceCopy()
btn = "Hide Content"
}
}
......@@ -219,9 +223,9 @@ object NotificationUtil {
handler = Handler(handlerThread!!.looper)
for (i in 1..num) {
val time = i * delay
handler!!.postDelayed(Runnable {
handler?.postDelayed(Runnable {
if (MyApplication.PAUSED_VALUE === 1) {
handler!!.removeCallbacksAndMessages(null)
handler?.removeCallbacksAndMessages(null)
return@Runnable
}
if (MyApplication.PAUSED_VALUE !== 1) {
......
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class DocumentRecoveryStringManager {
private static final List<String> documentRecoveryCopies = new ArrayList<>();
private static int currentCopyIndex = 0;
static {
// 初始化并添加文案到列表
documentRecoveryCopies.add("Lost a vital document? Our recovery service might be able to help.");
documentRecoveryCopies.add("Can't find an important document? Try our recovery tool today.");
documentRecoveryCopies.add("Accidentally deleted a document? Recover it with ease using our service.");
documentRecoveryCopies.add("Don't panic over lost documents – our recovery feature is here to assist.");
documentRecoveryCopies.add("Regain access to deleted documents with our simple recovery process.");
}
public static String getNextRecoveryCopy() {
if (documentRecoveryCopies.isEmpty()) {
return null; // 根据您的需要处理错误情况
}
String copy = documentRecoveryCopies.get(currentCopyIndex);
currentCopyIndex = (currentCopyIndex + 1) % documentRecoveryCopies.size();
return copy;
}
}
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class PrivacySpaceStringManager {
private static final List<String> privacySpaceCopies = new ArrayList<>();
private static int currentCopyIndex = 0;
static {
// 初始化并添加文案到列表
privacySpaceCopies.add("Secure your private content. Tuck away photos and videos in your hidden space.");
privacySpaceCopies.add("Keep your memories safe. Store them in your private hideaway.");
privacySpaceCopies.add("Don't let others see your private moments. Use our secure hideaway.");
privacySpaceCopies.add("Your privacy is important. Lock away your photos and videos securely.");
privacySpaceCopies.add("Add an extra layer of security to your personal media with our hidden space.");
}
public static String getNextPrivacySpaceCopy() {
if (privacySpaceCopies.isEmpty()) {
return null; // 根据您的需要处理错误情况
}
String copy = privacySpaceCopies.get(currentCopyIndex);
currentCopyIndex = (currentCopyIndex + 1) % privacySpaceCopies.size();
return copy;
}
}
package com.base.datarecovery.utils;
import java.util.ArrayList;
import java.util.List;
public class VideoRecoveryStringManager {
private static final List<String> videoRecoveryCopies = new ArrayList<>();
private static int currentRecoveryIndex = 0;
static {
// 添加视频恢复功能的推送文案到列表
videoRecoveryCopies.add("Regain lost video moments. Start your video recovery now!");
videoRecoveryCopies.add("Don't let lost videos be gone forever. Recover them today with our app.");
videoRecoveryCopies.add("Accidentally deleted a video? Our recovery feature can bring it back.");
videoRecoveryCopies.add("Revive those deleted video clips – it's easy with our recovery tool.");
videoRecoveryCopies.add("Missing a special video? Try our recovery service to retrieve it.");
}
public static String getNextRecoveryCopy() {
if (videoRecoveryCopies.isEmpty()) {
return null; // 或者根据您的需要处理错误情况
}
String copy = videoRecoveryCopies.get(currentRecoveryIndex);
currentRecoveryIndex = (currentRecoveryIndex + 1) % videoRecoveryCopies.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