/*** 设置ADB状态** @param isEnable*/public void setADB(boolean isEnable) {Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.ADB_ENABLED, isEnable ? 1 : 0);}/*** 获取ADB状态** @return*/public boolean getADB() {return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ADB_ENABLED, 0) == 1;}
效果图如下所示
转载请注明出处高通Android 12/13 设置和获取ADB状态-CSDN博客谢谢!