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

Commit 9fa39bd2 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

App ops: don't crash when provide read access is off.

If the caller supplied an empty selection string (instead
of null) we would crash due to creating a bad SQLite statement.

Change-Id: I462803b80c81815ed9a3a320c23060daa28e8114
parent 1a89c532
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -609,7 +609,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
        // selection statement with a dummy one that will always be false.
        // This way we will get a cursor back that has the correct structure
        // but contains no rows.
        if (selection == null) {
        if (selection == null || selection.isEmpty()) {
            selection = "'A' = 'B'";
        } else {
            selection = "'A' = 'B' AND (" + selection + ")";