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

Commit cdcc5e32 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "add option to specify a different MTP device name" into ics

parents 4f0f173f 69f2b56d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ LOCAL_C_INCLUDES += \

LOCAL_CFLAGS +=

ifdef BOARD_MTP_DEVICE
    LOCAL_CFLAGS += -DUSB_MTP_DEVICE='$(BOARD_MTP_DEVICE)'
endif

LOCAL_LDLIBS := -lpthread

LOCAL_MODULE:= libmedia_jni
+4 −0
Original line number Diff line number Diff line
@@ -59,7 +59,11 @@ static inline MtpServer* getMtpServer(JNIEnv *env, jobject thiz) {
static void
android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jboolean usePtp)
{
#ifdef USB_MTP_DEVICE
    int fd = open(USB_MTP_DEVICE, O_RDWR);
#else
    int fd = open("/dev/mtp_usb", O_RDWR);
#endif
    if (fd >= 0) {
        MtpServer* server = new MtpServer(fd, getMtpDatabase(env, javaDatabase),
                usePtp, AID_MEDIA_RW, 0664, 0775);