Loading core/res/res/values/config.xml +7 −0 Original line number Diff line number Diff line Loading @@ -745,4 +745,11 @@ <!-- Base "touch slop" value used by ViewConfiguration as a movement threshold where scrolling should begin. --> <dimen name="config_viewConfigurationTouchSlop">8dp</dimen> <!-- CM CHANGES START HERE --> <!-- Use legacy USB device manager. --> <bool name="config_usesLegacyUsbDeviceManager">false</bool> </resources> services/java/com/android/server/usb/LegacyUsbDeviceManager.java 0 → 100644 +643 −0 File added.Preview size limit exceeded, changes collapsed. Show changes services/java/com/android/server/usb/UsbDeviceManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,14 @@ public class UsbDeviceManager { } }; // Dummy constructor to use when extending class public UsbDeviceManager() { mContext = null; mContentResolver = null; mSettingsManager = null; mHasUsbAccessory = false; } public UsbDeviceManager(Context context, UsbSettingsManager settingsManager) { mContext = context; mContentResolver = context.getContentResolver(); Loading services/java/com/android/server/usb/UsbService.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.usb; import android.app.PendingIntent; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Resources; import android.hardware.usb.IUsbManager; import android.hardware.usb.UsbAccessory; import android.hardware.usb.UsbDevice; Loading Loading @@ -53,6 +54,8 @@ public class UsbService extends IUsbManager.Stub { if (new File("/sys/class/android_usb").exists()) { mDeviceManager = new UsbDeviceManager(context, mSettingsManager); } else if(Resources.getSystem().getBoolean(com.android.internal.R.bool.config_usesLegacyUsbDeviceManager)) mDeviceManager = new LegacyUsbDeviceManager(context, mSettingsManager); } public void systemReady() { Loading Loading
core/res/res/values/config.xml +7 −0 Original line number Diff line number Diff line Loading @@ -745,4 +745,11 @@ <!-- Base "touch slop" value used by ViewConfiguration as a movement threshold where scrolling should begin. --> <dimen name="config_viewConfigurationTouchSlop">8dp</dimen> <!-- CM CHANGES START HERE --> <!-- Use legacy USB device manager. --> <bool name="config_usesLegacyUsbDeviceManager">false</bool> </resources>
services/java/com/android/server/usb/LegacyUsbDeviceManager.java 0 → 100644 +643 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
services/java/com/android/server/usb/UsbDeviceManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,14 @@ public class UsbDeviceManager { } }; // Dummy constructor to use when extending class public UsbDeviceManager() { mContext = null; mContentResolver = null; mSettingsManager = null; mHasUsbAccessory = false; } public UsbDeviceManager(Context context, UsbSettingsManager settingsManager) { mContext = context; mContentResolver = context.getContentResolver(); Loading
services/java/com/android/server/usb/UsbService.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.usb; import android.app.PendingIntent; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Resources; import android.hardware.usb.IUsbManager; import android.hardware.usb.UsbAccessory; import android.hardware.usb.UsbDevice; Loading Loading @@ -53,6 +54,8 @@ public class UsbService extends IUsbManager.Stub { if (new File("/sys/class/android_usb").exists()) { mDeviceManager = new UsbDeviceManager(context, mSettingsManager); } else if(Resources.getSystem().getBoolean(com.android.internal.R.bool.config_usesLegacyUsbDeviceManager)) mDeviceManager = new LegacyUsbDeviceManager(context, mSettingsManager); } public void systemReady() { Loading