summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/usb/UsbDeviceSettingsManager.java
AgeCommit message (Collapse)Author
2011-05-31UsbService: Refactor USB host and device support into two separate classesMike Lockwood
Host support is in UsbHostManager, device support is in UsbDeviceManager Renamed UsbDeviceSettingsManager to UsbSettingsManager Change-Id: Ib76e72957c233fa7f08f454d4d9a2a1da6368cc7 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-13Add a dialog to ask user to start an application for a USB device or accessoryMike Lockwood
This is used when there is only one application available and the user has not chosen to start it by default. If more than one application is available we continue to use UsbResolverActivity Bug: 4074719 Change-Id: Id61f2ccc6de5b9ac70fb4670006ff1fee2028d55 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11Clear default for USB device/accessory when new matching app is installedMike Lockwood
Bug: 4063041 Change-Id: Ia1b4f29d3e54ec21aa64407720d9d5db62855380 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-10Support for USB accessory URIsMike Lockwood
If a USB accessory is attached and we have no application that supports it, display a dialog offering the user the option to visit the accessory's website if the accessory has a URI. Bug: 4073248 Change-Id: I30e2a802493fb6e203532a7f79402379c40bc3b8 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09UsbAccessory: Add URI string, replace type string with descriptionMike Lockwood
This is a first step toward adding USB accessory URI support BUG: 4073248 Modified USB accessory matching logic to look only at manufacturer, model and version (description and URI are not considered when matching apps to accessories) Also added test for USB accessory protocol version to accessorytest BUG: 4080288 Change-Id: I992a3433c74efa7a7db37bf030f02c1f0c92f9e2 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09Change UsbManager.requestPermission to only grant permission temporarilyMike Lockwood
If the user approves an application to access a USB device or accessory without choosing it as the default application, then permission is granted only until the device or accessory is disconnected. Only applications chosen as the default choice have permissions assigned persistently. BUG: 4061035 Change-Id: Ic4f6271a91b2fc56bbeef82c579e26d88c63ae56 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-08USB: Add API and dialog for apps to request permissions for USB devices and ↵Mike Lockwood
accessories New APIs: UsbManager.hasPermission returns true if the caller has permission for the given device or accessory UsbManager.requestPermission poses a dialog to allow the user to give the caller permission for the device or accessory. Result is returned via a PendingIntent. No dialog is displayed if the caller already has permission. Also moved UsbResolverActivity to SystemUI package BUG: 4069037 Change-Id: I93be769501a8776b49ac26e468af19f8fa2114c9
2011-03-08UsbService: Automatically use system apps by default if it is the only choiceMike Lockwood
If only one app is installed that supports a USB device or accessory and that app is in the system partition, then use that activity by default and rather than displaying the USB app chooser dialog. BUG: 4060064 Change-Id: I49bf22a439e9676039b6f612c9bb622ab426066c Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 UsbManager: Don't display activity picker if there are no apps available ↵Mike Lockwood
for an accessory Change-Id: I3ef569121e8d7d45584dbca9761451cbdf99a3e9 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02UsbManager: Don't display activity picker if there are no apps available for ↵Mike Lockwood
a device BUG: 3506988 Change-Id: Iaf3c50b9ba422e6bcd687338db996a4193441c97 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01UsbDeviceSettingsManager: don't write settings file when not necessaryMike Lockwood
Change-Id: I48772f71822e3489f9e6c640985055569a656124 Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01Fix UsbDeviceSettingsManager locking.Mike Lockwood
Change-Id: I93117ce791de95b0ab95017601f5d90ed5dd7a6a Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01Move USB framework support from android.hardware to android.hardware.usb packageMike Lockwood
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28UsbManager: Enhancements for managing USB devices and accessoriesMike Lockwood
When a USB device or accessory is connected, the UsbService now asks the user which application to associate with the device or accessory. Applications interested in devices or accessories must specify the devices they work with via meta-data attached to their manifest. Permission to communicate with the device is assigned when the user chooses the activity to use for the device. The user has the option of clicking the "always use this application" checkbox to make the assignment automatic in the future. The user may later clear this preference and revoke permission for an application to have permission to communicate with the device by clicking the "Clear defaults" button for the activity in the Manage Applications panel in Settings. Added class UsbResolveActivity (a subclass or ResolveActivity for choosing an activity for a USB device or accessory) Added UsbDeviceManager, which manages the mapping between USB devices/accessories and applications, including default applications for devices and accessories, and manages application permissions. Add interface to allow Settings to clear device and accessory preferences and permissions for an application. Remove obsolete ACCESS_USB permission. Add new signatureOrSystem MANAGE_USB permission to allow administrating preferences and permissions. Moved UsbService.java to a "usb" subdirectory, along with new classes UsbResolveActivity and UsbDeviceManager. Change-Id: I92554381e9779e68ce380daaee4e1401fb875703 Signed-off-by: Mike Lockwood <lockwood@android.com>