Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23217,6 +23217,7 @@ package android.media { method public static android.net.Uri getValidRingtoneUri(android.content.Context); method public boolean hasHapticChannels(int); method public static boolean hasHapticChannels(@NonNull android.net.Uri); method public static boolean hasHapticChannels(@NonNull android.content.Context, @NonNull android.net.Uri); method public int inferStreamType(); method public static boolean isDefault(android.net.Uri); method @Nullable public static android.content.res.AssetFileDescriptor openDefaultRingtoneUri(@NonNull android.content.Context, @NonNull android.net.Uri) throws java.io.FileNotFoundException; media/java/android/media/RingtoneManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -1059,7 +1059,8 @@ public class RingtoneManager { * haptic channels or not. As this function doesn't has a context * to resolve the uri, the result may be wrong if the uri cannot be * resolved correctly. * Use {@link #hasHapticChannels(int)} instead when possible. * Use {@link #hasHapticChannels(int)} or {@link #hasHapticChannels(Context, Uri)} * instead when possible. * * @param ringtoneUri The {@link Uri} of a sound or ringtone. * @return true if the ringtone contains haptic channels. Loading @@ -1068,6 +1069,17 @@ public class RingtoneManager { return AudioManager.hasHapticChannels(null, ringtoneUri); } /** * Returns if the {@link Ringtone} from a given sound URI contains haptics channels or not. * * @param context the {@link android.content.Context} to use when resolving the Uri. * @param ringtoneUri the {@link Uri} of a sound or ringtone. * @return true if the ringtone contains haptic channels. */ public static boolean hasHapticChannels(@NonNull Context context, @NonNull Uri ringtoneUri) { return AudioManager.hasHapticChannels(context, ringtoneUri); } /** * Attempts to create a context for the given user. * Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23217,6 +23217,7 @@ package android.media { method public static android.net.Uri getValidRingtoneUri(android.content.Context); method public boolean hasHapticChannels(int); method public static boolean hasHapticChannels(@NonNull android.net.Uri); method public static boolean hasHapticChannels(@NonNull android.content.Context, @NonNull android.net.Uri); method public int inferStreamType(); method public static boolean isDefault(android.net.Uri); method @Nullable public static android.content.res.AssetFileDescriptor openDefaultRingtoneUri(@NonNull android.content.Context, @NonNull android.net.Uri) throws java.io.FileNotFoundException;
media/java/android/media/RingtoneManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -1059,7 +1059,8 @@ public class RingtoneManager { * haptic channels or not. As this function doesn't has a context * to resolve the uri, the result may be wrong if the uri cannot be * resolved correctly. * Use {@link #hasHapticChannels(int)} instead when possible. * Use {@link #hasHapticChannels(int)} or {@link #hasHapticChannels(Context, Uri)} * instead when possible. * * @param ringtoneUri The {@link Uri} of a sound or ringtone. * @return true if the ringtone contains haptic channels. Loading @@ -1068,6 +1069,17 @@ public class RingtoneManager { return AudioManager.hasHapticChannels(null, ringtoneUri); } /** * Returns if the {@link Ringtone} from a given sound URI contains haptics channels or not. * * @param context the {@link android.content.Context} to use when resolving the Uri. * @param ringtoneUri the {@link Uri} of a sound or ringtone. * @return true if the ringtone contains haptic channels. */ public static boolean hasHapticChannels(@NonNull Context context, @NonNull Uri ringtoneUri) { return AudioManager.hasHapticChannels(context, ringtoneUri); } /** * Attempts to create a context for the given user. * Loading