diff options
-rw-r--r-- | CleanSpec.mk | 1 | ||||
-rw-r--r-- | libs/usb/Android.bp | 22 | ||||
-rw-r--r-- | libs/usb/Android.mk | 27 | ||||
-rw-r--r-- | libs/usb/api/current.txt | 25 | ||||
-rw-r--r-- | libs/usb/api/removed.txt | 0 | ||||
-rw-r--r-- | libs/usb/api/system-current.txt | 0 | ||||
-rw-r--r-- | libs/usb/api/system-removed.txt | 0 | ||||
-rw-r--r-- | libs/usb/api/test-current.txt | 0 | ||||
-rw-r--r-- | libs/usb/api/test-removed.txt | 0 | ||||
-rw-r--r-- | libs/usb/tests/AccessoryChat/Android.mk | 2 |
10 files changed, 50 insertions, 27 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk index 1f6860b2b226..96aa055cc9e9 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -245,6 +245,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framew $(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/platformprotos_intermediates) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.mediadrm.signer.jar) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.location.provider.jar) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.future.usb.accessory.jar) # ****************************************************************** # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER # ****************************************************************** diff --git a/libs/usb/Android.bp b/libs/usb/Android.bp index b8f29043e597..027a7488f723 100644 --- a/libs/usb/Android.bp +++ b/libs/usb/Android.bp @@ -1 +1,23 @@ +// +// 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. +// + +java_sdk_library { + name: "com.android.future.usb.accessory", + srcs: ["src/**/*.java"], + api_packages: ["com.android.future.usb"], +} + subdirs = ["tests/*"] diff --git a/libs/usb/Android.mk b/libs/usb/Android.mk deleted file mode 100644 index 129828fd463b..000000000000 --- a/libs/usb/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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) diff --git a/libs/usb/api/current.txt b/libs/usb/api/current.txt new file mode 100644 index 000000000000..8488db5b0f86 --- /dev/null +++ b/libs/usb/api/current.txt @@ -0,0 +1,25 @@ +package com.android.future.usb { + + public class UsbAccessory { + method public java.lang.String getDescription(); + method public java.lang.String getManufacturer(); + method public java.lang.String getModel(); + method public java.lang.String getSerial(); + method public java.lang.String getUri(); + method public java.lang.String getVersion(); + } + + public class UsbManager { + method public static com.android.future.usb.UsbAccessory getAccessory(android.content.Intent); + method public com.android.future.usb.UsbAccessory[] getAccessoryList(); + method public static com.android.future.usb.UsbManager getInstance(android.content.Context); + method public boolean hasPermission(com.android.future.usb.UsbAccessory); + method public android.os.ParcelFileDescriptor openAccessory(com.android.future.usb.UsbAccessory); + method public void requestPermission(com.android.future.usb.UsbAccessory, android.app.PendingIntent); + field public static final java.lang.String ACTION_USB_ACCESSORY_ATTACHED = "android.hardware.usb.action.USB_ACCESSORY_ATTACHED"; + field public static final java.lang.String ACTION_USB_ACCESSORY_DETACHED = "android.hardware.usb.action.USB_ACCESSORY_DETACHED"; + field public static final java.lang.String EXTRA_PERMISSION_GRANTED = "permission"; + } + +} + diff --git a/libs/usb/api/removed.txt b/libs/usb/api/removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/libs/usb/api/removed.txt diff --git a/libs/usb/api/system-current.txt b/libs/usb/api/system-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/libs/usb/api/system-current.txt diff --git a/libs/usb/api/system-removed.txt b/libs/usb/api/system-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/libs/usb/api/system-removed.txt diff --git a/libs/usb/api/test-current.txt b/libs/usb/api/test-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/libs/usb/api/test-current.txt diff --git a/libs/usb/api/test-removed.txt b/libs/usb/api/test-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/libs/usb/api/test-removed.txt diff --git a/libs/usb/tests/AccessoryChat/Android.mk b/libs/usb/tests/AccessoryChat/Android.mk index ecb455a90e29..cfe2da1eb471 100644 --- a/libs/usb/tests/AccessoryChat/Android.mk +++ b/libs/usb/tests/AccessoryChat/Android.mk @@ -23,4 +23,6 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := AccessoryChat +LOCAL_PRIVATE_PLATFORM_APIS := true + include $(BUILD_PACKAGE) |