Combine the USB accessory support library with the platform feature

Also renamed the support library to com.android.future.usb.accessory.jar

Change-Id: Id6226991ce73f75dfedc497adf1c25bffb670243
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/data/etc/android.hardware.usb.accessory.xml b/data/etc/android.hardware.usb.accessory.xml
index 29df966..80a0904 100644
--- a/data/etc/android.hardware.usb.accessory.xml
+++ b/data/etc/android.hardware.usb.accessory.xml
@@ -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>
diff --git a/data/etc/com.google.android.usb.xml b/data/etc/com.google.android.usb.xml
deleted file mode 100644
index fae3d23..0000000
--- a/data/etc/com.google.android.usb.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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.
--->
-
-<permissions>
-    <library name="com.google.android.usb"
-            file="/system/framework/com.google.android.usb.jar" />
-</permissions>
diff --git a/libs/usb/Android.mk b/libs/usb/Android.mk
index d0ef6f0..b4e1fbf 100644
--- a/libs/usb/Android.mk
+++ b/libs/usb/Android.mk
@@ -22,6 +22,6 @@
 
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_MODULE:= com.google.android.usb
+LOCAL_MODULE:= com.android.future.usb.accessory
 
 include $(BUILD_JAVA_LIBRARY)
diff --git a/libs/usb/src/com/google/android/usb/UsbAccessory.java b/libs/usb/src/com/android/future/usb/UsbAccessory.java
similarity index 98%
rename from libs/usb/src/com/google/android/usb/UsbAccessory.java
rename to libs/usb/src/com/android/future/usb/UsbAccessory.java
index 931f42e..cdd2b73 100644
--- a/libs/usb/src/com/google/android/usb/UsbAccessory.java
+++ b/libs/usb/src/com/android/future/usb/UsbAccessory.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.google.android.usb;
+package com.android.future.usb;
 
 /**
  * A class representing a USB accessory.
diff --git a/libs/usb/src/com/google/android/usb/UsbManager.java b/libs/usb/src/com/android/future/usb/UsbManager.java
similarity index 98%
rename from libs/usb/src/com/google/android/usb/UsbManager.java
rename to libs/usb/src/com/android/future/usb/UsbManager.java
index d7afb95..f74b291 100644
--- a/libs/usb/src/com/google/android/usb/UsbManager.java
+++ b/libs/usb/src/com/android/future/usb/UsbManager.java
@@ -15,7 +15,7 @@
  */
 
 
-package com.google.android.usb;
+package com.android.future.usb;
 
 import android.content.Context;
 import android.content.Intent;
diff --git a/libs/usb/tests/AccessoryChat/Android.mk b/libs/usb/tests/AccessoryChat/Android.mk
index b854569..98b6090 100644
--- a/libs/usb/tests/AccessoryChat/Android.mk
+++ b/libs/usb/tests/AccessoryChat/Android.mk
@@ -7,7 +7,7 @@
 
 LOCAL_PACKAGE_NAME := AccessoryChatGB
 
-LOCAL_JAVA_LIBRARIES := com.google.android.usb
+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
diff --git a/libs/usb/tests/AccessoryChat/AndroidManifest.xml b/libs/usb/tests/AccessoryChat/AndroidManifest.xml
index 5922421..97e2ade 100644
--- a/libs/usb/tests/AccessoryChat/AndroidManifest.xml
+++ b/libs/usb/tests/AccessoryChat/AndroidManifest.xml
@@ -1,8 +1,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.google.android.accessorychat">
+        package="com.android.accessorychat">
 
     <application>
-        <uses-library android:name="com.google.android.usb" />
+        <uses-library android:name="com.android.future.usb.accessory" />
 
         <activity android:name="AccessoryChat" android:label="Accessory Chat GB">
             <intent-filter>
@@ -19,5 +19,5 @@
                 android:resource="@xml/accessory_filter" />
         </activity>
     </application>
-    <uses-sdk android:minSdkVersion="8" />
+    <uses-sdk android:minSdkVersion="10" />
 </manifest>
diff --git a/libs/usb/tests/AccessoryChat/src/com/google/android/accessorychat/AccessoryChat.java b/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/AccessoryChat.java
similarity index 97%
rename from libs/usb/tests/AccessoryChat/src/com/google/android/accessorychat/AccessoryChat.java
rename to libs/usb/tests/AccessoryChat/src/com/android/accessorychat/AccessoryChat.java
index 0a5701c..5cf02c7 100644
--- a/libs/usb/tests/AccessoryChat/src/com/google/android/accessorychat/AccessoryChat.java
+++ b/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/AccessoryChat.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.google.android.accessorychat;
+package com.android.accessorychat;
 
 import android.app.Activity;
 import android.content.BroadcastReceiver;
@@ -31,8 +31,8 @@
 import android.widget.EditText;
 import android.widget.TextView;
 
-import com.google.android.usb.UsbAccessory;
-import com.google.android.usb.UsbManager;
+import com.android.future.usb.UsbAccessory;
+import com.android.future.usb.UsbManager;
 
 import java.io.FileDescriptor;
 import java.io.FileInputStream;