Skip to content

Remove Microsoft Duo dual-screen support#2873

Open
joshfriend wants to merge 1 commit intoAzureAD:devfrom
joshfriend:remove-duo-display-sdk
Open

Remove Microsoft Duo dual-screen support#2873
joshfriend wants to merge 1 commit intoAzureAD:devfrom
joshfriend:remove-duo-display-sdk

Conversation

@joshfriend
Copy link
Contributor

This is a longstanding issue people experience when trying to integrate the library for the first time: AzureAD/microsoft-authentication-library-for-android#1027

It seems VERY reasonable to me that the display-mask dependency is removed from this library because the phone it supported was cancelled years ago after selling functionally zero units.

Once this is merged and released, the main MSAL library can have all the weird custom proguard rules, ai instructions, and help doc pertaining to this library removed once and for all.

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 removes Microsoft Duo dual-screen support by eliminating the DualScreenActivity base class and its associated layout, replacing them with a simpler FragmentActivity-based implementation. This change is motivated by the discontinuation of the Microsoft Duo device and aims to simplify the codebase by removing unnecessary dependencies.

Changes:

  • Removed DualScreenActivity.java and its dual-screen layout handling logic including hinge detection, screen spanning, and dynamic constraint-based layouts
  • Removed dual_screen_layout.xml and replaced with simpler common_activity_content.xml containing a single FrameLayout
  • Updated AuthorizationActivity and CurrentTaskAuthorizationActivity to extend FragmentActivity directly and use standard fragment transactions
  • Removed com.microsoft.device.display:display-mask dependency from build.gradle

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
common/src/main/res/layout/dual_screen_layout.xml Removed complex dual-screen constraint layout with guidelines for hinge positioning
common/src/main/res/layout/common_activity_content.xml Added simple replacement layout with single FrameLayout container
common/src/main/java/com/microsoft/identity/common/internal/ui/DualScreenActivity.java Removed entire class including dual-screen detection, hinge calculations, and edge-to-edge handling
common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/CurrentTaskAuthorizationActivity.java Changed from extending DualScreenActivity to FragmentActivity, replaced setFragment() call with direct fragment transaction
common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/AuthorizationActivity.java Changed from extending DualScreenActivity to FragmentActivity, replaced setFragment() call with direct fragment transaction
common/build.gradle Removed display-mask dependency

Copy link

@FalconeGiuseppe FalconeGiuseppe left a comment

Choose a reason for hiding this comment

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

LGTM, DualScreenActivity is not more used since Surface Duo line was cancelled

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.

2 participants