Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54cb5592 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 83abfb3c: am 476b03b0: Merge "Handle silent ringtone, title without permission." into jb-dev

* commit '83abfb3c':
  Handle silent ringtone, title without permission.
parents 1fee5ef1 83abfb3c
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -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) {
@@ -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);
            }
        }

@@ -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");
        }
    }

@@ -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;
        }
    }