Skip to content

mdm: define OnboardingFlow syspolicy on Android#648

Merged
barnstar merged 1 commit into
tailscale:mainfrom
zbuchheit:zbuchheit/skip-intro-screen
Jun 9, 2025
Merged

mdm: define OnboardingFlow syspolicy on Android#648
barnstar merged 1 commit into
tailscale:mainfrom
zbuchheit:zbuchheit/skip-intro-screen

Conversation

@zbuchheit

@zbuchheit zbuchheit commented May 12, 2025

Copy link
Copy Markdown
Contributor

Adds an MDM setting OnboardingFlow which allows for the intro screen to be skipped when set to true.

Adds MDM Setting update to the top of MainActivity onCreate to ensure the latest MDMSettings are accurate.
When attempting to rely on MDMSettings being updated during onResume it created a race condition where occasionally OnboardingFlow was being evaluated to the default value show when in reality it should be set to hide.

Updates https://github.com/tailscale/corp/issues/27966

@ghost

ghost commented May 12, 2025

Copy link
Copy Markdown

Pull Request Revisions

RevisionDescription
r6
Refactored onboarding flow logicExtracted onboarding display logic into separate shouldDisplayOnboarding() method and updated onboarding flow string
r5
Simplified onboarding flow navigation logicRemoved unnecessary comment and condensed onboarding flow navigation check with minor code formatting adjustments
r4No changes since last revision
r3
Android strings and restrictions updatedModified onboarding-related string and app restrictions, changing key and string names with updated configuration
r2
Modified MDM onboarding flow settingsReplaced tailscaleOnboardingSeen boolean with onboardingFlow ShowHide setting and updated navigation logic
r1
Added MDM control for intro screenIntroduced MDM setting to allow administrators to skip the initial onboarding/intro screen for Tailscale Android app

☑️ AI review skipped after 5 revisions, comment with `/review` to review again
Help React with emojis to give feedback on AI-generated reviews:
  • 👍 means the feedback was helpful and actionable
  • 👎 means the feedback was incorrect or unhelpful
💬 Replying to feedback with a comment helps us improve the system. Your input also contributes to shaping future interactions with the AI reviewer.

We'd love to hear from you—reach out anytime at team@review.ai.

Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt Outdated
Comment thread android/src/main/java/com/tailscale/ipn/mdm/MDMSettings.kt Outdated
@zbuchheit zbuchheit force-pushed the zbuchheit/skip-intro-screen branch from fed79d4 to ae71490 Compare May 19, 2025 00:07
Comment thread android/src/main/res/xml/app_restrictions.xml Outdated
Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt Outdated
@zbuchheit zbuchheit force-pushed the zbuchheit/skip-intro-screen branch from ae71490 to 3511552 Compare May 19, 2025 00:12
Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt Outdated
Comment thread android/src/main/java/com/tailscale/ipn/mdm/MDMSettings.kt
Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt
@zbuchheit zbuchheit force-pushed the zbuchheit/skip-intro-screen branch 2 times, most recently from 2d54d76 to 63ff494 Compare May 19, 2025 00:20
Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt Outdated

@barnstar barnstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @zbuchheit !

Just a few small changes to use the existing policy name for consistency with other platforms.

Comment thread android/src/main/java/com/tailscale/ipn/mdm/MDMSettings.kt
Comment thread android/src/main/java/com/tailscale/ipn/MainActivity.kt Outdated
Comment thread android/src/main/res/values/strings.xml Outdated
Comment thread android/src/main/res/xml/app_restrictions.xml
Adds an MDM setting `OnboardingFlow` which allows for the intro screen to be skipped when set to true.

Adds MDM Setting update to the top of MainActivity onCreate to ensure the latest MDMSettings are accurate. When attempting to do this while
relying on MDMSettings being update during onResume it created a race condition where occasionally OnboardingFlow was being evaluated to the
default value `show` when in reality it should be set to `hide`.

Signed-off-by: zbuchheit <zachb@tailscale.com>
@zbuchheit zbuchheit force-pushed the zbuchheit/skip-intro-screen branch from 63ff494 to 42a4de1 Compare May 20, 2025 21:48
@zbuchheit zbuchheit changed the title mdm: define TailscaleOnboardingSeen syspolicy on Android mdm: define OnboardingFlow syspolicy on Android May 20, 2025
@zbuchheit

Copy link
Copy Markdown
Contributor Author

@barnstar I made some of the changes you suggested. I am also happy to change it to TailscaleOnboardingSeen if that's what you all decide to finalize it as. @nickkhyl suggested changing it to OnboardingFlow.

@zbuchheit zbuchheit requested a review from barnstar June 3, 2025 18:44

@barnstar barnstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@zbuchheit Can you add the issue to this? Looks good other than that. You can use this one:
updates tailscale/corp#29482

I have another patch that conflicts with this one in review to make authKey login skip the other permission prompts that replicates some of this - but I'll rebase once this is merged.

@barnstar barnstar merged commit b999309 into tailscale:main Jun 9, 2025
4 of 5 checks passed
nadeemakhter0602 pushed a commit to nadeemakhter0602/TailMon that referenced this pull request Mar 22, 2026
Adds an MDM setting `OnboardingFlow` which allows for the intro screen to be skipped when set to true.

Adds MDM Setting update to the top of MainActivity onCreate to ensure the latest MDMSettings are accurate. When attempting to do this while
relying on MDMSettings being update during onResume it created a race condition where occasionally OnboardingFlow was being evaluated to the
default value `show` when in reality it should be set to `hide`.

updates tailscale/corp#29482

Signed-off-by: zbuchheit <zachb@tailscale.com>
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.

3 participants