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

Commit 75948e85 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Media Device] Add null check to avoid npe for compareTo method" into tm-dev

parents 80017b1f 4631d24e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -332,6 +332,9 @@ public abstract class MediaDevice implements Comparable<MediaDevice> {
     */
    @Override
    public int compareTo(MediaDevice another) {
        if (another == null) {
            return -1;
        }
        // Check Bluetooth device is have same connection state
        if (isConnected() ^ another.isConnected()) {
            if (isConnected()) {