Skip to content

Commit

Permalink
Fix peer app info request before on-boarding
Browse files Browse the repository at this point in the history
The MainActivity continued its execution of onCreate even after calling
finish, causing a call to initPeerAppInfo and subsequent getCallingPackage
to fail because the calling activity was already finished
  • Loading branch information
emanuele-f committed Sep 18, 2023
1 parent 3c3b73c commit 3c6bc51
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,11 @@ protected void onCreate(Bundle savedInstanceState) {
int appver = Prefs.getAppVersion(mPrefs);
if(appver <= 0) {
// First run, start on-boarding
// only refresh app version on on-boarding done
Intent intent = new Intent(MainActivity.this, OnBoardingActivity.class);
startActivity(intent);
finish();
// only refresh app version on on-boarding done
return;
} else
Prefs.refreshAppVersion(mPrefs);

Expand Down

0 comments on commit 3c6bc51

Please sign in to comment.