[gvfs] mtp: Remove avoidance of file push for >4GB files on Android
- From: Philip Langdale <philipl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] mtp: Remove avoidance of file push for >4GB files on Android
- Date: Tue, 9 May 2017 02:53:32 +0000 (UTC)
commit 3738d918a69d79dc2687d13c45989d4995041adc
Author: Philip Langdale <philipl overt org>
Date: Sun May 7 15:10:44 2017 -0700
mtp: Remove avoidance of file push for >4GB files on Android
We added an avoidance of using the push mechanism for >4GB files
on Android due to observed behaviour in Android 5.x where this was
incredibly slow. By avoiding it we did a fallback to the partial
object API which was faster than the buggy API but slower than the
push API when it works correctly.
This problem was fixed in Android 6.0 and remains fixed today. There
is no way to detect the android version on the device, so we're stuck
either always using the workaround or not using it at all. Given
that Android is now two major versions past the bug and USB 3.x
connectivity is more common, it becomes unreasonable to inflict the
inferior performance on all the non-buggy devices. It's time to move
on.
https://bugzilla.gnome.org/show_bug.cgi?id=736495
daemon/gvfsbackendmtp.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 0b67c40..2a418a2 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -2022,18 +2022,6 @@ do_push (GVfsBackend *backend,
goto exit;
}
- /*
- * Don't do this for >=4GB files with android extensions. Some devices
- * have trouble transferring large files this way. eg: Nexus 5.
- */
- if (g_file_info_get_size (info) > G_MAXUINT32 &&
- G_VFS_BACKEND_MTP (backend)->android_extension) {
- g_vfs_job_failed_literal (G_VFS_JOB (job),
- G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Operation unsupported"));
- goto exit;
- }
-
gboolean source_is_dir =
g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]