Skip to content

Commit

Permalink
Fixed bug in Google Awareness generator when no places are available.
Browse files Browse the repository at this point in the history
* Suppressed log message when Accelerometer is stopped.
  • Loading branch information
audaciouscode committed Aug 8, 2017
1 parent d3b9476 commit c938384
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Expand Up @@ -58,11 +58,11 @@ android {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.android.gms:play-services-location:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services-nearby:11.0.0'
compile 'com.google.android.gms:play-services-places:11.0.0'
compile 'com.google.android.gms:play-services-awareness:11.0.0'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-nearby:11.0.4'
compile 'com.google.android.gms:play-services-places:11.0.4'
compile 'com.google.android.gms:play-services-awareness:11.0.4'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'commons-io:commons-io:2.4'
Expand Down
Expand Up @@ -248,7 +248,7 @@ public void run() {

sensors.unregisterListener(me, me.mSensor);
} catch (InterruptedException e) {
e.printStackTrace();
// e.printStackTrace();
}
}
};
Expand Down
Expand Up @@ -458,7 +458,7 @@ public void onResult(@NonNull PlacesResult placesResult) {
if (placesResult.getStatus().isSuccess()) {
List<PlaceLikelihood> places = placesResult.getPlaceLikelihoods();

if (places.size() > 0) {
if (places != null && places.size() > 0) {
Collections.sort(places, new Comparator<PlaceLikelihood>() {
@Override
public int compare(PlaceLikelihood one, PlaceLikelihood two) {
Expand Down

0 comments on commit c938384

Please sign in to comment.