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

Commit 1110748b authored by Mike Lockwood's avatar Mike Lockwood
Browse files

DO NOT MERGE: USB accessory support library



This provides a mechanism for developing applications to work with
USB accessories in versions of android prior to the introduction
of the android.hardware.UsbManager APIs.

Applications should link against the com.android.future.usb.accessory
library to use this support.

Change-Id: I0b61e20b63eec42c506f0895a0c9a439bdfdf7f5
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 40bbf929
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17,4 +17,6 @@
<!-- This is the standard feature indicating that the device supports USB accessories. -->
<permissions>
    <feature name="android.hardware.usb.accessory" />
    <library name="com.android.future.usb.accessory"
            file="/system/framework/com.android.future.usb.accessory.jar" />
</permissions>

libs/usb/Android.mk

0 → 100644
+27 −0
Original line number Diff line number Diff line
#
# 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.
#

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under,src)

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE:= com.android.future.usb.accessory

include $(BUILD_JAVA_LIBRARY)
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.google.android.usb;
package com.android.future.usb;

/**
 * A class representing a USB accessory.
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 */


package com.google.android.usb;
package com.android.future.usb;

import android.content.Context;
import android.content.Intent;
+31 −0
Original line number Diff line number Diff line
#
# 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.
#

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := tests

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := AccessoryChatGB

LOCAL_JAVA_LIBRARIES := com.android.future.usb.accessory

# Force an old SDK version to make sure we aren't using newer UsbManager APIs
LOCAL_SDK_VERSION := 8

include $(BUILD_PACKAGE)
Loading