Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Commit 58e7062

Browse files
committed
adding check to gpg login when UI is not ready
1 parent a6afd45 commit 58e7062

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎samples-android/ButtonClicker/jni/ButtonClickerNativeActivity.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ void Engine::InitGooglePlayGameServices() {
106106
*/
107107
void Engine::OnAuthActionStarted(gpg::AuthOperation op) {
108108
startup_mutex_.lock();
109+
if (!initialized_resources_) return;
110+
109111
ndk_helper::JNIHelper::GetInstance()->RunOnUiThread([this, op]() {
110112
EnableUI(false);
111113
if (op == gpg::AuthOperation::SIGN_IN) {
@@ -132,7 +134,11 @@ void Engine::OnAuthActionFinished(gpg::AuthOperation op,
132134
}
133135
});
134136
}
135-
137+
138+
if (!initialized_resources_) {
139+
startup_mutex_.unlock();
140+
return;
141+
}
136142
ndk_helper::JNIHelper::GetInstance()->RunOnUiThread([this, status]() {
137143
EnableUI(true);
138144
button_sign_in_->SetAttribute(

0 commit comments

Comments
 (0)