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

Commit 78116d47 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 1767ca60: am 3a48ed0a: Merge "Bluetooth-OPP: Avoid...

am 1767ca60: am 3a48ed0a: Merge "Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero" into klp-wireless-dev

* commit '1767ca60':
  Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero
parents d1bb47fa 1767ca60
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ public class BluetoothOppService extends Service {
                        // We're beyond the end of the cursor but there's still
                        // some
                        // stuff in the local array, which can only be junk
                        if (mShares.size() != 0)
                            if (V) Log.v(TAG, "Array update: trimming " +
                                mShares.get(arrayPos).mId + " @ " + arrayPos);

@@ -497,7 +498,9 @@ public class BluetoothOppService extends Service {
                            cursor.moveToNext();
                            isAfterLast = cursor.isAfterLast();
                        } else {
                            int arrayId = mShares.get(arrayPos).mId;
                            int arrayId = 0;
                            if (mShares.size() != 0)
                                arrayId = mShares.get(arrayPos).mId;

                            if (arrayId < id) {
                                if (V) Log.v(TAG, "Array update: removing " + arrayId + " @ "