Skip to content

Commit

Permalink
Fixed the issue that multiple LoginActivity pages exist in the backgr…
Browse files Browse the repository at this point in the history
…ound record when logging in via GoogleBook
  • Loading branch information
DaVinci9196 committed Oct 12, 2024
1 parent 511afe8 commit ef03f5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@
android:configChanges="keyboardHidden|keyboard|orientation|screenSize"
android:exported="true"
android:process=":ui"
android:launchMode="singleTop"
android:theme="@style/Theme.LoginBlue">
<intent-filter>
<action android:name="com.google.android.gms.auth.login.LOGIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,12 @@ protected void onBackButtonClicked() {
}

public void loginCanceled() {
Log.d(TAG, "loginCanceled: ");
setResult(RESULT_CANCELED);
if (response != null) {
response.onError(AccountManager.ERROR_CODE_CANCELED, "Canceled");
}
finish();
if (SDK_INT >= LOLLIPOP) { finishAndRemoveTask(); } else finish();
}

@Override
Expand Down Expand Up @@ -383,7 +384,7 @@ public void onResponse(AuthResponse response) {
}
checkin(true);
returnSuccessResponse(account);
finish();
if (SDK_INT >= LOLLIPOP) { finishAndRemoveTask(); } else finish();
}

@Override
Expand Down Expand Up @@ -669,7 +670,7 @@ public final void showView() {
@JavascriptInterface
public final void skipLogin() {
Log.d(TAG, "JSBridge: skipLogin");
finish();
loginCanceled();
}

@JavascriptInterface
Expand Down

0 comments on commit ef03f5f

Please sign in to comment.