Skip to content

feat: implement Android user context provider and managed config parser for MDM support [WPB-23327]#4572

Merged
MohamadJaara merged 2 commits intodevelopfrom
mo/multi-app-mdm-config
Feb 23, 2026
Merged

feat: implement Android user context provider and managed config parser for MDM support [WPB-23327]#4572
MohamadJaara merged 2 commits intodevelopfrom
mo/multi-app-mdm-config

Conversation

@MohamadJaara
Copy link
Copy Markdown
Member

@MohamadJaara MohamadJaara commented Feb 5, 2026

https://wearezeta.atlassian.net/browse/WPB-23327

Glad you asked—this is the kind of detail that keeps PRs smooth. Here’s the template filled out for the context‑aware MDM config feature, with a suggested PR title and honest testing notes.


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Enable enterprise MDM configurations to be resolved per Android user context so multiple Wire instances on the same device (primary user vs work profile/secure container) can use different server endpoints and SSO codes.

Causes (Optional)

Current managed configuration parsing only supports a single unified config and does not account for Android user context, so both app instances read the same restrictions and cannot be independently configured.

Solutions

Introduce an Android user context provider and a managed configuration parser that supports both unified and context‑mapped formats. Resolve configs by string‑matching the current Android user ID key with a default fallback, and apply server/SSO configs per context with validation and safe fallbacks.

Dependencies (Optional)

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Run unit tests for EMM parsing and manager behavior, for example:
./gradlew test
Verify tests in ManagedConfigParserTest, ManagedConfigurationsManagerTest, and AndroidUserContextProviderTest pass.

Notes (Optional)

Context matching is based on simple string keys of the Android user ID (Process.myUid() / 100000). If no matching key exists, default is used; otherwise server config falls back to app defaults and SSO is cleared.

Attachments (Optional)

N/A


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Suggested PR Title (meets requirements):
feat(emm): If merged, this PR will support context-aware MDM config resolution #SQPIT-XXXX

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (34f3fbe) to head (bd5b01f).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@       Coverage Diff       @@
##   develop   #4572   +/-   ##
===============================
===============================

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34f3fbe...bd5b01f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MohamadJaara MohamadJaara force-pushed the mo/multi-app-mdm-config branch from 902ffe9 to 49c8671 Compare February 18, 2026 21:05
@sonarqubecloud
Copy link
Copy Markdown

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 23, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 23, 2026
@MohamadJaara MohamadJaara removed this pull request from the merge queue due to a manual request Feb 23, 2026
@MohamadJaara MohamadJaara merged commit 9bafcbe into develop Feb 23, 2026
16 checks passed
@MohamadJaara MohamadJaara deleted the mo/multi-app-mdm-config branch February 23, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants