summaryrefslogtreecommitdiffstats
path: root/media/jni/android_media_MediaScanner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Frameworks/base: Wall Werror in media/jniAndreas Gampe2014-11-101-1/+0
| | | | | | Turn on -Wall -Werror in media/jni. Fix warnings. Change-Id: I9da54ad379d8172ee535b52ee2b0637a2533f4e3
* Switch to a type-safe album art interface.Elliott Hughes2014-06-111-6/+5
| | | | | | | (Requires a matching change in frameworks/av.) Bug: 15514223 Change-Id: I4e494cc5d7a2eb82cd2b7ae3b829fc663136267a
* Fix sense of NULL test in android_media_MediaScanner_extractAlbumArt.Elliott Hughes2014-06-091-1/+1
| | | | Change-Id: I1acb4d5df71daa47ea87813db3941fd3c676cfb5
* [LP64] Fix access to MediaAlbumArt.Elliott Hughes2014-06-051-6/+7
| | | | | | The mSize field is a uint32_t, not a long. Change-Id: Id3b9e6049e8998840d33fa886b676db2a8022064
* AArch64: Use long for pointers in media classesAshok Bhat2014-01-151-4/+4
| | | | | | | | | | | | | | For storing pointers, long is used in media classes, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Change-Id: Idc4ca0124d03df7f9cef412488abafd020e5e774 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* Remove dependency on JNIHelp header side effects.Ruben Brunk2013-09-101-0/+1
| | | | | Bug: 10680559 Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
* Revert "use utf8_length() instead of local function, isValidUtf8()"Marco Nelissen2013-02-121-5/+48
| | | | | | | | This reverts commit 1a8b6c29aaa5a1591097daca0876808cc029cbda Reason for revert: utf8_length handles a slightly different range than the checkjni code, so it's possible for a given string to pass the utf8_length check, but then fail the jni check. Change-Id: I81e15c95edd8f89782d8ad9025e68502b9340f22
* use utf8_length() instead of local function, isValidUtf8()Homin Lee2012-04-131-48/+5
| | | | | | | | | utf8_length() from libutils returns -1 when source not contains valid sequence for UTF-8. Fixed to use it and removed the local function isValidUtf8(). Change-Id: If2834ce1d1ae07fd8526ce8bc5df3fd3f44e85c8 Signed-off-by: Homin Lee <suapapa@insignal.co.kr>
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)Steve Block2012-01-191-4/+4
| | | | Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)Steve Block2012-01-191-12/+12
| | | | Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
* Verify we actually have valid utf8 metadataMarco Nelissen2011-11-031-1/+63
| | | | | | | | Before calling NewStringUTF, check that the metadata value is actually valid utf-8, and replace the offending characters with "?" if it is not. b/5534491 Change-Id: I43de4307e739ae0b7d4177937ed33aa1dfb90d98
* Untangle MediaScanner error handling.Jeff Brown2011-07-201-24/+33
| | | | | | Bug: 5056917 Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
* Remove unnecessary locking from MediaScanner JNI codeMike Lockwood2011-07-111-7/+0
| | | | | | | | | | | There is nothing in this file that requires a global lock. Furthermore, the lock can cause timeouts in native_finalize if one instance is being garbage collected while another is busy in processDirectory Bug: 5002520 Change-Id: I8717f8edeb932200d9f76b3d98915cfbe18b6ec6 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MediaScanner: reimplement the ".nomedia" feature for hiding files from the ↵Mike Lockwood2011-04-251-26/+3
| | | | | | | | | | | | | | | | media provider Previously we ignored any files and directories that had name started with '.' and ignored any directories that contained a ".nomedia" file. Now to support transferring any file via MTP, we now add these previously ignored files to the media database, but will not mark them as audio, video, image or playlist files. That way they will be included in the files table but will be hidden from the audio, video, images and playlist views that are used by apps like Music and Gallery. Bug: 3405327 Change-Id: I2d7285bd32e06c1a5c4ef6a8a15f8f8b2c33b39b Signed-off-by: Mike Lockwood <lockwood@android.com>
* More native code cleanup.Elliott Hughes2011-04-121-4/+0
| | | | | | | | Don't keep unused global references to classes, don't throw exceptions when an exception is already pending, and fix a (harmless) misunderstanding about how GetStringChars works. Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
* You don't need to poke around inside FileDescriptor manually.Elliott Hughes2011-04-111-3/+1
| | | | | | | | | | We can help you with that. Note also that getParcelFileDescriptorFD did no such thing. All its callers were passing in a regular java.io.FileDescriptor and expecting the int. No ParcelFileDescriptors involved. Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
* Media JNI code cleanupJames Dong2011-04-071-4/+1
| | | | | | | | o Don't throw exception again because an exception was already thrown o Check on return values from FindClass() and GetMethodID Change-Id: Id92bb8228f1f0d2798d1cdf7de73cbb43816060b related-to-bug: 4139926
* Add a release() method to MediaScannerJames Dong2011-03-111-17/+46
| | | | | | bug - 2586042 Change-Id: I08713ac75cbcaf01dff21a24cdefb6e2dacc92cb
* A little cleanup in MediaScanner JNI codeJames Dong2011-03-111-89/+169
| | | | | | | | o mainly use the defined class name rather than repeat the string each time to reduce the typo chance. o format the code also Change-Id: I131c98f11335ff524d01a6791baa1b8c11013abc
* MediaScanner: Add support for scanning empty directoriesMike Lockwood2010-12-161-3/+5
| | | | | | | | | Currently the media scanner does not create database entries for directories unless they contain a file that is scanned. Fixing this so we provide a consistent view of the world to MTP. Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Media scanner support for tracking files of arbitrary type.Mike Lockwood2010-09-121-16/+5
| | | | | | | | | | The native media scanner no longer filters files based on file extension. Audio, video, image and playlist files are handled as before, but non-media files are now inserted into the "files" table, which was originally added to support MTP. Change-Id: I9053218fb6d2671a3bb181405c34442b94678afc Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove most stagefright property overrides, remove VorbisPlayer and ↵Andreas Huber2010-06-231-22/+1
| | | | | | | VorbisMetadataRetriever as this functionality is now provided by stagefright. Change-Id: Ieafe75a4550c273ad59b4518d7cd4c0fce0f7cce related-to-bug: 2370115
* Reorganize some of the stagefright implementation related to metadata.Andreas Huber2010-01-081-7/+21
|
* Refactor MediaScanner. Some steps on the way towards being able to build the ↵Andreas Huber2009-12-031-1/+11
| | | | tree without OpenCore.
* When encountering a .nomedia file, notify the MediaScannerClient,Marco Nelissen2009-09-031-0/+16
| | | | | | | so that it can erase the data column for entries that are in the folder containing the .nomedia file. This prevents us from deleting (via a delete trigger) files when somebody adds a .nomedia file after the fact.
* Untangle MediaPlayer, MediaRecorder, MediaScanner and MediaMetadataRetriever JNIMarco Nelissen2009-08-031-14/+24
| | | | | code, so that creating one of those doesn't initialize all the others. Shaves a hundred milliseconds or so off music app startup time.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+304
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-304/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-0/+20
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+284