Skip to content
Open
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ReactiveLocationProvider(Context ctx) {
/**
* Creates location provider with custom handler in which all GooglePlayServices callbacks are called.
*
* @param ctx preferably application context
* @param ctx preferably application context
* @param handler on which all GooglePlayServices callbacks are called
* @see com.google.android.gms.common.api.GoogleApiClient.Builder#setHandler(android.os.Handler)
*/
Expand Down Expand Up @@ -312,7 +312,7 @@ public Observable<ActivityRecognitionResult> getDetectedActivity(int detectInter
* Observable that can be used to check settings state for given location request.
*
* @param locationRequest location request
* @return observable that emits check result of location settings
* @return observable that emits single check result of location settings
* @see com.google.android.gms.location.SettingsApi
*/
public Observable<LocationSettingsResult> checkLocationSettings(final LocationSettingsRequest locationRequest) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should change return type to Single as well.

Expand All @@ -322,7 +322,8 @@ public Observable<LocationSettingsResult> checkLocationSettings(final LocationSe
public Observable<LocationSettingsResult> apply(GoogleApiClient googleApiClient) {
return fromPendingResult(LocationServices.SettingsApi.checkLocationSettings(googleApiClient, locationRequest));
}
});
})
.take(1);
}

/**
Expand Down