android.media.RingtoneManager.getDefaultType()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中android.media.RingtoneManager.getDefaultType方法的一些代码示例,展示了RingtoneManager.getDefaultType的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RingtoneManager.getDefaultType方法的具体详情如下:
包路径:android.media.RingtoneManager
类名称:RingtoneManager
方法名:getDefaultType

RingtoneManager.getDefaultType介绍

暂无

代码示例

代码示例来源:origin: consp1racy/android-support-preference

private static void peek(@NonNull Context context, @NonNull Uri uri) {
  if (Settings.AUTHORITY.equals(uri.getAuthority())) {
    final int type = RingtoneManager.getDefaultType(uri);
    // This can throw a SecurityException.
    final Uri actualUri = RingtoneManager.getActualDefaultRingtoneUri(context, type);
    if (actualUri != null) {
      // Actual Uri may be null on Android 4 emulators, where there are no ringtones.
      // Plus silent default ringtone sounds like a valid case.
      peek(context, actualUri);
    }
    return;
  }
  // This can throw a SecurityException.
  final ContentResolver res = context.getContentResolver();
  final Cursor cursor = res.query(uri, COLUMNS, null, null, null);
  if (cursor != null) {
    cursor.close();
  }
}

代码示例来源:origin: LanSoSdk/LanSoEditor_advance

&& Settings.AUTHORITY.equals(uri.getAuthority())) {
uri = RingtoneManager.getActualDefaultRingtoneUri(context,
    RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: tcking/GiraffePlayer

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: LanSoSdk/LanSoEditor_common

&& Settings.AUTHORITY.equals(uri.getAuthority())) {
uri = RingtoneManager.getActualDefaultRingtoneUri(context,
    RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: wanliyang1990/WliveTV

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: leftcoding/GankLy

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: fanhua1994/FastVideoPlayer

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: hejunlin2013/LivePlayback

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: Dawish/ijkplayer-android-demo

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: Dawish/BriskTVLauncher

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: Dreamxiaoxuan/AndroidTvDemo

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

代码示例来源:origin: upyun/android-player-sdk

RingtoneManager.getDefaultType(uri));
if (uri == null) {
  throw new FileNotFoundException("Failed to resolve default ringtone");

相关文章