fix: [SDK-4190] PermissionsActivity does not follow app theme#2584
Open
fadi-george wants to merge 3 commits into5.7-mainfrom
Open
fix: [SDK-4190] PermissionsActivity does not follow app theme#2584fadi-george wants to merge 3 commits into5.7-mainfrom
fadi-george wants to merge 3 commits into5.7-mainfrom
Conversation
Use a custom OneSignal.Theme.Translucent style with explicit transparent windowBackground and windowDrawsSystemBarBackgrounds so the permission dialog host activity no longer renders black status/navigation bars. Made-with: Cursor
3 tasks
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.
Description
One Line Summary
Fix PermissionsActivity rendering black status/navigation bars when the permission dialog is shown.
Details
Motivation
When OneSignal prompts for notification permission via
PermissionsActivity, the host activity's status bar and navigation bar render as black instead of transparent. This differs from the native Android permission dialog behavior and was reported in #2203.Scope
Restricted to the
PermissionsActivitytheme. No behavioral, API, or logic changes.The fix introduces a custom
OneSignal.Theme.Translucentstyle (extendingTheme.Translucent.NoTitleBar) that explicitly sets:windowBackgroundto transparentwindowDrawsSystemBarBackgroundsto truestatusBarColorto transparentnavigationBarColorto transparentThe manifest is updated to reference this custom style instead of the stock
@android:style/Theme.Translucent.NoTitleBar.Testing
Manual testing
Tested on Android emulator (API 34) using the OneSignal demo app:
adb shell pm revokeBefore
After
Affected code checklist
Checklist
Overview
Testing
Final pass
Closes #2203
Made with Cursor