Merge "Build com.android.future.usb.accessory with java_sdk_library"

This commit is contained in:
Treehugger Robot
2018-06-29 02:51:43 +00:00
committed by Gerrit Code Review
10 changed files with 50 additions and 27 deletions

View File

@@ -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
# ******************************************************************

View File

@@ -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/*"]

View File

@@ -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)

25
libs/usb/api/current.txt Normal file
View File

@@ -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";
}
}

0
libs/usb/api/removed.txt Normal file
View File

View File

View File

View File

View File

View File

@@ -23,4 +23,6 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := AccessoryChat
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)