title: SecurityException: android.permission.INTERACT_ACROSS_USERS missing for bluetooth access
body: <p>Facing this issue on non system app when attempting to do: "BluetoothAdapter::getProfileProxy". Observed only on android 8.1 but not reproducible.</p>
  
  <pre><code>Caused by: java.lang.SecurityException: query intent receivers: Neither user 15010171 nor current process has android.permission.INTERACT_ACROSS_USERS.
  at android.os.Parcel.readException(Parcel.java:2021)
  at android.os.Parcel.readException(Parcel.java:1967)
  at android.content.pm.IPackageManager$Stub$Proxy.queryIntentServices(IPackageManager.java:4830)
  at android.app.ApplicationPackageManager.queryIntentServicesAsUser(ApplicationPackageManager.java:1255)
  at android.content.Intent.resolveSystemServiceAsUser(Intent.java:8365)
  at android.bluetooth.BluetoothA2dp.doBind(BluetoothA2dp.java:432)
  at android.bluetooth.BluetoothA2dp.&lt;init&gt;(BluetoothA2dp.java:405)
  at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:3034) 
  </code></pre>
  
  <p>Questions:</p>
  
  <ul>
  <li><p>Why this permission "INTERACT_ACROSS_USERS" is coming as an issue. (we check for bluetooth permission)</p></li>
  <li><p>As per <a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothA2dp.java" rel="nofollow noreferrer">https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothA2dp.java</a> </p>
  
  <pre><code>boolean doBind() {
  Intent intent = new Intent(IBluetoothA2dp.class.getName());
  ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
  intent.setComponent(comp); ...
  </code></pre>
  
  <p>It looks like the permission issue is somewhere else - in some system service.</p></li>
  </ul>
  
  <p>Wondering if someone can explain the issue. </p>