title: Changing target SDK from 28 to 29 results in BLE scan not working
body: <p>I am working on Android app which need to be connected to BLE devices.
  The app works as expected but now when I changes the target SDK to 29 (which was previously API 28) the app stops getting any scan results.
  At API level 28 when the app starts I check the permission. If not granted I ask for it and then start scanning as usual for BLE devices. Then I get the scan results which include the BLE devices around me. I confirm that by printing log messages.
  Now when I changed the target SDK to 29 (which is required by play store to update the app) the app stops getting scan results. I am not getting messages in the logs either.</p>
  <p>Device which is working with API 28 and not with API 29: Samsung S10 with Android 10.</p>
  <p>Permissions I added in the manifest</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_ADMIN&quot; /&gt;
  
  &lt;!-- If your app targets Android 9 or lower, you can declare
       ACCESS_COARSE_LOCATION instead. --&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot;/&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_BACKGROUND_LOCATION&quot; /&gt;
  </code></pre>
  <p>Permission I request from user at runtime:</p>
  <pre><code>if(ContextCompat.checkSelfPermission(this,
              Manifest.permission.ACCESS_COARSE_LOCATION)
              != PackageManager.PERMISSION_GRANTED){
          //here code for asking permission from user.
          ActivityCompat.requestPermissions(MainActivity.this,
                  new String[] { Manifest.permission.ACCESS_COARSE_LOCATION },
                  REQUEST_ENABLE_LOCATION);
      }
  </code></pre>
  <p>The code where I interact with scan results:</p>
  <pre><code>public void onScanResult(int callbackType, ScanResult result) {
      BluetoothDevice device = result.getDevice();
      String deviceName = device.getName();
           if (deviceName != null) {
                      if (checkdevicename(deviceName)){
  
                          Log.d(TAG, &quot;Connect:&quot; + deviceName);
                          isConnected = true;
                          mDevice = device;
  
  //                             // connecting to device. establishing gatt connection.
                          device.connectGatt(ma,false,mGattCallback);
                          stopScan();
  
                      } else {
                          Log.d(TAG,&quot;DEVICE NAME =====&gt;&quot;+deviceName);
  
                      }
  //         super.onScanResult(callbackType, result);
  }}
  </code></pre>