summaryrefslogtreecommitdiff
path: root/media/java/android/mtp/MtpDevice.java
diff options
context:
space:
mode:
authorJames Wei <jameswei@google.com>2021-06-19 20:58:00 +0800
committerJames Wei <jameswei@google.com>2021-06-21 21:36:14 +0800
commit4f1a6d6f7de0a6963f931f817462e8d2f29b6511 (patch)
tree6823bc48a193e4ef897ab5a29c5dbc6f4767d02b /media/java/android/mtp/MtpDevice.java
parent9c44e61f748d1f56494a0e635ce952fc90d34618 (diff)
MTP: Skip runtime thumbnail generation for Android Host
Android Host is not capable to deal with the long processing time for runtime thumbnail generation. Skip runtime thumbnail generation for Android Host but keep no impact to other Host Bug: 188752500 Test: atest MtpTests Test: atest MtpServerTest Test: atest MtpServiceTests Test: manual test on Windows 10 File Explorer Test: manual test on Android Host Files App Change-Id: I24ed3bb29c5a6912398a9e00e7748fd406cf6a64
Diffstat (limited to 'media/java/android/mtp/MtpDevice.java')
-rw-r--r--media/java/android/mtp/MtpDevice.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/media/java/android/mtp/MtpDevice.java b/media/java/android/mtp/MtpDevice.java
index e8b04edb2e1b..ec925918d4e6 100644
--- a/media/java/android/mtp/MtpDevice.java
+++ b/media/java/android/mtp/MtpDevice.java
@@ -170,6 +170,18 @@ public final class MtpDevice {
}
/**
+ * Set device property SESSION_INITIATOR_VERSION_INFO
+ *
+ * @param propertyStr string value for device property SESSION_INITIATOR_VERSION_INFO
+ * @return -1 for error, 0 for success
+ *
+ * {@hide}
+ */
+ public int setDevicePropertyInitVersion(@NonNull String propertyStr) {
+ return native_set_device_property_init_version(propertyStr);
+ }
+
+ /**
* Returns the list of IDs for all storage units on this device
* Information about each storage unit can be accessed via {@link #getStorageInfo}.
*
@@ -421,6 +433,7 @@ public final class MtpDevice {
private native boolean native_open(String deviceName, int fd);
private native void native_close();
private native MtpDeviceInfo native_get_device_info();
+ private native int native_set_device_property_init_version(String propertyStr);
private native int[] native_get_storage_ids();
private native MtpStorageInfo native_get_storage_info(int storageId);
private native int[] native_get_object_handles(int storageId, int format, int objectHandle);