Remove MtpClient class from framework and public API

After reviewing this class I decided it would be best not to include it in the public API
since it adds no functionality that cannot be done using MtpDevice and other APIs directly.
So I am moving it to the CameraBrowser sample instead.

Also changed CameraBrowser to build against the SDK to ensure all the necessary APIs for
PTP support have been made public.

Bug: 4067029

Change-Id: I585b06104084953176d018ced08bba0cb4607490
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/media/tests/CameraBrowser/Android.mk b/media/tests/CameraBrowser/Android.mk
index 1d81129..46596a7 100644
--- a/media/tests/CameraBrowser/Android.mk
+++ b/media/tests/CameraBrowser/Android.mk
@@ -7,4 +7,6 @@
 
 LOCAL_PACKAGE_NAME := CameraBrowser
 
+LOCAL_SDK_VERSION := current
+
 include $(BUILD_PACKAGE)
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
index f642d93..af17ded 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
@@ -20,7 +20,6 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
-import android.mtp.MtpClient;
 import android.mtp.MtpDevice;
 import android.mtp.MtpDeviceInfo;
 import android.os.Bundle;
@@ -79,8 +78,8 @@
                 view = (TwoLineListItem)convertView;
             }
 
-            TextView textView1 = (TextView)view.findViewById(com.android.internal.R.id.text1);
-            TextView textView2 = (TextView)view.findViewById(com.android.internal.R.id.text2);
+            TextView textView1 = (TextView)view.findViewById(android.R.id.text1);
+            TextView textView2 = (TextView)view.findViewById(android.R.id.text2);
             MtpDevice device = mDeviceList.get(position);
             MtpDeviceInfo info = device.getDeviceInfo();
             if (info != null) {
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowserApplication.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowserApplication.java
index 6f1edfea..8075862 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowserApplication.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowserApplication.java
@@ -17,8 +17,6 @@
 package com.android.camerabrowser;
 
 import android.app.Application;
-import android.mtp.MtpClient;
-
 
 public class CameraBrowserApplication extends Application {
 
diff --git a/media/java/android/mtp/MtpClient.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/MtpClient.java
similarity index 98%
rename from media/java/android/mtp/MtpClient.java
rename to media/tests/CameraBrowser/src/com/android/camerabrowser/MtpClient.java
index 3859caf..edb5e37 100644
--- a/media/java/android/mtp/MtpClient.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/MtpClient.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.mtp;
+package com.android.camerabrowser;
 
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -26,6 +26,10 @@
 import android.hardware.usb.UsbDeviceConnection;
 import android.hardware.usb.UsbInterface;
 import android.hardware.usb.UsbManager;
+import android.mtp.MtpDevice;
+import android.mtp.MtpDeviceInfo;
+import android.mtp.MtpObjectInfo;
+import android.mtp.MtpStorageInfo;
 import android.os.ParcelFileDescriptor;
 import android.util.Log;
 
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
index 82251d9..68fed7b 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
@@ -22,7 +22,6 @@
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
-import android.mtp.MtpClient;
 import android.mtp.MtpConstants;
 import android.mtp.MtpDevice;
 import android.mtp.MtpObjectInfo;
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
index e9ea9f3..ef69c44 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
@@ -23,7 +23,6 @@
 import android.graphics.BitmapFactory;
 import android.media.MediaScannerConnection;
 import android.media.MediaScannerConnection.MediaScannerConnectionClient;
-import android.mtp.MtpClient;
 import android.mtp.MtpConstants;
 import android.mtp.MtpObjectInfo;
 import android.net.Uri;
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
index 7d5a5da..64320fe 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
@@ -19,7 +19,6 @@
 import android.app.ListActivity;
 import android.content.Context;
 import android.content.Intent;
-import android.mtp.MtpClient;
 import android.mtp.MtpDevice;
 import android.mtp.MtpStorageInfo;
 import android.os.Bundle;