Skip to content

Commit ada43ee

Browse files
authored
test(integration): prevent auto-relaunch on Android (#4833)
1 parent 2370080 commit ada43ee

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

integration-test/net9-maui/App.xaml.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ public static void Kill()
102102
SentrySdk.Close();
103103

104104
#if ANDROID
105-
// prevent auto-restart
106-
Platform.CurrentActivity?.FinishAffinity();
107105
Process.KillProcess(Process.MyPid());
108106
#elif IOS
109107
System.Environment.Exit(0);

integration-test/net9-maui/MainPage.xaml.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ public partial class MainPage : ContentPage
55
public MainPage()
66
{
77
InitializeComponent();
8-
}
9-
10-
protected override void OnAppearing()
11-
{
12-
base.OnAppearing();
138

14-
App.OnAppearing();
9+
this.Loaded += (s, e) =>
10+
{
11+
App.OnAppearing();
12+
};
1513
}
1614
}

0 commit comments

Comments
 (0)