Skip to content

Commit 797e3b9

Browse files
smilesa-maurice
authored andcommitted
Removed use of deprecated FutureHandle in Google Play Services availability.
PiperOrigin-RevId: 264701056
1 parent b8cc96e commit 797e3b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/google_play_services/availability_android.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct AvailabilityData {
101101

102102
// Future support for MakeGooglePlayServicesAvailable.
103103
firebase::ReferenceCountedFutureImpl future_impl;
104-
FutureHandle future_handle_make;
104+
firebase::SafeFutureHandle<void> future_handle_make;
105105
bool classes_loaded;
106106
// Whether we've already checked for Google Play services availability.
107107
bool fetched_availability;
@@ -120,7 +120,7 @@ JNIEXPORT void JNICALL GoogleApiAvailabilityHelper_onCompleteNative(
120120
g_data->cached_availability = kAvailabilityAvailable;
121121
}
122122
g_data->future_impl.Complete(
123-
reinterpret_cast<FutureHandle>(g_data->future_handle_make), status_code,
123+
g_data->future_handle_make, status_code,
124124
firebase::util::JniStringToString(env, status_message).c_str());
125125
}
126126
}
@@ -275,7 +275,7 @@ Future<void> MakeAvailable(JNIEnv* env, jobject activity) {
275275

276276
if (g_data && !g_data->future_impl.ValidFuture(g_data->future_handle_make)) {
277277
g_data->future_handle_make =
278-
g_data->future_impl.Alloc<void>(kAvailabilityFnMakeAvail);
278+
g_data->future_impl.SafeAlloc<void>(kAvailabilityFnMakeAvail);
279279

280280
if (g_data->fetched_availability &&
281281
g_data->cached_availability == kAvailabilityAvailable) {

0 commit comments

Comments
 (0)