aboutsummaryrefslogtreecommitdiff
path: root/car-usb-handler/AndroidManifest.xml
diff options
context:
space:
mode:
authorKevin Crossan <kcrossan@google.com>2016-11-28 18:40:43 -0800
committerKevin Crossan <kcrossan@google.com>2016-11-29 13:59:33 -0800
commitd428549b58b2df5015bff81d79747265ee8be536 (patch)
tree463f90628b0abd1db7225d311cfee9ede3103fc4 /car-usb-handler/AndroidManifest.xml
parentee412315d30eb1b8a0e8a4ea232f78ecc53b7486 (diff)
downloadCar-d428549b58b2df5015bff81d79747265ee8be536.tar.gz
Implement AOAP USB handler with simplified probing.
The existing USB handler, part of the Kitchen Sink application, was unreliable and hard to follow. This new handler simplifies the code flow and only probes new USB devices by querying whether they support AOAP by sending a USB control message. Further tests (such as switching the device into AOAP) are not done by this app. This new handler also attempts to handle any already connected AOAP devices on system boot. This enables projection to start automatically for compatible devices. NOTE: because devices are not switched into AOAP mode during probing, this means that IUsbAoapSupportCheckService.isDeviceSupported() is now called with a UsbDevice that is _not_ in AOAP mode. Fixes: 33185277 Test: Plugged the following MDs in and projection started: N5, N5X, N6P, Pixel, Galaxy Note Edge, Moto X gen2, Xperia Z5, HTC M8 Test: Plugged in a phone before the system booted completely, and projection started Change-Id: Ice200f661bd85e6eebc97c95bcd23910d4dc25e6
Diffstat (limited to 'car-usb-handler/AndroidManifest.xml')
-rw-r--r--car-usb-handler/AndroidManifest.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/car-usb-handler/AndroidManifest.xml b/car-usb-handler/AndroidManifest.xml
new file mode 100644
index 0000000000..be64f82d51
--- /dev/null
+++ b/car-usb-handler/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ package="android.car.usb.handler" >
+ <uses-sdk android:minSdkVersion="25" />
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.MANAGE_USB" />
+ <application android:label="@string/app_name" android:icon="@drawable/ic_launcher"
+ android:directBootAware="true" >
+ <activity android:name=".UsbHostManagementActivity"
+ android:theme="@android:style/Theme.Material.Light.Dialog"
+ android:launchMode="singleTop" />
+ <receiver android:name=".BootUsbScanner" >
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ </intent-filter>
+ </receiver>
+ </application>
+</manifest>