Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c72eb911 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

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: default avatarMike Lockwood <lockwood@android.com>
parent acc29cc9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,4 +7,6 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := CameraBrowser

LOCAL_SDK_VERSION := current

include $(BUILD_PACKAGE)
+2 −3
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.app.ListActivity;
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 @@ public class CameraBrowser extends ListActivity implements MtpClient.Listener {
                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) {
+0 −2
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package com.android.camerabrowser;

import android.app.Application;
import android.mtp.MtpClient;


public class CameraBrowserApplication extends Application {

+5 −1
Original line number Diff line number Diff line
@@ -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.UsbDevice;
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;

+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.content.Intent;
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;
Loading