1{
2  "methods": {
3    "addOrUpdateUsbDevice(android.hardware.usb.UsbDevice,boolean)": {
4      "isImplementation": false,
5      "modifiers": [
6        "public"
7      ],
8      "params": [
9        "usbDevice",
10        "hasPermission"
11      ],
12      "returnType": "void",
13      "exceptions": [],
14      "name": "addOrUpdateUsbDevice(android.hardware.usb.UsbDevice,boolean)",
15      "documentation": "Adds a USB device into available USB devices map with permission value. If the USB device\nalready exists, updates the USB device with new permission value.\n"
16    },
17    "addPort(java.lang.String)": {
18      "isImplementation": false,
19      "modifiers": [
20        "public"
21      ],
22      "params": [
23        "portId"
24      ],
25      "returnType": "void",
26      "exceptions": [],
27      "name": "addPort(java.lang.String)",
28      "documentation": "Adds a USB port to UsbManager. "
29    },
30    "clearPorts()": {
31      "isImplementation": false,
32      "modifiers": [
33        "public"
34      ],
35      "params": [],
36      "returnType": "void",
37      "exceptions": [],
38      "name": "clearPorts()",
39      "documentation": "Remove all added ports from UsbManager. "
40    },
41    "createUsbPort(android.hardware.usb.UsbManager,java.lang.String,int)": {
42      "isImplementation": false,
43      "modifiers": [
44        "private",
45        "static"
46      ],
47      "params": [
48        "usbManager",
49        "id",
50        "supportedModes"
51      ],
52      "returnType": "java.lang.Object",
53      "exceptions": [],
54      "name": "createUsbPort(android.hardware.usb.UsbManager,java.lang.String,int)",
55      "documentation": "Helper method for creating a {@link UsbPort}.\n\nReturns Object to avoid referencing the API M+ UsbPort when running on older platforms.\n"
56    },
57    "createUsbPortStatus(int,int,int,int)": {
58      "isImplementation": false,
59      "modifiers": [
60        "private",
61        "static"
62      ],
63      "params": [
64        "currentMode",
65        "currentPowerRole",
66        "currentDataRole",
67        "supportedRoleCombinations"
68      ],
69      "returnType": "java.lang.Object",
70      "exceptions": [],
71      "name": "createUsbPortStatus(int,int,int,int)",
72      "documentation": "Helper method for creating a {@link UsbPortStatus}.\n\nReturns Object to avoid referencing the API M+ UsbPortStatus when running on older platforms.\n"
73    },
74    "getAccessoryList()": {
75      "isImplementation": true,
76      "modifiers": [
77        "protected"
78      ],
79      "params": [],
80      "returnType": "android.hardware.usb.UsbAccessory[]",
81      "exceptions": [],
82      "name": "getAccessoryList()"
83    },
84    "getDeviceList()": {
85      "isImplementation": true,
86      "modifiers": [
87        "protected"
88      ],
89      "params": [],
90      "returnType": "java.util.HashMap\u003cjava.lang.String,android.hardware.usb.UsbDevice\u003e",
91      "exceptions": [],
92      "name": "getDeviceList()",
93      "documentation": "Returns a HashMap containing all USB devices currently attached. USB device name is the key for\nthe returned HashMap. The result will be empty if no devices are attached, or if USB host mode\nis inactive or unsupported.\n"
94    },
95    "getPortStatus(java.lang.Object)": {
96      "isImplementation": true,
97      "modifiers": [
98        "protected"
99      ],
100      "params": [
101        "port"
102      ],
103      "returnType": "java.lang.Object",
104      "exceptions": [],
105      "minSdk": 23,
106      "name": "getPortStatus(java.lang.Object)"
107    },
108    "getPorts()": {
109      "isImplementation": true,
110      "modifiers": [
111        "protected"
112      ],
113      "params": [],
114      "returnType": "java.lang.Object",
115      "exceptions": [],
116      "minSdk": 23,
117      "name": "getPorts()"
118    },
119    "grantPermission(android.hardware.usb.UsbDevice)": {
120      "isImplementation": true,
121      "modifiers": [
122        "protected"
123      ],
124      "params": [
125        "device"
126      ],
127      "returnType": "void",
128      "exceptions": [],
129      "minSdk": 24,
130      "name": "grantPermission(android.hardware.usb.UsbDevice)"
131    },
132    "grantPermission(android.hardware.usb.UsbDevice,java.lang.String)": {
133      "isImplementation": true,
134      "modifiers": [
135        "protected"
136      ],
137      "params": [
138        "device",
139        "packageName"
140      ],
141      "returnType": "void",
142      "exceptions": [],
143      "minSdk": 25,
144      "name": "grantPermission(android.hardware.usb.UsbDevice,java.lang.String)"
145    },
146    "hasPermission(android.hardware.usb.UsbDevice)": {
147      "isImplementation": true,
148      "modifiers": [
149        "protected"
150      ],
151      "params": [
152        "device"
153      ],
154      "returnType": "boolean",
155      "exceptions": [],
156      "name": "hasPermission(android.hardware.usb.UsbDevice)",
157      "documentation": "Returns true if the caller has permission to access the device. "
158    },
159    "hasPermissionForPackage(android.hardware.usb.UsbDevice,java.lang.String)": {
160      "isImplementation": false,
161      "modifiers": [
162        "public"
163      ],
164      "params": [
165        "device",
166        "packageName"
167      ],
168      "returnType": "boolean",
169      "exceptions": [],
170      "name": "hasPermissionForPackage(android.hardware.usb.UsbDevice,java.lang.String)",
171      "documentation": "Returns true if the given package has permission to access the device. "
172    },
173    "openAccessory(android.hardware.usb.UsbAccessory)": {
174      "isImplementation": true,
175      "modifiers": [
176        "protected"
177      ],
178      "params": [
179        "accessory"
180      ],
181      "returnType": "android.os.ParcelFileDescriptor",
182      "exceptions": [],
183      "name": "openAccessory(android.hardware.usb.UsbAccessory)",
184      "documentation": "Opens a file descriptor from a temporary file. "
185    },
186    "removeUsbDevice(android.hardware.usb.UsbDevice)": {
187      "isImplementation": false,
188      "modifiers": [
189        "public"
190      ],
191      "params": [
192        "usbDevice"
193      ],
194      "returnType": "void",
195      "exceptions": [],
196      "name": "removeUsbDevice(android.hardware.usb.UsbDevice)",
197      "documentation": "Removes a USB device from available USB devices map. "
198    },
199    "revokePermission(android.hardware.usb.UsbDevice,java.lang.String)": {
200      "isImplementation": false,
201      "modifiers": [
202        "public"
203      ],
204      "params": [
205        "device",
206        "packageName"
207      ],
208      "returnType": "void",
209      "exceptions": [],
210      "name": "revokePermission(android.hardware.usb.UsbDevice,java.lang.String)",
211      "documentation": "Revokes permission to a USB device granted to a package. This method does nothing if the\npackage doesn\u0027t have permission to access the device.\n"
212    },
213    "setAttachedUsbAccessory(android.hardware.usb.UsbAccessory)": {
214      "isImplementation": false,
215      "modifiers": [
216        "public"
217      ],
218      "params": [
219        "usbAccessory"
220      ],
221      "returnType": "void",
222      "exceptions": [],
223      "name": "setAttachedUsbAccessory(android.hardware.usb.UsbAccessory)",
224      "documentation": "Sets the currently attached Usb accessory returned in #getAccessoryList. "
225    },
226    "setPortRoles(java.lang.Object,java.lang.Object,java.lang.Object)": {
227      "isImplementation": true,
228      "modifiers": [
229        "protected"
230      ],
231      "params": [
232        "port",
233        "powerRole",
234        "dataRole"
235      ],
236      "returnType": "void",
237      "exceptions": [],
238      "minSdk": 23,
239      "name": "setPortRoles(java.lang.Object,java.lang.Object,java.lang.Object)"
240    }
241  },
242  "imports": [
243    "android.os.Build.VERSION_CODES.M",
244    "android.os.Build.VERSION_CODES.N",
245    "android.os.Build.VERSION_CODES.N_MR1",
246    "android.os.Build.VERSION_CODES.P",
247    "android.os.Build.VERSION_CODES.TIRAMISU",
248    "org.robolectric.RuntimeEnvironment.application",
249    "org.robolectric.util.ReflectionHelpers.ClassParameter.from",
250    "org.robolectric.util.ReflectionHelpers.callConstructor",
251    "org.robolectric.util.ReflectionHelpers.getStaticField",
252    "android.content.Intent",
253    "android.hardware.usb.UsbAccessory",
254    "android.hardware.usb.UsbDevice",
255    "android.hardware.usb.UsbManager",
256    "android.hardware.usb.UsbPort",
257    "android.hardware.usb.UsbPortStatus",
258    "android.os.Build",
259    "android.os.ParcelFileDescriptor",
260    "com.google.common.base.Preconditions",
261    "java.io.File",
262    "java.io.FileNotFoundException",
263    "java.util.ArrayList",
264    "java.util.HashMap",
265    "java.util.List",
266    "org.robolectric.RuntimeEnvironment",
267    "org.robolectric.annotation.HiddenApi",
268    "org.robolectric.annotation.Implementation",
269    "org.robolectric.annotation.Implements",
270    "org.robolectric.annotation.RealObject"
271  ],
272  "name": "org.robolectric.shadows.ShadowUsbManager",
273  "documentation": "Robolectric implementation of {@link android.hardware.usb.UsbManager}. "
274}