Home
last modified time | relevance | path

Searched refs:afd (Results 1 – 11 of 11) sorted by relevance

/frameworks/base/media/java/android/media/
DSoundPool.java170 public int load(AssetFileDescriptor afd, int priority) { in load() argument
171 return mImpl.load(afd, priority); in load()
414 public int load(AssetFileDescriptor afd, int priority); in load() argument
491 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId); in load() local
493 if (afd != null) { in load()
494 … id = _load(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength(), priority); in load()
496 afd.close(); in load()
504 public int load(AssetFileDescriptor afd, int priority) { in load() argument
505 if (afd != null) { in load()
506 long len = afd.getLength(); in load()
[all …]
DRingtone.java287 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd( in playFallbackRingtone() local
289 if (afd != null) { in playFallbackRingtone()
291 if (afd.getDeclaredLength() < 0) { in playFallbackRingtone()
292 mLocalPlayer.setDataSource(afd.getFileDescriptor()); in playFallbackRingtone()
294 mLocalPlayer.setDataSource(afd.getFileDescriptor(), in playFallbackRingtone()
295 afd.getStartOffset(), in playFallbackRingtone()
296 afd.getDeclaredLength()); in playFallbackRingtone()
301 afd.close(); in playFallbackRingtone()
DJetPlayer.java224 public boolean loadJetFile(AssetFileDescriptor afd) { in loadJetFile() argument
225 long len = afd.getLength(); in loadJetFile()
230 afd.getFileDescriptor(), afd.getStartOffset(), len); in loadJetFile()
DMediaPlayer.java844 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); in create() local
845 if (afd == null) return null; in create()
848 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in create()
849 afd.close(); in create()
/frameworks/ex/variablespeed/src/com/android/ex/variablespeed/
DVariableSpeedNative.java42 AssetFileDescriptor afd = context.getContentResolver().openAssetFileDescriptor(uri, "r"); in playFromContext() local
44 FileDescriptor fileDescriptor = afd.getFileDescriptor(); in playFromContext()
48 VariableSpeedNative.playFileDescriptor(fd, afd.getStartOffset(), afd.getLength()); in playFromContext()
59 MoreCloseables.closeQuietly(afd); in playFromContext()
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/
DSimplePlayer.java118 … AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(mFileResId); in playOrPause() local
119 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause()
120 afd.close(); in playOrPause()
/frameworks/base/core/java/android/provider/
DDocumentsContract.java690 AssetFileDescriptor afd = null; in getDocumentThumbnail() local
693 afd = client.openTypedAssetFileDescriptor(documentUri, "image/*", openOpts, signal); in getDocumentThumbnail()
695 final FileDescriptor fd = afd.getFileDescriptor(); in getDocumentThumbnail()
696 final long offset = afd.getStartOffset(); in getDocumentThumbnail()
738 final Bundle extras = afd.getExtras(); in getDocumentThumbnail()
749 IoUtils.closeQuietly(afd); in getDocumentThumbnail()
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
DScoAudioTest.java360 … AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(mFileResId); in playOrPause() local
361 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause()
362 afd.close(); in playOrPause()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DCodecTest.java570 public static boolean resourcesPlayback(AssetFileDescriptor afd, int expectedDuration){ in resourcesPlayback() argument
574 mp.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(), afd.getLength()); in resourcesPlayback()
/frameworks/base/core/java/android/content/
DContentResolver.java761 AssetFileDescriptor afd = openAssetFileDescriptor(uri, mode, cancellationSignal); in openFileDescriptor() local
762 if (afd == null) { in openFileDescriptor()
766 if (afd.getDeclaredLength() < 0) { in openFileDescriptor()
768 return afd.getParcelFileDescriptor(); in openFileDescriptor()
774 afd.close(); in openFileDescriptor()
/frameworks/base/docs/html/training/contacts-provider/
Ddisplay-contact-badge.jd244 AssetFileDescriptor afd = null;
277 afd = getActivity().getContentResolver().
283 FileDescriptor fileDescriptor = afd.getFileDescriptor();
299 if (afd != null) {
301 afd.close();