feat: implement Android user context provider and managed config parser for MDM support [WPB-23327]#4572
Open
MohamadJaara wants to merge 1 commit intodevelopfrom
Open
feat: implement Android user context provider and managed config parser for MDM support [WPB-23327]#4572MohamadJaara wants to merge 1 commit intodevelopfrom
MohamadJaara wants to merge 1 commit intodevelopfrom
Conversation
…er for MDM support
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #4572 +/- ##
===========================================
+ Coverage 48.50% 48.57% +0.07%
===========================================
Files 575 577 +2
Lines 19810 19857 +47
Branches 3312 3321 +9
===========================================
+ Hits 9608 9646 +38
- Misses 9187 9195 +8
- Partials 1015 1016 +1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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
SQPIT-764The PR Description
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
defaultfallback, and apply server/SSO configs per context with validation and safe fallbacks.Dependencies (Optional)
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Run unit tests for EMM parsing and manager behavior, for example:
./gradlew testVerify tests in
ManagedConfigParserTest,ManagedConfigurationsManagerTest, andAndroidUserContextProviderTestpass.Notes (Optional)
Context matching is based on simple string keys of the Android user ID (
Process.myUid() / 100000). If no matching key exists,defaultis 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)
PR Post Merge Checklist for internal contributors
References
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