Loading media/java/android/media/Ringtone.java +14 −10 Original line number Diff line number Diff line Loading @@ -128,12 +128,15 @@ public class Ringtone { actualTitle); } } else { try { if (DrmStore.AUTHORITY.equals(authority)) { cursor = res.query(uri, DRM_COLUMNS, null, null, null); } else if (MediaStore.AUTHORITY.equals(authority)) { cursor = res.query(uri, MEDIA_COLUMNS, null, null, null); } } catch (SecurityException e) { // missing cursor is handled below } try { if (cursor != null && cursor.getCount() == 1) { Loading Loading @@ -188,12 +191,12 @@ public class Ringtone { } catch (SecurityException e) { destroyLocalPlayer(); if (!mAllowRemote) { throw new IllegalStateException("Remote playback not allowed", e); Log.w(TAG, "Remote playback not allowed: " + e); } } catch (IOException e) { destroyLocalPlayer(); if (!mAllowRemote) { throw new IllegalStateException("Remote playback not allowed", e); Log.w(TAG, "Remote playback not allowed: " + e); } } Loading Loading @@ -228,7 +231,7 @@ public class Ringtone { Log.w(TAG, "Problem playing ringtone: " + e); } } else { throw new IllegalStateException("Neither local nor remote playback available"); Log.w(TAG, "Neither local nor remote playback available"); } } Loading Loading @@ -271,7 +274,8 @@ public class Ringtone { return false; } } else { throw new IllegalStateException("Neither local nor remote playback available"); Log.w(TAG, "Neither local nor remote playback available"); return false; } } Loading Loading
media/java/android/media/Ringtone.java +14 −10 Original line number Diff line number Diff line Loading @@ -128,12 +128,15 @@ public class Ringtone { actualTitle); } } else { try { if (DrmStore.AUTHORITY.equals(authority)) { cursor = res.query(uri, DRM_COLUMNS, null, null, null); } else if (MediaStore.AUTHORITY.equals(authority)) { cursor = res.query(uri, MEDIA_COLUMNS, null, null, null); } } catch (SecurityException e) { // missing cursor is handled below } try { if (cursor != null && cursor.getCount() == 1) { Loading Loading @@ -188,12 +191,12 @@ public class Ringtone { } catch (SecurityException e) { destroyLocalPlayer(); if (!mAllowRemote) { throw new IllegalStateException("Remote playback not allowed", e); Log.w(TAG, "Remote playback not allowed: " + e); } } catch (IOException e) { destroyLocalPlayer(); if (!mAllowRemote) { throw new IllegalStateException("Remote playback not allowed", e); Log.w(TAG, "Remote playback not allowed: " + e); } } Loading Loading @@ -228,7 +231,7 @@ public class Ringtone { Log.w(TAG, "Problem playing ringtone: " + e); } } else { throw new IllegalStateException("Neither local nor remote playback available"); Log.w(TAG, "Neither local nor remote playback available"); } } Loading Loading @@ -271,7 +274,8 @@ public class Ringtone { return false; } } else { throw new IllegalStateException("Neither local nor remote playback available"); Log.w(TAG, "Neither local nor remote playback available"); return false; } } Loading