327b809ad1
Change UsbManager apis to use long instead of string, to match usb hal. Change UsbDeviceManager internals to match as well. Remove isFunctionEnabled and add getEnabledFunctions. Callers would often call isFunctionEnabled for every possible function to get the list of functions, so getEnabledFunctions reduces the number of aidl calls. Separate out dependencies between UsbHandler and UsbDeviceManager and staticize the UsbHandler classes. Add unit tests with mocked out dependencies to test state transitions for UsbHandler. Bug: 62876645 Test: atest UsbTests Change-Id: I785c4c24121a70e725de9742c6af50a6bf1baea0
31 lines
1.2 KiB
XML
31 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2018 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.server.usb" >
|
|
|
|
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
|
|
<uses-permission android:name="android.permission.MANAGE_USERS" />
|
|
|
|
<application android:debuggable="true">
|
|
<uses-library android:name="android.test.runner" />
|
|
</application>
|
|
|
|
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
|
|
android:targetPackage="com.android.server.usb"
|
|
android:label="UsbTests"/>
|
|
</manifest>
|