Loading media/java/android/mtp/MtpServer.java +5 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public class MtpServer implements Runnable { native_send_device_property_changed(property); } public void sendObjectUpdated(int handle) { native_send_object_updated(handle); } public void addStorage(MtpStorage storage) { native_add_storage(storage); } Loading @@ -70,6 +74,7 @@ public class MtpServer implements Runnable { private native final void native_send_object_added(int handle); private native final void native_send_object_removed(int handle); private native final void native_send_device_property_changed(int property); private native final void native_send_object_updated(int handle); private native final void native_add_storage(MtpStorage storage); private native final void native_remove_storage(int storageId); } media/jni/android_mtp_MtpServer.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,18 @@ android_mtp_MtpServer_send_device_property_changed(JNIEnv *env, jobject thiz, ji ALOGE("server is null in send_object_removed"); } static void android_mtp_MtpServer_send_object_updated(JNIEnv *env, jobject thiz, jint handle) { Mutex::Autolock autoLock(sMutex); MtpServer* server = getMtpServer(env, thiz); if (server) server->sendObjectUpdated(handle); else ALOGE("server is null in send_object_updated"); } static void android_mtp_MtpServer_add_storage(JNIEnv *env, jobject thiz, jobject jstorage) { Loading Loading @@ -188,6 +200,7 @@ static JNINativeMethod gMethods[] = { {"native_send_object_removed", "(I)V", (void *)android_mtp_MtpServer_send_object_removed}, {"native_send_device_property_changed", "(I)V", (void *)android_mtp_MtpServer_send_device_property_changed}, {"native_send_object_updated", "(I)V", (void *)android_mtp_MtpServer_send_object_updated}, {"native_add_storage", "(Landroid/mtp/MtpStorage;)V", (void *)android_mtp_MtpServer_add_storage}, {"native_remove_storage", "(I)V", (void *)android_mtp_MtpServer_remove_storage}, Loading Loading
media/java/android/mtp/MtpServer.java +5 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,10 @@ public class MtpServer implements Runnable { native_send_device_property_changed(property); } public void sendObjectUpdated(int handle) { native_send_object_updated(handle); } public void addStorage(MtpStorage storage) { native_add_storage(storage); } Loading @@ -70,6 +74,7 @@ public class MtpServer implements Runnable { private native final void native_send_object_added(int handle); private native final void native_send_object_removed(int handle); private native final void native_send_device_property_changed(int property); private native final void native_send_object_updated(int handle); private native final void native_add_storage(MtpStorage storage); private native final void native_remove_storage(int storageId); }
media/jni/android_mtp_MtpServer.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,18 @@ android_mtp_MtpServer_send_device_property_changed(JNIEnv *env, jobject thiz, ji ALOGE("server is null in send_object_removed"); } static void android_mtp_MtpServer_send_object_updated(JNIEnv *env, jobject thiz, jint handle) { Mutex::Autolock autoLock(sMutex); MtpServer* server = getMtpServer(env, thiz); if (server) server->sendObjectUpdated(handle); else ALOGE("server is null in send_object_updated"); } static void android_mtp_MtpServer_add_storage(JNIEnv *env, jobject thiz, jobject jstorage) { Loading Loading @@ -188,6 +200,7 @@ static JNINativeMethod gMethods[] = { {"native_send_object_removed", "(I)V", (void *)android_mtp_MtpServer_send_object_removed}, {"native_send_device_property_changed", "(I)V", (void *)android_mtp_MtpServer_send_device_property_changed}, {"native_send_object_updated", "(I)V", (void *)android_mtp_MtpServer_send_object_updated}, {"native_add_storage", "(Landroid/mtp/MtpStorage;)V", (void *)android_mtp_MtpServer_add_storage}, {"native_remove_storage", "(I)V", (void *)android_mtp_MtpServer_remove_storage}, Loading