台州服务网站,淘宝关键词挖掘工具,手机购物网站 建站,wordpress首行空两格1、最近给一个项目做了一款基础功能的自动测试#xff0c;在打开蓝牙时#xff0c;有一个是否同意的提示框要去掉#xff0c;即默认同意打开蓝牙。
2、路径#xff1a;
packages/apps/Settings/src/com/android/settings/bluetooth/RequestPermissionActivity.java// Sho…1、最近给一个项目做了一款基础功能的自动测试在打开蓝牙时有一个是否同意的提示框要去掉即默认同意打开蓝牙。
2、路径
packages/apps/Settings/src/com/android/settings/bluetooth/RequestPermissionActivity.java// Show the helper dialog to ask the user about enabling bt AND discoverymRequestDialog RequestPermissionHelper.INSTANCE.requestEnable(this, mAppLabel,mRequest REQUEST_ENABLE_DISCOVERABLE ? mTimeout : -1,() - {onEnableConfirmed();return Unit.INSTANCE;},() - {cancelAndFinish();return Unit.INSTANCE;});if (mRequestDialog ! null) {if(mAppLabel.equals(POS Steward) || mAppLabel.equals(工厂检测)){onEnableConfirmed();}else{mRequestDialog.show();}}break;上面代码中我是通过应用名称进行判断的。