Skip to content
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth/src/android/auth_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void Auth::DestroyPlatformAuth(AuthData* auth_data) {
// Auth methods which return User pointer.
SetImplFromLocalRef(env, nullptr,
&auth_data->deprecated_fields.android_user_impl);
SetUserImpl(env, auth_data, nullptr);
SetUserImpl(auth_data, nullptr);

auth_data->deprecated_fields.user_internal_deprecated = nullptr;

Expand Down Expand Up @@ -653,7 +653,7 @@ void Auth::SignOut() {
MutexLock lock(auth_data_->future_impl.mutex());
SetImplFromLocalRef(env, nullptr,
&auth_data_->deprecated_fields.android_user_impl);
SetUserImpl(env, auth_data_, nullptr);
SetUserImpl(auth_data_, nullptr);
}

Future<void> Auth::SendPasswordResetEmail(const char* email) {
Expand Down
4 changes: 2 additions & 2 deletions auth/src/android/common_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void ReadSignInResult(jobject result, FutureCallbackData<SignInResult>* d,
// Auth class has not been updated at this point.
SetImplFromLocalRef(env, j_user,
&d->auth_data->deprecated_fields.android_user_impl);
SetUserImpl(env, d->auth_data,
SetUserImpl(d->auth_data,
static_cast<jobject>(
d->auth_data->deprecated_fields.android_user_impl));

Expand Down Expand Up @@ -527,7 +527,7 @@ void ReadUserFromSignInResult(jobject result, FutureCallbackData<User*>* d,
// Auth class has not been updated at this point.
SetImplFromLocalRef(env, j_user,
&d->auth_data->deprecated_fields.android_user_impl);
SetUserImpl(env, d->auth_data,
SetUserImpl(d->auth_data,
static_cast<jobject>(
d->auth_data->deprecated_fields.android_user_impl));
}
Expand Down
3 changes: 1 addition & 2 deletions auth/src/android/common_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ void UpdateCurrentUser(JNIEnv* env, AuthData* auth_data);
/// Note: this function is only used to support DEPRECATED methods which return
/// User*. This functionality should be removed when those deprecated methods
/// are removed.
inline void SetUserImpl(JNIEnv* env, AuthData* _Nonnull auth_data,
jobject j_user) {
inline void SetUserImpl(AuthData* _Nonnull auth_data, jobject j_user) {
assert(auth_data->deprecated_fields.user_internal_deprecated);
auth_data->deprecated_fields.user_internal_deprecated
->set_native_user_object_deprecated(j_user);
Expand Down