Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Android LaunchAdjacent flag for Essentials #11783

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Essentials/src/AppInfo/AppInfo.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public void ShowSettingsUI()
settingsIntent.SetData(global::Android.Net.Uri.Parse("package:" + PackageName));

var flags = ActivityFlags.NewTask | ActivityFlags.NoHistory | ActivityFlags.ExcludeFromRecents;
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
settingsIntent.SetFlags(flags);

context.StartActivity(settingsIntent);
Expand Down
4 changes: 0 additions & 4 deletions src/Essentials/src/Email/Email.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Task PlatformComposeAsync(EmailMessage message)
{
var intent = CreateIntent(message);
var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
#if __ANDROID_24__
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
#endif
intent.SetFlags(flags);

Application.Context.StartActivity(intent);
Expand Down
8 changes: 0 additions & 8 deletions src/Essentials/src/Launcher/Launcher.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Task<bool> PlatformOpenAsync(Uri uri)
{
var intent = new Intent(Intent.ActionView, AndroidUri.Parse(uri.OriginalString));
var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
#if __ANDROID_24__
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
#endif
intent.SetFlags(flags);

Application.Context.StartActivity(intent);
Expand All @@ -42,10 +38,6 @@ Task<bool> PlatformOpenAsync(OpenFileRequest request)

var chooserIntent = Intent.CreateChooser(intent, request.Title ?? string.Empty);
var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
#if __ANDROID_24__
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
#endif
chooserIntent.SetFlags(flags);

Application.Context.StartActivity(chooserIntent);
Expand Down
4 changes: 0 additions & 4 deletions src/Essentials/src/Map/Map.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ Intent ResolveMapIntent(string uri)
{
var intent = new Intent(Intent.ActionView, AndroidUri.Parse(uri));
var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
#if __ANDROID_24__
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
#endif
intent.SetFlags(flags);

return intent;
Expand Down
2 changes: 0 additions & 2 deletions src/Essentials/src/PhoneDialer/PhoneDialer.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public void Open(string number)
var dialIntent = ResolveDialIntent(phoneNumber);

var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
dialIntent.SetFlags(flags);

Application.Context.StartActivity(dialIntent);
Expand Down
2 changes: 0 additions & 2 deletions src/Essentials/src/Sms/Sms.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Task PlatformComposeAsync(SmsMessage message)
var intent = CreateIntent(message?.Body, message?.Recipients);

var flags = ActivityFlags.ClearTop | ActivityFlags.NewTask;
if (OperatingSystem.IsAndroidVersionAtLeast(24))
flags |= ActivityFlags.LaunchAdjacent;
intent.SetFlags(flags);

Application.Context.StartActivity(intent);
Expand Down