Add frequent scheduled message backup - #8
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “frequent scheduled message backup” capability by hooking Zalo’s scheduled message-backup interval, exposes new Backup settings (toggle + interval), and refactors restart/apply UX to support a non-root fallback path while moving runtime/root info into Developer tools.
Changes:
- Introduce Xposed hook + decision logic to override Zalo’s scheduled message-backup interval (1/3/6/12h) with preflight + self-check reporting.
- Add new Backup settings section (UI strings/arrays + settings model + persistence + backup/restore tests).
- Update restart/apply UX to fall back to opening Zalo App Info without root and reorganize Developer runtime/root status rows.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new frequent scheduled message backup feature. |
| app/src/test/java/com/ez/zalopatch/xposed/features/BackupPushDecisionTest.java | Adds unit coverage for interval selection/coercion. |
| app/src/test/java/com/ez/zalopatch/SettingsModelTest.java | Extends settings model expectations for the new Backup section/keys. |
| app/src/main/res/values/strings.xml | Adds Backup UI strings and replaces restart summary with non-root fallback text. |
| app/src/main/res/values/arrays.xml | Adds interval entries/values arrays for the backup interval list preference. |
| app/src/main/res/values-vi/strings.xml | Vietnamese translations for new Backup strings and restart fallback summary. |
| app/src/main/res/values-vi/arrays.xml | Vietnamese interval entry labels for the backup interval list preference. |
| app/src/main/java/com/ez/zalopatch/ZpSettingsActivity.java | Changes apply action to restart-or-open-app-info; apply bar no longer blocks on root. |
| app/src/main/java/com/ez/zalopatch/xposed/features/ZaloPrefsReader.java | Adds provider-based read to detect Zalo auto-backup enabled/disabled/ambiguous. |
| app/src/main/java/com/ez/zalopatch/xposed/features/BackupPushFeature.java | Implements the Xposed hook to override the scheduled message-backup interval. |
| app/src/main/java/com/ez/zalopatch/xposed/features/BackupPushDecision.java | Centralizes interval decision logic for the hook. |
| app/src/main/java/com/ez/zalopatch/xposed/core/SymbolPreflight.java | Adds structural preflight validation for the new backup interval reader hook. |
| app/src/main/java/com/ez/zalopatch/xposed/core/MainFeatures.java | Registers BackupPushFeature (main process only). |
| app/src/main/java/com/ez/zalopatch/Tweaks.java | Adds Backup section + keys + grouping and exposes the new toggle in ITEMS. |
| app/src/main/java/com/ez/zalopatch/TweakHookInfo.java | Adds hook metadata/drift symbols for the new backup feature. |
| app/src/main/java/com/ez/zalopatch/StatusActivity.java | Moves root/runtime environment rows out of the main dashboard and adds Backup section navigation. |
| app/src/main/java/com/ez/zalopatch/Settings.java | Registers the new int setting for backup interval with allowed values. |
| app/src/main/java/com/ez/zalopatch/SectionActivity.java | Adds Backup interval list preference (dependent on the frequent-backup toggle) and adds Developer environment rows. |
| app/src/main/assets/symbol-schema.json | Adds symbol mapping entries for backup interval reader class/method. |
| app/src/androidTest/java/com/ez/zalopatch/SymbolSchemaProfileTest.java | Validates presence/absence of the new backup symbol mapping depending on profile. |
| app/src/androidTest/java/com/ez/zalopatch/SettingsUiSmokeTest.java | Extends UI smoke coverage for Backup section and restart fallback behavior. |
| app/src/androidTest/java/com/ez/zalopatch/SettingsBackupTest.java | Ensures portable settings backup/restore includes new backup keys. |
| app/build.gradle.kts | Bumps app versionCode/versionName for the release. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+55
to
+60
| try { | ||
| return Integer.parseInt(values.values().iterator().next()) > 0 | ||
| ? AutoBackup.ENABLED : AutoBackup.DISABLED; | ||
| } catch (NumberFormatException ignored) { | ||
| return AutoBackup.UNKNOWN; | ||
| } |
Comment on lines
+11
to
+20
| public static long scheduledIntervalMillis(boolean enabled, int intervalHours, | ||
| long nativeIntervalMillis) { | ||
| if (!enabled) { | ||
| return nativeIntervalMillis; | ||
| } | ||
| int hours = intervalHours == 1 || intervalHours == 3 | ||
| || intervalHours == 6 || intervalHours == 12 | ||
| ? intervalHours : DEFAULT_INTERVAL_HOURS; | ||
| return hours * HOUR_MS; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #5