Skip to content

Conversation

@somalaya
Copy link
Contributor

@somalaya somalaya commented Jun 4, 2025

The Auth password page on LTW is edge-to-edge by default on devices running Android 15 if the app is targeting Android 15 (API level 35). Please refer to this for more details. Because of this feature enabled by default, I am seeing below cropped screen.

Attached screenshot below.
EdgeToEdge

Steps to reproduce:

  1. set targetSdkVersion to 35 in BrokerHost app

  2. launch MsalTestApp

  3. click on Sign in button

  4. See that the page is cropped on the top


Expected Behavior:
Should not be cropped

Fix : Adding padding in the activity showing the UI screens by getting the insets of the system bar as suggested in the edge to edge documentation.

This is after fixing the issue
image

Fixes AB#3293334

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

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

Click here to Learn more.

@somalaya somalaya changed the title Fixing the sign in screens when edge to edge is enabled Fixing the sign in screens when edge to edge is enabled, Fixes AB#3293334 Jun 4, 2025
@github-actions
Copy link

github-actions bot commented Jun 4, 2025

✅ Work item link check complete. Description contains link AB#3293334 to an Azure Boards work item.

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

❌ Work item link check failed. Description contains AB#3293334 but the Bot could not link it to an Azure Boards work item.

Click here to learn more.

@somalaya somalaya marked this pull request as ready for review June 4, 2025 23:54
Copilot AI review requested due to automatic review settings June 4, 2025 23:54
@somalaya somalaya requested a review from a team as a code owner June 4, 2025 23:54
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 the sign-in screen layout issue on Android 15 devices by applying system bar insets to the UI screens when edge-to-edge mode is enabled. Key changes include:

  • Introducing a new flight flag (ENABLE_HANDLING_FOR_EDGE_TO_EDGE) to control edge-to-edge UI handling.
  • Updating DualScreenActivity to apply window insets as padding.
  • Adding the androidx core dependency in build.gradle for proper window inset support.

Reviewed Changes

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

File Description
common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java Added new flight flag for edge-to-edge UI handling.
common/src/main/java/com/microsoft/identity/common/internal/ui/DualScreenActivity.java Applied system bar insets as padding for edge-to-edge mode.
common/build.gradle Introduced a dependency on androidx core for window insets.
Comments suppressed due to low confidence (1)

common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java:127

  • [nitpick] The enum variable name includes 'FOR' (ENABLE_HANDLING_FOR_EDGE_TO_EDGE) while its key string does not. Consider aligning the key name to 'EnableHandlingForEdgeToEdge' for consistency.
ENABLE_HANDLING_FOR_EDGE_TO_EDGE("EnableHandlingEdgeToEdge", true);

@somalaya somalaya requested a review from a team as a code owner June 17, 2025 18:13
@somalaya somalaya added Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR and removed No-Changelog This Pull-Request has no associated changelog entry. labels Jun 17, 2025
@somalaya somalaya merged commit ca4f3f4 into dev Jun 18, 2025
18 of 20 checks passed
somalaya added a commit that referenced this pull request Jun 30, 2025
…#2690)

The fix I did in this PR is flighted
#2665
But we cannot control flighting when no broker is installed. I have
checked with OneAuth team and they are ok with just turning this fix ON
for brokered flow since that is the majority case.

Fix : Simply limit the fix to brokered flow by setting the default
flight value in common to false and in broker to true. See broker PR :
AzureAD/ad-accounts-for-android#3130

Fixes
[AB#3293334](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3293334)
somalaya added a commit to AzureAD/microsoft-authentication-library-for-android that referenced this pull request Aug 1, 2025
…2320)

In a previous PR, I fixed the sign in screen on Android 15 when target
SDK is 35
AzureAD/microsoft-authentication-library-common-for-android#2665

Making similar changes to StartActivity as well to be ready when Dome
makes changes for targetSDK 35

Fixes
[AB#3326784](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3326784)

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants