尝试在非系统应用程序上解决此问题:“ BluetoothAdapter :: getProfileProxy”。仅在android 8.1上观察到,但不可重现。
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.<init>(BluetoothA2dp.java:405)
at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:3034)
问题:
为什么出现此权限“ INTERACT_ACROSS_USERS”。 (我们检查蓝牙许可)
boolean doBind() {
Intent intent = new Intent(IBluetoothA2dp.class.getName());
ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
intent.setComponent(comp); ...
权限问题似乎在其他地方-在某些系统服务中。
想知道是否有人可以解释这个问题。