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

Commit 5a9ef04f authored by Makoto Onuki's avatar Makoto Onuki Committed by Android Git Automerger
Browse files

am bd25b5f6: Merge "Fix ArrayIndexOutOfBoundsException in Transport.query" into mnc-dev

* commit 'bd25b5f6':
  Fix ArrayIndexOutOfBoundsException in Transport.query
parents ae455573 bd25b5f6
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -223,16 +223,12 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
                Cursor cursor = ContentProvider.this.query(uri, projection, selection,
                        selectionArgs, sortOrder, CancellationSignal.fromTransport(
                                cancellationSignal));

                // Create a projection for all columns.
                final int columnCount = cursor.getCount();
                String[] allColumns = new String[columnCount];
                for (int i = 0; i < columnCount; i++) {
                    allColumns[i] = cursor.getColumnName(i);
                if (cursor == null) {
                    return null;
                }

                // Return an empty cursor for all columns.
                return new MatrixCursor(allColumns, 0);
                return new MatrixCursor(cursor.getColumnNames(), 0);
            }
            final String original = setCallingPackage(callingPkg);
            try {