summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2015-06-30 17:57:12 -0700
committerJeff Brown <jeffbrown@google.com>2015-07-09 12:55:56 -0700
commit460a146eb8f827e4e70f2dd93d1ba852d0feb06b (patch)
tree6255bfcddfa68711bcb8abd07cd673ffe7d1c66d /services/devicepolicy
parent6826b25c223c91d603f3a8e2b0d1ce5abe1e13e5 (diff)
downloadframeworks_base-460a146eb8f827e4e70f2dd93d1ba852d0feb06b.zip
frameworks_base-460a146eb8f827e4e70f2dd93d1ba852d0feb06b.tar.gz
frameworks_base-460a146eb8f827e4e70f2dd93d1ba852d0feb06b.tar.bz2
Clean up USB Manager and fix ADB.
Moved functions which parse the USB functions list into one common place on UsbManager. Deleted the no longer supported USB_FUNCTION_MASS_STORAGE. Ensured that the UserManager.DISALLOW_USB_FILE_TRANSFER rule is consistently applied during user switch and when changing the current USB functions and make sure it only affects MTP and PTP. Collapsed the boot completed and user switched receivers to ensure consistent ordering of side-effects. Validate the list of functions passed to setCurrentFunction() so that the separation of concerns is clearer. It was somewhat ambiguous as to whether functions such as ADB could / should be enabled through that interface. Improved the docs for clarity. Fixed a bunch of broken stuff related to the USB config persistent property (list of default functions) that could cause ADB and other functions to not work at all. Added new failsafes to ensure that we reliably get back into a happy state. Bug: 22206076 Change-Id: I02915ddfce7193a8f67a14f0d76bab22fc575dfa
Diffstat (limited to 'services/devicepolicy')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 5040bd0..c3174a3 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -60,7 +60,6 @@ import android.content.pm.ServiceInfo;
import android.content.pm.UserInfo;
import android.database.ContentObserver;
import android.graphics.Bitmap;
-import android.hardware.usb.UsbManager;
import android.media.AudioManager;
import android.media.IAudioService;
import android.net.ConnectivityManager;
@@ -5434,10 +5433,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0,
userHandle);
- } else if (UserManager.DISALLOW_USB_FILE_TRANSFER.equals(key)) {
- UsbManager manager =
- (UsbManager) mContext.getSystemService(Context.USB_SERVICE);
- manager.setCurrentFunction("none");
} else if (UserManager.DISALLOW_SHARE_LOCATION.equals(key)) {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF,