History log of /frameworks/base/services/java/com/android/server/usb/UsbService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd7a17c645761ac0b64c75346b159dd30cbcb01c 22-Dec-2012 Benoit Goby <benoit@android.com> UsbDebuggingManager: Add interface to clear secure adb keys

This is called from Settings that has a button to clear secure
adb public keys installed on the device.

Change-Id: I63ef499c049766ef13ea6cb0594ed6719f35e5f3
/frameworks/base/services/java/com/android/server/usb/UsbService.java
8b2c3a14603d163d7564e6f60286995079687690 12-Nov-2012 Jeff Sharkey <jsharkey@android.com> Useful annotations for code documentation.

Bug: 6537978
Change-Id: I806c3c09e3255f8789455f13bf37c1dde2a93f1f
/frameworks/base/services/java/com/android/server/usb/UsbService.java
fc3f24b4b60c10e0d3f41f70df37e11ea311cc2c 02-Oct-2012 Jeff Sharkey <jsharkey@android.com> Make USB services multi-user aware.

USB settings are now isolated per-user, since they revolve around
installed packages. User-specific settings are returned based on
calling user, or referenced by UserHandle passed to SystemUI. Each
settings Context is wrapped as a specific user, so all broadcasts are
sent correctly. Upgrades any existing USB settings to OWNER.

Physical events, like new devices, are routed to the currently active
user. Switch to using AtomicFile when persisting settings.

Bug: 7244888
Change-Id: I8a723ad3d55ac1bff99276c5f3a3f5e8f013432f
/frameworks/base/services/java/com/android/server/usb/UsbService.java
4e68bd420b6cfdbeadb5e69aa6448665b2da762b 26-Apr-2012 Benoit Goby <benoit@android.com> Add UsbDebuggingManager and UsbDebuggingActivity

The UsbDebuggingManager listens to adbd requests and displays a dialog
when the public key authentification fails, for the user to confirm if it
wants to allow USB debugging from the attached host. If the user chooses
to always allow USB debugging, the UsbDebuggingManager writes the public
key to adbd's config file so that the public key authenfication succeeds
next time.

Change-Id: I115c828331d8e326c380844ee33915d5dff22260
/frameworks/base/services/java/com/android/server/usb/UsbService.java
166b05e0ce913711d27ce1a116b3f1fd906822e4 24-Apr-2012 Mike Lockwood <lockwood@google.com> UsbService: Add support for accessory initiating USB audio support

Change-Id: I0e468f4b841de9e1ca7b75a05fc58299dbc78222
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
f59717ddb5ef324ee3fdb12b83e7d1b709793d28 22-Jun-2011 Mike Lockwood <lockwood@android.com> Combine UsbManager.setPrimaryFunction and setDefaultFunction

Due to the property trigger on persist.sys.usb.config,
setting the default function also sets the current function.
Now we combine both of these methods into setCurrentFunction, which has
a "makeDefault" option to make the new function the default.

This change should eliminate some problems with setting properties due to
multiple property triggers happening at the same time.

Change-Id: I9851299e9c2ee20475eada1a8104c0d50bf5a9e1
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
02e4569b5f126ca916a7473117ddd17d4f2ccbbb 14-Jun-2011 Mike Lockwood <lockwood@android.com> USB: Support for new USB gadget drivers

Change-Id: Id08df50acb873a94f4765a991ee6a6f5b898ddf5
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
46d0adf8256a42416584765625852b6e48497c90 26-May-2011 Mike Lockwood <lockwood@android.com> UsbService: Refactor USB host and device support into two separate classes

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>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
4f0f3561edfdcdff0ac90f0ea26c64cb16efe643 30-Mar-2011 Mike Lockwood <lockwood@android.com> UsbService: Make USB disconnect handling for accessory mode more robust

Handle the case where the kernel driver is in accessory mode but we failed
to initialize it at the framework level. On disconnnect, check to see if the
accessory kernel driver is enabled rather than checking mCurrentAccessory.
That way we will restore the USB state in the kernel even if mCurrentAccessory
is null.

Change-Id: I35d458f21a8b21611946da523d0f53723cab0540
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
1c0e543638fa940651b675645146fd71c2ebd9b9 19-Mar-2011 Mike Lockwood <lockwood@android.com> UsbService: Handle the case where a USB accessory connects as the device is booting

Bug: 4129297

Change-Id: I8f9d085805fb598572f9b00952c3cd38cfab461b
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
607710ad12a7503c3b84c34430d1716fe7264f20 09-Mar-2011 Mike Lockwood <lockwood@android.com> UsbService: Don't require permissions for UsbManager.getCurrentAccessory()

Permission check should only happen in openAccessory()
Otherwise an application will not be able to check for the current accessory
and ask for permissions (if it is a suitable match for the application)

BUG: 4069037

Change-Id: If5b44ebda2e8077598d96629163cc74aa336589e
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
c6f23e8521dedac7a07119031913235be3ca37c3 09-Mar-2011 Mike Lockwood <lockwood@android.com> Change UsbManager.requestPermission to only grant permission temporarily

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>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
3a68b8338b431eb15d28e92f06452efbbda9493e 08-Mar-2011 Mike Lockwood <lockwood@android.com> USB: Add API and dialog for apps to request permissions for USB devices and 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
/frameworks/base/services/java/com/android/server/usb/UsbService.java
b98d02b8b29062025fa702b82894944e242fe2e7 03-Mar-2011 Mike Lockwood <lockwood@android.com> UsbService: Make sure the USB accessory function is disabled when we disconnect

BUG: 3493041

Change-Id: I95a34742d4b670a13ba5717f0551f3ce40af3c24
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
7a976a43700a17a29a0671c8456e41ec0a1086b9 01-Mar-2011 Mike Lockwood <lockwood@android.com> Fix UsbDeviceSettingsManager locking.

Change-Id: I93117ce791de95b0ab95017601f5d90ed5dd7a6a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
c4308f01c965571dc2354107c3574df113e397ee 01-Mar-2011 Mike Lockwood <lockwood@android.com> Move USB framework support from android.hardware to android.hardware.usb package

Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
f4ca247158ffb83139d675ac0e1d25239c310be2 27-Feb-2011 Mike Lockwood <lockwood@android.com> Add platform features for USB host and USB accessory support.

Also removed config_hasUsbHostSupport framework resource, which is now obsolete.

Change-Id: I6f18cc1c4f68085de8b8363e1b5edff79aff404f
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/services/java/com/android/server/usb/UsbService.java
02eb8746de2d60563ec2751a34d20923192e4293 27-Feb-2011 Mike Lockwood <lockwood@android.com> UsbManager: Enhancements for managing USB devices and accessories

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>
/frameworks/base/services/java/com/android/server/usb/UsbService.java