File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
android/src/main/java/com/zxcpoiu/incallmanager/AppRTC Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2121import android .content .IntentFilter ;
2222import android .content .pm .PackageManager ;
2323import android .media .AudioManager ;
24+ import android .os .Build ;
2425import android .os .Handler ;
2526import android .os .Looper ;
2627import android .os .Process ;
@@ -226,7 +227,8 @@ public State getState() {
226227 */
227228 public void start () {
228229 Log .d (TAG , "start" );
229- if (!hasPermission (apprtcContext , android .Manifest .permission .BLUETOOTH )) {
230+ String p = Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ? android .Manifest .permission .BLUETOOTH_CONNECT : android .Manifest .permission .BLUETOOTH ;
231+ if (!hasPermission (apprtcContext , p )) {
230232 Log .w (TAG , "Process (pid=" + Process .myPid () + ") lacks BLUETOOTH permission" );
231233 return ;
232234 }
You can’t perform that action at this time.
0 commit comments