Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a battery-optimization reminder flow using the existing Compose bottom-sheet reminder system, replacing the prior dedicated dialog activity approach.
Changes:
- Introduces a new
BatteryOptimizationReminderpopup type and UI copy (Battery_Optimization) across multiple locales. - Refactors
ReminderPageto take pre-resolved content text (String) so callers can usestringResource(...)directly. - Centralizes battery optimization detection/navigation in
ContextExtensionand removes the oldBatteryOptimizationDialogActivity+ legacy triggers.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Adds Battery_Optimization string (default locale). |
| app/src/main/res/values-zh-rTW/strings.xml | Adds Traditional Chinese translation for Battery_Optimization. |
| app/src/main/res/values-zh-rCN/strings.xml | Adds Simplified Chinese translation for Battery_Optimization. |
| app/src/main/res/values-ru/strings.xml | Adds Russian translation for Battery_Optimization. |
| app/src/main/res/values-ja/strings.xml | Adds Japanese translation for Battery_Optimization. |
| app/src/main/res/values-es/strings.xml | Adds Spanish translation for Battery_Optimization. |
| app/src/main/java/one/mixin/android/ui/home/reminder/VerifyMobileReminderBottomSheetDialogFragment.kt | Updates reminder page content argument to pass a String via stringResource. |
| app/src/main/java/one/mixin/android/ui/home/reminder/ReminderPage.kt | Changes content parameter from @StringRes Int to String; removes internal stringResource(content) lookup. |
| app/src/main/java/one/mixin/android/ui/home/reminder/ReminderBottomSheetDialogFragment.kt | Adds battery optimization reminder selection + UI; updates other reminder content to pass strings. |
| app/src/main/java/one/mixin/android/ui/home/MainActivity.kt | Removes legacy battery optimization check and related imports. |
| app/src/main/java/one/mixin/android/ui/common/BatteryOptimizationDialogActivity.kt | Deletes the old dialog activity implementation. |
| app/src/main/java/one/mixin/android/job/BlazeMessageService.kt | Removes background-triggered battery optimization dialog; centralizes restriction check. |
| app/src/main/java/one/mixin/android/extension/ContextExtension.kt | Adds isBatteryOptimizationRestricted() and openBatteryOptimizationSetting() helpers. |
| app/src/main/AndroidManifest.xml | Removes BatteryOptimizationDialogActivity registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import one.mixin.android.ui.common.MixinComposeBottomSheetDialogFragment | ||
| import one.mixin.android.ui.home.MainActivity | ||
| import one.mixin.android.ui.setting.SettingActivity | ||
| import one.mixin.android.util.RomUtil |
Comment on lines
+120
to
+123
| return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
| R.string.setting_battery_optimize_title_one_ui_above_s | ||
| } else { | ||
| R.string.setting_battery_optimize_title_one_ui_below_s |
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.
No description provided.