客户要求,在usb插入的时候,弹出偏好设置页面。以下是修改方法
+++b/android/frameworks/base/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -1189,7 +1189,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
|| ("0".equals(getSystemProperty("persist.charging.notify", "")))) {
return;
}
-
+ boolean isOpen=false;
// Dont show the notification when connected to a USB peripheral
// and the link does not support PR_SWAP and DR_SWAP
if (mHideUsbNotification && !mSupportsAllCombinations) {
@@ -1273,6 +1273,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
if (titleRe