android源码修改USB权限,去掉USB弹出框

\\192.168.1.113\jd_work3_rk3399_sdk\rk3188_5.1_mid_g11\frameworks\base\packages\SystemUI\src\com\android\systemui\usb\UsbPermissionActivity.java

 

 

 

 

// add "always use" checkbox

LayoutInflater inflater = (LayoutInflater)getSystemService(

Context.LAYOUT_INFLATER_SERVICE);

ap.mView = inflater.inflate(com.android.internal.R.layout.always_use_checkbox, null);

mAlwaysUse = (CheckBox)ap.mView.findViewById(com.android.internal.R.id.alwaysUse);

if (mDevice == null) {

mAlwaysUse.setText(R.string.always_use_accessory);

} else {

mAlwaysUse.setText(R.string.always_use_device);

}

mAlwaysUse.setOnCheckedChangeListener(this);

mClearDefaultHint = (TextView)ap.mView.findViewById(

com.android.internal.R.id.clearDefaultHint);

mClearDefaultHint.setVisibility(View.GONE);

 

//setupAlert();

if(mPackageName.startsWith("com.jiangdou.jdusb")) {

mPermissionGranted = true;

finish();

} else {

setupAlert();

}

}

 

你可能感兴趣的:(android源码修改USB权限,去掉USB弹出框)