am 37f180b4: Merge "App ops: don\'t crash when provide read access is off." into jb-mr2-dev

* commit '37f180b4a52e4c1d0b6a7b400b6579b7ff25f307':
  App ops: don't crash when provide read access is off.
This commit is contained in:
Dianne Hackborn
2013-03-23 01:47:45 +00:00
committed by Android Git Automerger

View File

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