feature/battery optimization reminder#6235
Conversation
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.
There was a problem hiding this comment.
Pull request overview
Adds a new in-app “Battery Optimization” reminder surfaced via the existing reminder bottom sheet flow, replacing the previous dedicated dialog activity and consolidating battery optimization detection/navigation into Context extensions.
Changes:
- Introduce a new
BatteryOptimizationReminderpopup type and reminder UI (new string + background image). - Refactor
ReminderPageto accept pre-resolvedStringcontent (instead of a@StringResid) and update call sites. - Remove
BatteryOptimizationDialogActivityand migrate battery-optimization checks/open-settings behavior intoContextExtension.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Adds Battery_Optimization title string (EN). |
| 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/res/drawable-xxhdpi/bg_reminder_battery_optimization.png | Adds new reminder background asset. |
| app/src/main/java/one/mixin/android/ui/home/reminder/VerifyMobileReminderBottomSheetDialogFragment.kt | Updates reminder content argument to pass a resolved string via stringResource. |
| app/src/main/java/one/mixin/android/ui/home/reminder/ReminderPage.kt | Changes API: content becomes String and is rendered directly. |
| app/src/main/java/one/mixin/android/ui/home/reminder/ReminderBottomSheetDialogFragment.kt | Adds battery optimization reminder selection + UI, and opens battery optimization settings. |
| app/src/main/java/one/mixin/android/ui/home/MainActivity.kt | Removes the legacy battery optimization check hook. |
| app/src/main/java/one/mixin/android/ui/common/BatteryOptimizationDialogActivity.kt | Deletes the legacy dialog activity implementation. |
| app/src/main/java/one/mixin/android/job/BlazeMessageService.kt | Uses the new Context.isBatteryOptimizationRestricted() helper and removes dialog activity trigger. |
| app/src/main/java/one/mixin/android/extension/ContextExtension.kt | Adds isBatteryOptimizationRestricted() + openBatteryOptimizationSetting() and intent fallback logic. |
| app/src/main/AndroidManifest.xml | Removes BatteryOptimizationDialogActivity registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ization-reminder # Conflicts: # app/src/main/java/one/mixin/android/ui/home/reminder/ReminderBottomSheetDialogFragment.kt # app/src/main/java/one/mixin/android/ui/home/reminder/ReminderPage.kt # app/src/main/java/one/mixin/android/ui/home/reminder/VerifyMobileReminderBottomSheetDialogFragment.kt
…der' into codex/battery-optimization-reminder
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ottomSheetDialogFragment.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@claude[agent]+claude-opus-4.6 review PR |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private fun batteryOptimizationContent(): String { | ||
| return getString(getBatteryOptimizationContentResId()) | ||
| .replace("<b>", "") | ||
| .replace("</b>", "") | ||
| .replace("**", "") | ||
| } |
There was a problem hiding this comment.
batteryOptimizationContent() removes <b>...</b> / **...** markers by string replacement, so the emphasized parts that were previously rendered in bold (see removed BatteryOptimizationDialogActivity.replaceTags) will now appear as plain text. Consider parsing these markers into an AnnotatedString (or otherwise applying bold spans) instead of dropping them, and build the text via stringResource(...) inside the composable so it stays configuration/locale-aware.
No description provided.