4f5e8b3ca489245005b76176ac6d28f5f184f3fe |
|
12-Jun-2015 |
Jeff Sharkey <jsharkey@android.com> |
Valid filenames have length limits! ext4 filenames are at most 255 bytes. vfat filenames are bit more lax, but we're often saving them on ext4 through a FUSE daemon, so limit them the same way. Since package names are used as directory names, verify that they're valid filenames. Tests to verify behavior. Bug: 18689171 Change-Id: If7df4c40d352954510b71de4ff05d78259c721ed
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
62539a220c6810f66b63060326bd1668f7d6b029 |
|
23-Apr-2015 |
Ben Kwa <kenobi@google.com> |
Move extension checking code into FileUtils. Move code for checking file extensions and MIME types from ExternalStorageProvider into android.os.FileUtils, so it can be used by other clients (e.g. DownloadsProvider). BUG=20157955 Change-Id: Ib16a16af723c21fb8d2912c8917dfd68653ea6fa
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
0cce5355b45d835f95a8918b8b803fd977d374e4 |
|
26-Nov-2014 |
Jeff Sharkey <jsharkey@android.com> |
Sanitize display names, keep extensions intact. When creating or renaming files on external storage, sanitize the requested display names to be valid FAT filenames. This also fixes a handful of directory traversal bugs. Also relax logic around generating display names to allow any extension which maps to the requested MIME type. Tests to verify. Bug: 18512473, 18504132 Change-Id: I89e632019ee145f53d9d9d2050932f8939a756af
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
ebf8ad5d91b22eb4359c75711a5b70ddcce0723d |
|
31-Jan-2014 |
Jeff Sharkey <jsharkey@android.com> |
Update DrmOutputStream to use raw FileDescriptor. This allows DownloadManager to use FDs, paving the way for downloading directly to content:// Uris. Also return flag indicating if deleteOlderFiles() actually deleted anything. Update tests to verify. Bug: 5287571 Change-Id: I2579e5e2113f31b2860d7b021bd61c91b6310963
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
4ca728c064aeab644f6d044e0285eaa056818b8a |
|
11-Jan-2014 |
Jeff Sharkey <jsharkey@android.com> |
Detect removable and emulated secondary storage. Also rename existing secondary storage API to match naming convention in rest of class. Bug: 11536709 Change-Id: I2684c817de4982b414893d2d9927a21e3f171d53
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
d9526907d1a51ef0b35bfbbeee43fa209d8b5bbf |
|
14-Mar-2013 |
Jeff Sharkey <jsharkey@android.com> |
Move deleteOlderFiles() to framework, tests. Supports both age and count based constraints. Added light docs and tests to verify behavior. Bug: 8387555 Change-Id: If4d0dac8bc54ce705c2a339bc09a60ea748728b8
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
98e15e78934a00cf46f2be55472b7fd7a39ac0de |
|
16-Aug-2012 |
Kenny Root <kroot@google.com> |
Use Libcore's stat instead of FileUtils#getFileStatus Remove the last user of FileUtils#getFileStatus and move it to Libcore.os.stat instead. Then we can remove the JNI code that does the equivalent of a stat. Change-Id: Ieb566a2a8a17c2dd0150724b4eb3ac1cc41c823d
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|
1a44d5dcabc18cd5ef111f732ccff91683a1a093 |
|
13-Jan-2010 |
Neal Nguyen <tommyn@google.com> |
Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources. Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code: - database/DatabaseCursorTest.java - database/DatabaseStatementTest.java - net/UriTest.java
/frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
|