Skip to content

Commit

Permalink
android: Set launchMode="singleTask" instead of "singleTop"
Browse files Browse the repository at this point in the history
This addresses zulip#620 by making it so the whole app state isn't reset
when coming back from Firefox in the web-auth flow. Discussion:
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/Flutter.20app.20.2B.20SAML.20auth/near/1776828

Later in that discussion, Greg found that this mode is the most
appropriate for our app, and that setting taskAffinity="" is
probably a good idea as a security-hardening measure.

Fixes: zulip#620
  • Loading branch information
chrisbobbe committed Apr 30, 2024
1 parent 74aa25d commit 380df7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:launchMode="singleTask"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:networkSecurityConfig="@xml/network_security_config"
Expand Down

0 comments on commit 380df7d

Please sign in to comment.