Skip to content

fix: [SDK-4190] PermissionsActivity does not follow app theme#2584

Open
fadi-george wants to merge 3 commits into5.7-mainfrom
fadi/sdk-4190-permissionsactivity-does-not-follow-app-theme
Open

fix: [SDK-4190] PermissionsActivity does not follow app theme#2584
fadi-george wants to merge 3 commits into5.7-mainfrom
fadi/sdk-4190-permissionsactivity-does-not-follow-app-theme

Conversation

@fadi-george
Copy link
Contributor

@fadi-george fadi-george commented Mar 19, 2026

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 PermissionsActivity theme. No behavioral, API, or logic changes.

The fix introduces a custom OneSignal.Theme.Translucent style (extending Theme.Translucent.NoTitleBar) that explicitly sets:

  • windowBackground to transparent
  • windowDrawsSystemBarBackgrounds to true
  • statusBarColor to transparent
  • navigationBarColor to transparent

The 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:

  1. Revoked notification permission via adb shell pm revoke
  2. Relaunched app, permission dialog appeared with transparent status/nav bars matching native Android behavior

Before

before before-location

After

after after-location

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
    • Theme-only change; no unit test needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

Closes #2203

Made with Cursor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant