Add build flags for optional features and refine UI handling - #73
Add build flags for optional features and refine UI handling#73knownassurajit wants to merge 4 commits into
Conversation
Introduce per-flavor BuildConfig flags (SHOW_WIDGETS_FEATURE, SHOW_NOTIFICATION_SUMMARY_FEATURE, SHOW_PRIVATE_SPACE_FEATURE) and gate UI/behavior behind them. Add BIND_APPWIDGET permission to the integrated manifest. Update Kotlin code to import BuildConfig and conditionally show/enable features (App Drawer private space handling, widgets, notification summary, swipe actions) based on the flags and user prefs. Use androidx.core ContextCompat.registerReceiver for exported receiver registration and refine receiver lifecycle and private-space handling. Also normalize swipe action UI (default display name) and ensure actions won't be invoked when their feature is disabled.
There was a problem hiding this comment.
Code Review
This pull request introduces feature flags (SHOW_WIDGETS_FEATURE, SHOW_NOTIFICATION_SUMMARY_FEATURE, and SHOW_PRIVATE_SPACE_FEATURE) across product flavors to conditionally gate features like widgets, notification summaries, and private space. It also updates permissions and receiver registrations. However, several critical issues must be addressed: multiple files contain unresolved git conflict markers (including AndroidManifest.xml, MainActivity.kt, AppDrawerScreen.kt, and SettingsScreen.kt), and there is a duplicate permission declaration for BIND_APPWIDGET in the integrated manifest. Additionally, fully qualified package names in HomeScreen.kt should be simplified using existing imports.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3537153d9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <<<<<<< Updated upstream | ||
| ======= | ||
|
|
||
| >>>>>>> Stashed changes |
There was a problem hiding this comment.
Remove unresolved conflict markers from manifest
This commit leaves Git conflict markers (<<<<<<<, =======, >>>>>>>) in the main manifest, which makes the XML invalid and will break Android resource/manifest processing for every build variant. As committed, the app cannot be packaged until this conflict is resolved and the marker lines are removed.
Useful? React with 👍 / 👎.
| <<<<<<< Updated upstream | ||
| registerReceiver(appReceiver, pkgFilter) | ||
| ======= | ||
| androidx.core.content.ContextCompat.registerReceiver(this, appReceiver, pkgFilter, androidx.core.content.ContextCompat.RECEIVER_EXPORTED) | ||
| >>>>>>> Stashed changes |
There was a problem hiding this comment.
Remove unresolved conflict markers from Kotlin source
The file still contains merge-conflict markers in executable Kotlin code, so the Kotlin parser will fail before compilation. This is a hard build blocker (not runtime-only): any build that includes this source file will fail until the conflict block is resolved and only one valid code path remains.
Useful? React with 👍 / 👎.
Increment version build (9 → 10). Resolve merge conflict markers in AndroidManifest and clean up related leftover conflict text. Replace direct registerReceiver calls with androidx.core ContextCompat.registerReceiver (explicit RECEIVER_EXPORTED flag) in MainActivity. Simplify AppDrawerScreen: remove/adjust unused imports, switch to Collator.getInstance(), and tidy up private-space logic and related UI items. Simplify SettingsScreen by removing unused imports/variables and trimming feature-specific UI blocks. General cleanup to resolve merge conflicts and remove dead code.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6c6a19aa3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| addDataScheme("package") | ||
| } | ||
| registerReceiver(appReceiver, pkgFilter) | ||
| androidx.core.content.ContextCompat.registerReceiver(this, appReceiver, pkgFilter, androidx.core.content.ContextCompat.RECEIVER_EXPORTED) |
There was a problem hiding this comment.
Register the package receiver only once
The same appReceiver and pkgFilter were already registered immediately above, so each package add/remove/change broadcast can invoke the receiver twice and launch two concurrent AppCacheManager.syncCache jobs. This duplicates potentially expensive cache work and can introduce races while installed applications are changing; replace the legacy registration rather than adding a second one.
Useful? React with 👍 / 👎.
…screen/HomeScreen.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Introduce per-flavor BuildConfig flags (SHOW_WIDGETS_FEATURE, SHOW_NOTIFICATION_SUMMARY_FEATURE, SHOW_PRIVATE_SPACE_FEATURE) and gate UI/behavior behind them. Add BIND_APPWIDGET permission to the integrated manifest. Update Kotlin code to import BuildConfig and conditionally show/enable features (App Drawer private space handling, widgets, notification summary, swipe actions) based on the flags and user prefs. Use androidx.core ContextCompat.registerReceiver for exported receiver registration and refine receiver lifecycle and private-space handling. Also normalize swipe action UI (default display name) and ensure actions won't be invoked when their feature is disabled.