Skip to content

Conversation

@mohitc1
Copy link
Contributor

@mohitc1 mohitc1 commented Aug 15, 2025

Issue:
Color constant value "white" is defined in both Android Common and Auth App
In Common, this is defined as FFFFFF which is real white.

In Auth App, defined as background_1, which itself it defined as FFFFFF (white) in day mode - light and 000000 in night mode. 000000 is actually black.

Due to same names, the final APK uses the one from auth app, and effectively makes color of DualScreenActivity black (000000) in dark theme/night mode.

Fix
Change the constant name in Android common. Named it with prefix library package suffix com_microsoft_identity_common, to avoid any conflicts.
Going forward we should name resources with namespace prefix to avoid resource merging issues. (Perhaps rename existing ones)

Also change them for DualScreenActivity from Base.Theme.AppCompat.Light to Theme.AppCompat.Light (recommended)

Auth App should also address this: Using "white" to indirectly define both white and black, is misleading and causes confusion.

@github-actions
Copy link

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@mohitc1 mohitc1 marked this pull request as ready for review August 15, 2025 22:34
Copilot AI review requested due to automatic review settings August 15, 2025 22:34
@mohitc1 mohitc1 requested review from a team as code owners August 15, 2025 22:34

This comment was marked as outdated.

@mohitc1 mohitc1 requested a review from Copilot August 15, 2025 23:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a resource naming conflict in the DualScreenActivity dark mode where a color constant named "white" was defined in both Android Common and Auth App with different values, causing the activity to display incorrectly in dark theme.

  • Renamed the color constant from "white" to "com_microsoft_identity_common_white" in Android Common to avoid conflicts
  • Updated the DualScreenActivity theme to use the renamed color constant
  • Added changelog entry documenting the fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
common/src/main/res/values/colors.xml Renamed color constant to include library namespace prefix
common/src/main/res/values/styles.xml Updated theme to reference the renamed color constant
changelog.txt Added entry documenting the bug fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@mohitc1 mohitc1 merged commit cfc0979 into dev Aug 16, 2025
46 of 47 checks passed
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.

5 participants