diff options
| author | 2011-03-08 10:08:59 -0500 | |
|---|---|---|
| committer | 2011-03-08 21:22:19 -0500 | |
| commit | 3a68b8338b431eb15d28e92f06452efbbda9493e (patch) | |
| tree | 51d551ff5d51e1a141250aff2d6dd604ee3e6e4d /api/current.xml | |
| parent | 8c7d8c3ccb37edff424ca01c6474cbed2154d954 (diff) | |
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
Diffstat (limited to 'api/current.xml')
| -rw-r--r-- | api/current.xml | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/api/current.xml b/api/current.xml index 4996e6aeb6de..3a24d178bc0e 100644 --- a/api/current.xml +++ b/api/current.xml @@ -95457,6 +95457,32 @@ visibility="public" > </method> +<method name="hasPermission" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="device" type="android.hardware.usb.UsbDevice"> +</parameter> +</method> +<method name="hasPermission" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="accessory" type="android.hardware.usb.UsbAccessory"> +</parameter> +</method> <method name="isFunctionEnabled" return="boolean" abstract="false" @@ -95509,6 +95535,36 @@ <parameter name="device" type="android.hardware.usb.UsbDevice"> </parameter> </method> +<method name="requestPermission" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="device" type="android.hardware.usb.UsbDevice"> +</parameter> +<parameter name="pi" type="android.app.PendingIntent"> +</parameter> +</method> +<method name="requestPermission" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="accessory" type="android.hardware.usb.UsbAccessory"> +</parameter> +<parameter name="pi" type="android.app.PendingIntent"> +</parameter> +</method> <field name="ACTION_USB_ACCESSORY_ATTACHED" type="java.lang.String" transient="false" @@ -95586,6 +95642,17 @@ visibility="public" > </field> +<field name="EXTRA_PERMISSION_GRANTED" + type="java.lang.String" + transient="false" + volatile="false" + value=""permission"" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="USB_CONFIGURATION" type="java.lang.String" transient="false" @@ -267304,7 +267371,7 @@ deprecated="not deprecated" visibility="public" > -<parameter name="arg0" type="T"> +<parameter name="t" type="T"> </parameter> </method> </interface> |