Skip to content

Commit

Permalink
Fix bug #55.
Browse files Browse the repository at this point in the history
  • Loading branch information
patloew committed Jun 9, 2018
1 parent 0e83119 commit b344c89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -2,8 +2,8 @@

buildscript {
repositories {
jcenter()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
Expand All @@ -20,8 +20,8 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
jcenter()
}
}

Expand Down
1 change: 1 addition & 0 deletions library/build.gradle
Expand Up @@ -9,6 +9,7 @@ project.archivesBaseName = 'rxlocation'

android {
compileSdkVersion 28
buildToolsVersion "28.0.0"

defaultConfig {
minSdkVersion 14
Expand Down
Expand Up @@ -51,9 +51,11 @@ protected void onGoogleApiClientReady(GoogleApiClient apiClient, FlowableEmitter

@Override
protected void onUnsubscribed(GoogleApiClient apiClient) {
LocationServices.FusedLocationApi.removeLocationUpdates(apiClient, locationListener);
locationListener.onUnsubscribed();
locationListener = null;
if(locationListener != null) {
LocationServices.FusedLocationApi.removeLocationUpdates(apiClient, locationListener);
locationListener.onUnsubscribed();
locationListener = null;
}
}

static class RxLocationListener implements LocationListener {
Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "28.0.0"

defaultConfig {
applicationId "com.patloew.rxlocationsample"
Expand Down

0 comments on commit b344c89

Please sign in to comment.