title: Observable creates additional observable in onResume
body: <p>I created Observable on location changes. But the problem is when app came back from background to foreground -> here another observable is created. 
  The process looks like this:
  in onCreate() method I create observable on location. When app goes to background location updates works fine. But when app comes back to foreground an observable creates another observation on location and I've got additional data (another observable on location). To sum up, every time when an app comes back from background to foreground observable creates another observable which is not needed. In onResume() I don't have any implementation.</p>
  
  <p>Does somebody have some idea how to resolve this challenge and ommit additional observables? Just the first one is needed.</p>
  
  <p>Below I show snippet of my code in onCreate:</p>
  
  <pre><code>            .flatMap(new Function&lt;LocationSettingsResult, Observable&lt;Location&gt;&gt;() {
                  @Override
                  public Observable&lt;Location&gt; apply(LocationSettingsResult locationSettingsResult) {
                      if (ActivityCompat.checkSelfPermission(getApplicationContext(),
                              Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
                              &amp;&amp; ActivityCompat.checkSelfPermission(getApplicationContext(),
                              Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
                          // TODO: Consider calling
                          //    ActivityCompat#requestPermissions
                          // here to request the missing permissions, and then overriding
                          //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
                          //                                          int[] grantResults)
                          // to handle the case where the user grants the permission. See the documentation
                          // for ActivityCompat#requestPermissions for more details.
  
                      }
                      LogUtil.i(TAG, "location request: " + lastKnownLocationObservable.toString());
                      return locationProvider.getUpdatedLocation(locationRequest);
                  }
              })
              .observeOn(AndroidSchedulers.mainThread());
  </code></pre>
  
  <p>LogCat:</p>
  
  <pre><code>I/MainActivity: 46.000000 16.000000
  I/MainActivity: 46.000000 16.000000 -&gt; second observable which is not needed.
  </code></pre>