Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Call the application OnResume, on Android Resume instead of Restart. (#…
Browse files Browse the repository at this point in the history
…7477) Fixes #7400
  • Loading branch information
kvpt authored and rmarinho committed Nov 28, 2019
1 parent ae72c0a commit 93effb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void OnStateChanged()

if (_previousState == AndroidApplicationLifecycleState.OnCreate && _currentState == AndroidApplicationLifecycleState.OnStart)
_application.SendStart();
else if (_previousState == AndroidApplicationLifecycleState.OnStop && _currentState == AndroidApplicationLifecycleState.OnRestart)
else if (_previousState == AndroidApplicationLifecycleState.OnRestart && _currentState == AndroidApplicationLifecycleState.OnStart)
_application.SendResume();
else if (_previousState == AndroidApplicationLifecycleState.OnPause && _currentState == AndroidApplicationLifecycleState.OnStop)
_application.SendSleep();
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.Android/FormsApplicationActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void OnStateChanged()

if (_previousState == AndroidApplicationLifecycleState.OnCreate && _currentState == AndroidApplicationLifecycleState.OnStart)
_application.SendStart();
else if (_previousState == AndroidApplicationLifecycleState.OnStop && _currentState == AndroidApplicationLifecycleState.OnRestart)
else if (_previousState == AndroidApplicationLifecycleState.OnRestart && _currentState == AndroidApplicationLifecycleState.OnStart)
_application.SendResume();
else if (_previousState == AndroidApplicationLifecycleState.OnPause && _currentState == AndroidApplicationLifecycleState.OnStop)
_application.SendSleep();
Expand Down

0 comments on commit 93effb9

Please sign in to comment.