13 Commits

Author SHA1 Message Date
Mike Lockwood
1b198ea685 MTP: Create files/folders with group media_rw instead of sdcard_rw
Otherwise the sdcard daemon that implements the Fuse file system at
/mnt/sdcard won't have write access to the files.

BUG: 3254123

Change-Id: Ib0c306bbc31ec936fd6164f17e7cd1b5dfff21b8
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-13 20:11:15 -08:00
Mike Lockwood
7f36b19b6b MTP: Add support for reserve storage setting to avoid low storage situations.
Set resource config_mtpReserveSpaceMegabytes to number of megabytes to reserve.
If MTP has dedicated storage this value should be zero, but if MTP is
sharing storage with the rest of the system, set this to a positive value
to ensure that MTP activity does not result in the storage being
too close to full.

BUG: 3250924

Change-Id: I881c87240da268bad1ea1b99ad03673ab85ffdbf
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-12 12:17:43 -08:00
Mike Lockwood
3e13c1b705 MTP: Remove some excessive logging
Change-Id: I4b082d8a2ea7ec4ee80e557ad50ed10b03fe4c52
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-11 08:42:53 -04:00
Mike Lockwood
602bebd3fc MTP: try to fix sim build
Change-Id: I25b7bbecf61043e326105c74b2244036beda7c43
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-02 09:58:48 -04:00
Mike Lockwood
eabe8bfaf8 Add settings option for running MTP server in PTP mode.
This can be used as a compatibility workaround for host operating systems
without MTP support.

Change-Id: If4f1856206056ca8e40c3ffbfa382f185c413598
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-31 14:35:23 -04:00
Mike Lockwood
2b2bff5d98 MTP: Remove retry loop from MTP server code
This should eliminate the spammy logging that my coworkers have noticed.

Change-Id: Ic0e611f5277dd13651490cbe5f7ded5f6e17db4f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-18 13:31:48 -04:00
Mike Lockwood
23ee42f904 MTP: Fix some thread safety issues in MTP server start/stop sequence.
Change-Id: Ied1cddc6220fa7394e8de99df9bc37a1208b04ff
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-03 15:35:38 -04:00
Mike Lockwood
ff164a7d6f Exclude MTP implementation from simulator build
Change-Id: I93364c74c26ba6e2bf6b08f1bd82802b966c8dfb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-15 15:27:38 -04:00
Mike Lockwood
be125a50b4 MTP: Add support for sending events to the host when objects are added and removed
Change-Id: Ia1d5232b919c644c670ff9ca651eca92b3f9ad42
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-13 20:04:22 -04:00
Mike Lockwood
c5c7853b63 Remove some scafolding and test code that is no longer worth maintaining.
Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-09 11:07:55 -04:00
Mike Lockwood
d21eac9c70 MTP: Use media provider database to implement MTP device support.
Uses a new "MTP objects" table in the media provider to support basic
enumeration of the external storage file system.
Support for accessing audio, video and image metadata in the existing
media provider tables will be added in a later commit.

The C++ MtpDatabase class is now abstract, to support a proxy subclass that
calls through JNI to the Java MtpDatabase class in the media provider.

Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-08 16:21:09 -04:00
Mike Lockwood
dad69277b7 MTP: Fix ownership and file permissions for transferred files and folders
All new files and folders are created with group sdcard_rw
Permissions for new files are 0664 and directories 0775

Change-Id: I6d508231150f687e2e529112fd47f10e30fa594f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-02 15:19:32 -04:00
Mike Lockwood
81ea83d108 Move MTP JNI code from libandroid_runtime to libmedia_jni
Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: I0c54bbe4e6146beba7d22e782e02ded420f50dbd
2010-06-30 17:54:10 -04:00