summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.xml11
-rw-r--r--core/java/android/provider/MediaStore.java7
-rw-r--r--core/java/android/provider/Ptp.java (renamed from core/java/android/provider/Mtp.java)28
-rw-r--r--media/java/android/media/MtpCursor.java62
-rw-r--r--media/java/android/media/MtpDatabase.java4
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java10
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java10
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java38
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java8
-rw-r--r--services/java/com/android/server/UsbObserver.java6
10 files changed, 97 insertions, 87 deletions
diff --git a/api/current.xml b/api/current.xml
index 403e3d0..cf2fe45 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -157973,6 +157973,17 @@
visibility="public"
>
</field>
+<field name="ACTION_MTP_SESSION_END"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.provider.action.MTP_SESSION_END&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="ACTION_VIDEO_CAPTURE"
type="java.lang.String"
transient="false"
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index f111ef2..fb4bed7 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -53,6 +53,13 @@ public final class MediaStore {
private static final String CONTENT_AUTHORITY_SLASH = "content://" + AUTHORITY + "/";
+ /**
+ * Broadcast Action: A broadcast to indicate the end of an MTP session with the host.
+ * This broadcast is only sent if MTP activity has modified the media database during the
+ * most recent MTP session.
+ */
+ public static final String ACTION_MTP_SESSION_END = "android.provider.action.MTP_SESSION_END";
+
/**
* Activity Action: Launch a music player.
* The activity should be able to play, browse, or manipulate music files stored on the device.
diff --git a/core/java/android/provider/Mtp.java b/core/java/android/provider/Ptp.java
index 78110ef..2c54370 100644
--- a/core/java/android/provider/Mtp.java
+++ b/core/java/android/provider/Ptp.java
@@ -22,28 +22,20 @@ import android.util.Log;
/**
- * The MTP provider supports accessing content on MTP and PTP devices.
+ * The PTP provider supports accessing content on PTP devices.
* @hide
*/
-public final class Mtp
+public final class Ptp
{
- private final static String TAG = "Mtp";
+ private final static String TAG = "Ptp";
- public static final String AUTHORITY = "mtp";
+ public static final String AUTHORITY = "ptp";
private static final String CONTENT_AUTHORITY_SLASH = "content://" + AUTHORITY + "/";
private static final String CONTENT_AUTHORITY_DEVICE_SLASH = "content://" + AUTHORITY + "/device/";
-
- /**
- * Broadcast Action: A broadcast to indicate the end of an MTP session with the host.
- * This broadcast is only sent if MTP activity has modified the media database during the
- * most recent MTP session
- */
- public static final String ACTION_MTP_SESSION_END = "android.provider.action.MTP_SESSION_END";
-
/**
- * Contains list of all MTP/PTP devices
+ * Contains list of all PTP devices
*/
public static final class Device implements BaseColumns {
@@ -67,7 +59,7 @@ public final class Mtp
}
/**
- * Contains list of storage units for an MTP/PTP device
+ * Contains list of storage units for an PTP device
*/
public static final class Storage implements BaseColumns {
@@ -93,7 +85,7 @@ public final class Mtp
}
/**
- * Contains list of objects on an MTP/PTP device
+ * Contains list of objects on an PTP device
*/
public static final class Object implements BaseColumns {
@@ -133,7 +125,7 @@ public final class Mtp
/**
* The following columns correspond to the fields in the ObjectInfo dataset
- * as described in the MTP specification.
+ * as described in the PTP specification.
*/
/**
@@ -144,7 +136,7 @@ public final class Mtp
/**
* The object's format. Can be one of the FORMAT_* symbols below,
- * or any of the valid MTP object formats as defined in the MTP specification.
+ * or any of the valid PTP object formats as defined in the PTP specification.
* <P>Type: INTEGER</P>
*/
public static final String FORMAT = "format";
@@ -163,7 +155,7 @@ public final class Mtp
/**
* The object's thumbnail format. Can be one of the FORMAT_* symbols below,
- * or any of the valid MTP object formats as defined in the MTP specification.
+ * or any of the valid PTP object formats as defined in the PTP specification.
* <P>Type: INTEGER</P>
*/
public static final String THUMB_FORMAT = "thumb_format";
diff --git a/media/java/android/media/MtpCursor.java b/media/java/android/media/MtpCursor.java
index daa3f4d..dfd5e17 100644
--- a/media/java/android/media/MtpCursor.java
+++ b/media/java/android/media/MtpCursor.java
@@ -18,13 +18,13 @@ package android.media;
import android.database.AbstractWindowedCursor;
import android.database.CursorWindow;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.util.Log;
import java.util.HashMap;
/**
- * Cursor class for MTP content provider
+ * Cursor class for PTP content provider
* @hide
*/
public final class MtpCursor extends AbstractWindowedCursor {
@@ -173,39 +173,39 @@ public final class MtpCursor extends AbstractWindowedCursor {
static {
sDeviceProjectionMap = new HashMap<String, Integer>();
- sDeviceProjectionMap.put(Mtp.Device._ID, new Integer(DEVICE_ROW_ID));
- sDeviceProjectionMap.put(Mtp.Device.MANUFACTURER, new Integer(DEVICE_MANUFACTURER));
- sDeviceProjectionMap.put(Mtp.Device.MODEL, new Integer(DEVICE_MODEL));
+ sDeviceProjectionMap.put(Ptp.Device._ID, new Integer(DEVICE_ROW_ID));
+ sDeviceProjectionMap.put(Ptp.Device.MANUFACTURER, new Integer(DEVICE_MANUFACTURER));
+ sDeviceProjectionMap.put(Ptp.Device.MODEL, new Integer(DEVICE_MODEL));
sStorageProjectionMap = new HashMap<String, Integer>();
- sStorageProjectionMap.put(Mtp.Storage._ID, new Integer(STORAGE_ROW_ID));
- sStorageProjectionMap.put(Mtp.Storage.IDENTIFIER, new Integer(STORAGE_IDENTIFIER));
- sStorageProjectionMap.put(Mtp.Storage.DESCRIPTION, new Integer(STORAGE_DESCRIPTION));
+ sStorageProjectionMap.put(Ptp.Storage._ID, new Integer(STORAGE_ROW_ID));
+ sStorageProjectionMap.put(Ptp.Storage.IDENTIFIER, new Integer(STORAGE_IDENTIFIER));
+ sStorageProjectionMap.put(Ptp.Storage.DESCRIPTION, new Integer(STORAGE_DESCRIPTION));
sObjectProjectionMap = new HashMap<String, Integer>();
- sObjectProjectionMap.put(Mtp.Object._ID, new Integer(OBJECT_ROW_ID));
- sObjectProjectionMap.put(Mtp.Object.STORAGE_ID, new Integer(OBJECT_STORAGE_ID));
- sObjectProjectionMap.put(Mtp.Object.FORMAT, new Integer(OBJECT_FORMAT));
- sObjectProjectionMap.put(Mtp.Object.PROTECTION_STATUS, new Integer(OBJECT_PROTECTION_STATUS));
- sObjectProjectionMap.put(Mtp.Object.SIZE, new Integer(OBJECT_SIZE));
- sObjectProjectionMap.put(Mtp.Object.THUMB_FORMAT, new Integer(OBJECT_THUMB_FORMAT));
- sObjectProjectionMap.put(Mtp.Object.THUMB_SIZE, new Integer(OBJECT_THUMB_SIZE));
- sObjectProjectionMap.put(Mtp.Object.THUMB_WIDTH, new Integer(OBJECT_THUMB_WIDTH));
- sObjectProjectionMap.put(Mtp.Object.THUMB_HEIGHT, new Integer(OBJECT_THUMB_HEIGHT));
- sObjectProjectionMap.put(Mtp.Object.IMAGE_WIDTH, new Integer(OBJECT_IMAGE_WIDTH));
- sObjectProjectionMap.put(Mtp.Object.IMAGE_HEIGHT, new Integer(OBJECT_IMAGE_HEIGHT));
- sObjectProjectionMap.put(Mtp.Object.IMAGE_DEPTH, new Integer(OBJECT_IMAGE_DEPTH));
- sObjectProjectionMap.put(Mtp.Object.PARENT, new Integer(OBJECT_PARENT));
- sObjectProjectionMap.put(Mtp.Object.ASSOCIATION_TYPE, new Integer(OBJECT_ASSOCIATION_TYPE));
- sObjectProjectionMap.put(Mtp.Object.ASSOCIATION_DESC, new Integer(OBJECT_ASSOCIATION_DESC));
- sObjectProjectionMap.put(Mtp.Object.SEQUENCE_NUMBER, new Integer(OBJECT_SEQUENCE_NUMBER));
- sObjectProjectionMap.put(Mtp.Object.NAME, new Integer(OBJECT_NAME));
- sObjectProjectionMap.put(Mtp.Object.DATE_CREATED, new Integer(OBJECT_DATE_CREATED));
- sObjectProjectionMap.put(Mtp.Object.DATE_MODIFIED, new Integer(OBJECT_DATE_MODIFIED));
- sObjectProjectionMap.put(Mtp.Object.KEYWORDS, new Integer(OBJECT_KEYWORDS));
- sObjectProjectionMap.put(Mtp.Object.THUMB, new Integer(OBJECT_THUMB));
-
- sObjectProjectionMap.put(Mtp.Object.NAME, new Integer(OBJECT_NAME));
+ sObjectProjectionMap.put(Ptp.Object._ID, new Integer(OBJECT_ROW_ID));
+ sObjectProjectionMap.put(Ptp.Object.STORAGE_ID, new Integer(OBJECT_STORAGE_ID));
+ sObjectProjectionMap.put(Ptp.Object.FORMAT, new Integer(OBJECT_FORMAT));
+ sObjectProjectionMap.put(Ptp.Object.PROTECTION_STATUS, new Integer(OBJECT_PROTECTION_STATUS));
+ sObjectProjectionMap.put(Ptp.Object.SIZE, new Integer(OBJECT_SIZE));
+ sObjectProjectionMap.put(Ptp.Object.THUMB_FORMAT, new Integer(OBJECT_THUMB_FORMAT));
+ sObjectProjectionMap.put(Ptp.Object.THUMB_SIZE, new Integer(OBJECT_THUMB_SIZE));
+ sObjectProjectionMap.put(Ptp.Object.THUMB_WIDTH, new Integer(OBJECT_THUMB_WIDTH));
+ sObjectProjectionMap.put(Ptp.Object.THUMB_HEIGHT, new Integer(OBJECT_THUMB_HEIGHT));
+ sObjectProjectionMap.put(Ptp.Object.IMAGE_WIDTH, new Integer(OBJECT_IMAGE_WIDTH));
+ sObjectProjectionMap.put(Ptp.Object.IMAGE_HEIGHT, new Integer(OBJECT_IMAGE_HEIGHT));
+ sObjectProjectionMap.put(Ptp.Object.IMAGE_DEPTH, new Integer(OBJECT_IMAGE_DEPTH));
+ sObjectProjectionMap.put(Ptp.Object.PARENT, new Integer(OBJECT_PARENT));
+ sObjectProjectionMap.put(Ptp.Object.ASSOCIATION_TYPE, new Integer(OBJECT_ASSOCIATION_TYPE));
+ sObjectProjectionMap.put(Ptp.Object.ASSOCIATION_DESC, new Integer(OBJECT_ASSOCIATION_DESC));
+ sObjectProjectionMap.put(Ptp.Object.SEQUENCE_NUMBER, new Integer(OBJECT_SEQUENCE_NUMBER));
+ sObjectProjectionMap.put(Ptp.Object.NAME, new Integer(OBJECT_NAME));
+ sObjectProjectionMap.put(Ptp.Object.DATE_CREATED, new Integer(OBJECT_DATE_CREATED));
+ sObjectProjectionMap.put(Ptp.Object.DATE_MODIFIED, new Integer(OBJECT_DATE_MODIFIED));
+ sObjectProjectionMap.put(Ptp.Object.KEYWORDS, new Integer(OBJECT_KEYWORDS));
+ sObjectProjectionMap.put(Ptp.Object.THUMB, new Integer(OBJECT_THUMB));
+
+ sObjectProjectionMap.put(Ptp.Object.NAME, new Integer(OBJECT_NAME));
}
// used by the JNI code
diff --git a/media/java/android/media/MtpDatabase.java b/media/java/android/media/MtpDatabase.java
index e48e9e8..250ec44 100644
--- a/media/java/android/media/MtpDatabase.java
+++ b/media/java/android/media/MtpDatabase.java
@@ -25,11 +25,11 @@ import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Environment;
import android.os.RemoteException;
+import android.provider.MediaStore;
import android.provider.MediaStore.Audio;
import android.provider.MediaStore.Files;
import android.provider.MediaStore.Images;
import android.provider.MediaStore.MediaColumns;
-import android.provider.Mtp;
import android.util.Log;
import java.io.File;
@@ -1023,7 +1023,7 @@ public class MtpDatabase {
Log.d(TAG, "sessionEnded");
if (mDatabaseModified) {
Log.d(TAG, "sending ACTION_MTP_SESSION_END");
- mContext.sendBroadcast(new Intent(Mtp.ACTION_MTP_SESSION_END));
+ mContext.sendBroadcast(new Intent(MediaStore.ACTION_MTP_SESSION_END));
mDatabaseModified = false;
}
}
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
index c04873a..0942d1f 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/CameraBrowser.java
@@ -24,7 +24,7 @@ import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.util.Log;
import android.view.View;
import android.widget.ListAdapter;
@@ -58,7 +58,7 @@ public class CameraBrowser extends ListActivity {
}
private static final String[] DEVICE_COLUMNS =
- new String[] { Mtp.Device._ID, Mtp.Device.MANUFACTURER, Mtp.Device.MODEL };
+ new String[] { Ptp.Device._ID, Ptp.Device.MANUFACTURER, Ptp.Device.MODEL };
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -71,7 +71,7 @@ public class CameraBrowser extends ListActivity {
protected void onResume() {
super.onResume();
- Cursor c = getContentResolver().query(Mtp.Device.CONTENT_URI,
+ Cursor c = getContentResolver().query(Ptp.Device.CONTENT_URI,
DEVICE_COLUMNS, null, null, null);
Log.d(TAG, "query returned " + c);
startManagingCursor(c);
@@ -80,12 +80,12 @@ public class CameraBrowser extends ListActivity {
// Map Cursor columns to views defined in simple_list_item_2.xml
mAdapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_2, c,
- new String[] { Mtp.Device.MANUFACTURER, Mtp.Device.MODEL },
+ new String[] { Ptp.Device.MANUFACTURER, Ptp.Device.MODEL },
new int[] { android.R.id.text1, android.R.id.text2 });
setListAdapter(mAdapter);
// register for changes to the device list
- mResolver.registerContentObserver(Mtp.Device.CONTENT_URI, true, mDeviceObserver);
+ mResolver.registerContentObserver(Ptp.Device.CONTENT_URI, true, mDeviceObserver);
}
@Override
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
index 2060657..40c5978 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
@@ -25,7 +25,7 @@ import android.graphics.BitmapFactory;
import android.media.MtpConstants;
import android.net.Uri;
import android.os.Bundle;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
@@ -49,7 +49,7 @@ public class ObjectBrowser extends ListActivity {
private DeviceDisconnectedReceiver mDisconnectedReceiver;
private static final String[] OBJECT_COLUMNS =
- new String[] { Mtp.Object._ID, Mtp.Object.NAME, Mtp.Object.FORMAT, Mtp.Object.THUMB };
+ new String[] { Ptp.Object._ID, Ptp.Object.NAME, Ptp.Object.FORMAT, Ptp.Object.THUMB };
static final int ID_COLUMN = 0;
static final int NAME_COLUMN = 1;
@@ -74,9 +74,9 @@ public class ObjectBrowser extends ListActivity {
Cursor c;
Uri uri;
if (mObjectID == 0) {
- uri = Mtp.Object.getContentUriForStorageChildren(mDeviceID, mStorageID);
+ uri = Ptp.Object.getContentUriForStorageChildren(mDeviceID, mStorageID);
} else {
- uri = Mtp.Object.getContentUriForObjectChildren(mDeviceID, mObjectID);
+ uri = Ptp.Object.getContentUriForObjectChildren(mDeviceID, mObjectID);
}
Log.d(TAG, "query " + uri);
c = getContentResolver().query(uri, OBJECT_COLUMNS, null, null, null);
@@ -99,7 +99,7 @@ public class ObjectBrowser extends ListActivity {
protected void onListItemClick(ListView l, View v, int position, long id) {
long rowID = mAdapter.getItemId(position);
Cursor c = getContentResolver().query(
- Mtp.Object.getContentUri(mDeviceID, rowID),
+ Ptp.Object.getContentUri(mDeviceID, rowID),
OBJECT_COLUMNS, null, null, null);
Log.d(TAG, "query returned " + c + " count: " + c.getCount());
long format = 0;
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
index 4e63128..3a6c6a4 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
@@ -24,7 +24,7 @@ import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@@ -51,21 +51,21 @@ public class ObjectViewer extends Activity implements View.OnClickListener {
private DeviceDisconnectedReceiver mDisconnectedReceiver;
private static final String[] OBJECT_COLUMNS =
- new String[] { Mtp.Object._ID,
- Mtp.Object.NAME,
- Mtp.Object.SIZE,
- Mtp.Object.THUMB_WIDTH,
- Mtp.Object.THUMB_HEIGHT,
- Mtp.Object.THUMB_SIZE,
- Mtp.Object.IMAGE_WIDTH,
- Mtp.Object.IMAGE_HEIGHT,
- Mtp.Object.IMAGE_DEPTH,
- Mtp.Object.SEQUENCE_NUMBER,
- Mtp.Object.DATE_CREATED,
- Mtp.Object.DATE_MODIFIED,
- Mtp.Object.KEYWORDS,
- Mtp.Object.THUMB,
- Mtp.Object.FORMAT,
+ new String[] { Ptp.Object._ID,
+ Ptp.Object.NAME,
+ Ptp.Object.SIZE,
+ Ptp.Object.THUMB_WIDTH,
+ Ptp.Object.THUMB_HEIGHT,
+ Ptp.Object.THUMB_SIZE,
+ Ptp.Object.IMAGE_WIDTH,
+ Ptp.Object.IMAGE_HEIGHT,
+ Ptp.Object.IMAGE_DEPTH,
+ Ptp.Object.SEQUENCE_NUMBER,
+ Ptp.Object.DATE_CREATED,
+ Ptp.Object.DATE_MODIFIED,
+ Ptp.Object.KEYWORDS,
+ Ptp.Object.THUMB,
+ Ptp.Object.FORMAT,
};
@Override
@@ -91,7 +91,7 @@ public class ObjectViewer extends Activity implements View.OnClickListener {
if (mDeviceID != 0 && mObjectID != 0) {
Cursor c = getContentResolver().query(
- Mtp.Object.getContentUri(mDeviceID, mObjectID),
+ Ptp.Object.getContentUri(mDeviceID, mObjectID),
OBJECT_COLUMNS, null, null, null);
c.moveToFirst();
TextView view = (TextView)findViewById(R.id.name);
@@ -147,7 +147,7 @@ public class ObjectViewer extends Activity implements View.OnClickListener {
dest.mkdirs();
dest = new File(dest, mFileName);
- Uri requestUri = Mtp.Object.getContentUriForImport(mDeviceID, mObjectID,
+ Uri requestUri = Ptp.Object.getContentUriForImport(mDeviceID, mObjectID,
dest.getAbsolutePath());
Uri resultUri = getContentResolver().insert(requestUri, new ContentValues());
Log.d(TAG, "save returned " + resultUri);
@@ -162,7 +162,7 @@ public class ObjectViewer extends Activity implements View.OnClickListener {
}
private void deleteObject() {
- Uri uri = Mtp.Object.getContentUri(mDeviceID, mObjectID);
+ Uri uri = Ptp.Object.getContentUri(mDeviceID, mObjectID);
Log.d(TAG, "deleting " + uri);
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
index 4da88d6..62187b0 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/StorageBrowser.java
@@ -21,7 +21,7 @@ import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.util.Log;
import android.view.View;
import android.widget.ListAdapter;
@@ -40,7 +40,7 @@ public class StorageBrowser extends ListActivity {
private DeviceDisconnectedReceiver mDisconnectedReceiver;
private static final String[] STORAGE_COLUMNS =
- new String[] { Mtp.Storage._ID, Mtp.Storage.DESCRIPTION };
+ new String[] { Ptp.Storage._ID, Ptp.Storage.DESCRIPTION };
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -54,7 +54,7 @@ public class StorageBrowser extends ListActivity {
super.onResume();
if (mDeviceID != 0) {
- Cursor c = getContentResolver().query(Mtp.Storage.getContentUri(mDeviceID),
+ Cursor c = getContentResolver().query(Ptp.Storage.getContentUri(mDeviceID),
STORAGE_COLUMNS, null, null, null);
Log.d(TAG, "query returned " + c);
startManagingCursor(c);
@@ -62,7 +62,7 @@ public class StorageBrowser extends ListActivity {
// Map Cursor columns to views defined in simple_list_item_1.xml
mAdapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1, c,
- new String[] { Mtp.Storage.DESCRIPTION },
+ new String[] { Ptp.Storage.DESCRIPTION },
new int[] { android.R.id.text1, android.R.id.text2 });
setListAdapter(mAdapter);
}
diff --git a/services/java/com/android/server/UsbObserver.java b/services/java/com/android/server/UsbObserver.java
index cfa83be..4a7df8f 100644
--- a/services/java/com/android/server/UsbObserver.java
+++ b/services/java/com/android/server/UsbObserver.java
@@ -24,7 +24,7 @@ import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.os.UEventObserver;
-import android.provider.Mtp;
+import android.provider.Ptp;
import android.provider.Settings;
import android.util.Log;
import android.util.Slog;
@@ -155,7 +155,7 @@ class UsbObserver extends UEventObserver {
// called from JNI in monitorUsbHostBus()
private void usbCameraAdded(int deviceID) {
Intent intent = new Intent(Usb.ACTION_USB_CAMERA_ATTACHED,
- Mtp.Device.getContentUri(deviceID));
+ Ptp.Device.getContentUri(deviceID));
Log.d(TAG, "usbCameraAdded, sending " + intent);
mContext.sendBroadcast(intent);
}
@@ -163,7 +163,7 @@ class UsbObserver extends UEventObserver {
// called from JNI in monitorUsbHostBus()
private void usbCameraRemoved(int deviceID) {
Intent intent = new Intent(Usb.ACTION_USB_CAMERA_DETACHED,
- Mtp.Device.getContentUri(deviceID));
+ Ptp.Device.getContentUri(deviceID));
Log.d(TAG, "usbCameraRemoved, sending " + intent);
mContext.sendBroadcast(intent);
}