diff options
author | Nick Kralevich <nnk@google.com> | 2015-05-09 17:27:50 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2015-05-10 21:57:56 -0700 |
commit | d9c7f2456957a5610cbbca1b2e31aa7b3574c50d (patch) | |
tree | 8690f53330ce2dfef5c1ced105bceb3ee5e83ac7 /services/usb | |
parent | 1c86159142aa8b5d582cd53e1d16b874c99d3bc4 (diff) | |
download | frameworks_base-d9c7f2456957a5610cbbca1b2e31aa7b3574c50d.zip frameworks_base-d9c7f2456957a5610cbbca1b2e31aa7b3574c50d.tar.gz frameworks_base-d9c7f2456957a5610cbbca1b2e31aa7b3574c50d.tar.bz2 |
UsbManager / UsbService / UsbDeviceManager: delete unused code
These functions are never called.
Change-Id: Ic436e1036bed717d2c64701fddd9a810abb9443e
Diffstat (limited to 'services/usb')
-rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 13 | ||||
-rw-r--r-- | services/usb/java/com/android/server/usb/UsbService.java | 10 |
2 files changed, 0 insertions, 23 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 6adb8be..f84beb6 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -78,8 +78,6 @@ public class UsbDeviceManager { "/sys/class/android_usb/android0/functions"; private static final String STATE_PATH = "/sys/class/android_usb/android0/state"; - private static final String MASS_STORAGE_FILE_PATH = - "/sys/class/android_usb/android0/f_mass_storage/lun/file"; private static final String RNDIS_ETH_ADDR_PATH = "/sys/class/android_usb/android0/f_rndis/ethaddr"; private static final String AUDIO_SOURCE_PCM_PATH = @@ -832,8 +830,6 @@ public class UsbDeviceManager { + FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim()); pw.println(" Kernel function list: " + FileUtils.readTextFile(new File(FUNCTIONS_PATH), 0, null).trim()); - pw.println(" Mass storage backing file: " - + FileUtils.readTextFile(new File(MASS_STORAGE_FILE_PATH), 0, null).trim()); } catch (IOException e) { pw.println("IOException: " + e); } @@ -866,15 +862,6 @@ public class UsbDeviceManager { mHandler.sendMessage(MSG_SET_CURRENT_FUNCTIONS, functions, makeDefault); } - public void setMassStorageBackingFile(String path) { - if (path == null) path = ""; - try { - FileUtils.stringToFile(MASS_STORAGE_FILE_PATH, path); - } catch (IOException e) { - Slog.e(TAG, "failed to write to " + MASS_STORAGE_FILE_PATH); - } - } - private void readOemUsbOverrideConfig() { String[] configList = mContext.getResources().getStringArray( com.android.internal.R.array.config_oemUsbModeOverride); diff --git a/services/usb/java/com/android/server/usb/UsbService.java b/services/usb/java/com/android/server/usb/UsbService.java index fda8076..e03884f 100644 --- a/services/usb/java/com/android/server/usb/UsbService.java +++ b/services/usb/java/com/android/server/usb/UsbService.java @@ -271,16 +271,6 @@ public class UsbService extends IUsbManager.Stub { } @Override - public void setMassStorageBackingFile(String path) { - mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); - if (mDeviceManager != null) { - mDeviceManager.setMassStorageBackingFile(path); - } else { - throw new IllegalStateException("USB device mode not supported"); - } - } - - @Override public void allowUsbDebugging(boolean alwaysAllow, String publicKey) { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); mDeviceManager.allowUsbDebugging(alwaysAllow, publicKey); |