| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed in b/21429947 (commit
674019065bceb4150190bfb1aa63cda9de0a8560), MTP must always be
enabled, even if access to the underlying MTP data is disabled.
Otherwise, Android will not enumerate on the USB bus, and won't
receive notifications from the kernel about USB state changes. This
effectively prevents using MTP functionality on user builds, or
on userdebug/eng builds with adb turned off.
Always ensure that MTP is the default driver mode.
Move the DISALLOW_USB_FILE_TRANSFER filtering of mUsbDataUnlocked from
setting time to the time we post the sticky broadcast.
Remove isUsbDataUnlocked(). It essentially duplicates data in the sticky
broadcast.
Bug: 22447614
Bug: 21429947
Change-Id: I9d0d94cadbf6db6281ebd77bfb7162f9d06520c2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some new internal APIs to enumerate USB Type C ports, query their
status, determine whether they support changing power or data roles,
and doing so. The API also adds a new ACTION_USB_PORT_CHANGED broadcast
for port state changes.
The implementation includes a mechanism for simulating the behavior
of the USB stack. See 'adb shell dumpsys usb -h' for details.
Note that the underlying kernel driver interface is still subject
to change but its behavior has been encapsulated as much as possible.
Bug: 21615151
Change-Id: I0c853ae179248a4550b3e60d02a7a7e65e4546b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When adb is disabled, the default usb mode would be "none", which
would turn off the driver and prevent UsbDeviceManager from receiving
any new USB connect / disconnect messages. This prevents the user
from ever enabling MTP and sharing data when adb is turned off.
As discussed in bug 21429947, we work around this problem by keeping
the USB driver in MTP mode most of the time, so that we continue to
receive USB connect / disconnect messages.
To avoid leaking confidential user photos, this change introduces an
unlocked state. Setting the mtp enabled function is now decoupled from
exposing data on the USB connection. Only if MTP is enabled and
USB data has been unlocked is confidential user data allowed to be
shared.
Bug: 21429947
Change-Id: Iefb5c7e22dc4962bf5226f2ed3d0155b5c7b413c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Introduce a new "charger only" mode. In this mode, MTP is disabled,
and no file transfers can occur.
* Make charger only mode the default.
* Modify "persist.sys.usb.config" so it now only holds the adb status.
* Make the USB settings non-persistent. Unplugging the USB connection will
reset the device back to "charger only" mode.
* Fixup wording per UI guidelines.
TODO: Re-implement MDM restrictions for USB / MTP access controls.
Bug: 18905620
Change-Id: I99a50d9132a81e98187f431166fd9fef4d437e4f
|
|
|
|
|
|
| |
These functions are never called.
Change-Id: Ic436e1036bed717d2c64701fddd9a810abb9443e
|
|
|
|
| |
Change-Id: Ia8630f5ffd05f90347b971110a81f4927060cc4b
|
|
|
|
|
|
|
| |
This allows the android device to appear as a USB MIDI device to
a USB host (like a Mac or a PC) using the f_midi USB gadget driver.
Change-Id: I14f1ba73bcce2c894e77efb8810beac4ffe246d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attach/Detach logic
Decoupling card# and list index
Modern loop constructs
Consistent logging flags
Add class/type flags to device "address" string.
Factored UsbAudioDevice out of UsbAudioManager.
Bug: 18399845
Bug: 18717784
Change-Id: I6f185e1c24091d4c0d21eb7e922a1496748d32c3
|
|
|
|
|
| |
Bug: 15089961
Change-Id: I8a22fad94d2a52d2270c89240b2a47bd1cef17b5
|
|
|
|
|
|
|
|
|
|
|
|
| |
interfaces
Added UsbConfiguration class, as well as accessors to UsbDevice to get configuration list
Added methods to UsbDeviceConnection to select configurations and alternate interfaces.
Also added accessors for USB descriptor name strings and fixed some memory leaks in the JNI code.
Bug: 12425052
Change-Id: Idb990f4d5c054a8cb997eb3f440f6da9f83bce05
|
|\
| |
| |
| |
| |
| |
| | |
"Added missing USB device descriptor fields needed for intent filters"
* commit '43bc1c07d25b7f278a860bbb9118f46ac732593a':
Added missing USB device descriptor fields needed for intent filters
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The UsbDevice object is missing the ManufacturerName, ProductName, and
SerialNumber fields. These are needed by intent filters to further
qualify a USB device that is plugged in while in host mode. These
fields have been added in the jni UsbHostManager implementation and
propagated through UsbHostManager and UsbDevice implementations.
The UsbSettingsManager implementation has been modified to allow
manufacturer-name, product-name, and serial-number tags in intents.
File changes:
modified: api/current.txt
modified: core/java/android/hardware/usb/UsbDevice.java
modified: services/java/com/android/server/usb/UsbHostManager.java
modified: services/java/com/android/server/usb/UsbSettingsManager.java
modified: services/jni/com_android_server_UsbHostManager.cpp
Change-Id: I386884715d1b732b06a63feb77790be6b59b6fe6
Signed-off-by: Robin Cutshaw <robin.cutshaw@gmail.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
"AArch64: Use long for pointers in hardware classes"
* commit '29eadb328a71f912b0d479860286cd606ed3dc87':
AArch64: Use long for pointers in hardware classes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For storing pointers, long is used in hardware classes,
as native pointers can be 64-bit.
In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)
Change-Id: Icdeb67f9273fb2d8f6d88ca68d7f7d0950796fc1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
|
|/ /
| |
| |
| | |
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
|
| |
| |
| |
| |
| |
| |
| |
| | |
Per api review, retain the overloads that do not accept a
buffer start offset.
Bug: 8656781
Change-Id: Ie00aca7d3a4708700c5ddf60e3309e609788a67f
|
| |
| |
| |
| | |
Change-Id: I479df06f2aed33bf29bb8d90be2339a80248beaa
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deprecated existing API which only supported passing buffer
and length in favor of a new one that also supports passing
the start.
Being able to pass a start index is very important because
the kernel imposes size limits on how much data can be transferred
at a time so we often need to transmit large buffers in chunks.
Change-Id: I3484b5e68f1ece61d4645ea04be8ee6a3b79169d
|
|/
|
|
|
|
|
| |
This is called from Settings that has a button to clear secure
adb public keys installed on the device.
Change-Id: I63ef499c049766ef13ea6cb0594ed6719f35e5f3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Also clears allocated buffer before copying.
Closes http://b.android.com/28023
Bug: 5385026
Bug: 6766413
Change-Id: Icf2c1d45db4fb2a9bd1fcfdb29aa7308034faaf0
|
|
|
|
|
|
| |
Closes http://b.android.com/32863
Change-Id: I8fc03ee70209413f279f606b393e79c12ee9c0d2
|
|
|
|
| |
Change-Id: I89d9fd64dc22c90680bb05415cc966c255165af9
|
|
|
|
|
| |
Change-Id: I0e468f4b841de9e1ca7b75a05fc58299dbc78222
Signed-off-by: Mike Lockwood <lockwood@google.com>
|
|
|
|
|
|
|
| |
In this change, only the USB audio accessory support is implemented.
Change-Id: Id9b411319b07a96dc56649ca74cc5f3f89a55a7c
Signed-off-by: Mike Lockwood <lockwood@google.com>
|
|
|
|
| |
Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
|
|
|
|
|
|
|
| |
Bug: 5108883
Change-Id: I211f1ee39987da4a5456d86b49b954c564fa3bf4
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
| |
function
Change-Id: I4340b336f3e91b3b8242f2a66c34a7a7f5c3021f
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Id08df50acb873a94f4765a991ee6a6f5b898ddf5
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
| |
Also added name for new PTP USB function
Change-Id: Ia2775ba2b23ef6a6108ca7e060239eb51c2eecc8
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
| |
Change-Id: Id5b46ede14a838198a59bdc8ed4732942044cfa8
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
| |
Change-Id: I4d243424c6747531a1ac6ab2230c2af73bad4fed
|
|
|
|
|
|
|
| |
Bug: 4091519
Change-Id: Ida79593d5a984f7ffd0934ae7bded23b8faf9eef
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
| |
Change-Id: I47b79f091b300ced60bfc61eff2f771139663aae
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
| |
Bug: 4067029
Change-Id: Icd8f912ab8732b5f770a217b9b3731092597ce02
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
| |
Bug: 4067029
Change-Id: Ib63ab95a6571d6a691834bfb583a68d2e4cfd22e
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
UsbDevice is now just an immutable parcelable object like UsbInterface and
UsbEndpoint.
All IO related functionality is now contained in UsbDeviceConnection
and UsbRequest.
Bug: 4067029
Change-Id: Ia84da0b512a697acc940eee0c3566711c62e1a68
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ia8ec7b29a7532feb00a28d6d325c129a9e041d2b
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
|