Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4ca2471 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Add platform features for USB host and USB accessory support.



Also removed config_hasUsbHostSupport framework resource, which is now obsolete.

Change-Id: I6f18cc1c4f68085de8b8363e1b5edff79aff404f
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 02eb8746
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -61256,6 +61256,28 @@
 visibility="public"
>
</field>
<field name="FEATURE_USB_ACCESSORY"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.usb.accessory&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_USB_HOST"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.usb.host&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_WIFI"
 type="java.lang.String"
 transient="false"
+15 −0
Original line number Diff line number Diff line
@@ -783,6 +783,21 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports connecting to USB devices
     * as the USB host.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_USB_HOST = "android.hardware.usb.host";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports connecting to USB accessories.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_USB_ACCESSORY = "android.hardware.usb.accessory";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The SIP API is enabled on the device.
+0 −3
Original line number Diff line number Diff line
@@ -296,9 +296,6 @@
    <!-- Indicate whether the SD card is accessible without removing the battery. -->
    <bool name="config_batterySdCardAccessibility">false</bool>

    <!-- Indicate whether the device has USB host support. -->
    <bool name="config_hasUsbHostSupport">false</bool>

    <!-- List of file paths for USB host busses to exclude from USB host support.
         For example, if the first USB bus on the device is used to communicate
         with the modem or some other restricted hardware, add "/dev/bus/usb/001/"
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- This is the standard feature indicating that the device supports USB accessories. -->
<permissions>
    <feature name="android.hardware.usb.accessory" />
</permissions>
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- This is the standard feature indicating that the device can communicate
    with USB devices as the USB host. -->
<permissions>
    <feature name="android.hardware.usb.host" />
</permissions>
Loading