summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/content/ContentService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java
index 377e383..fc2dfc0 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -537,6 +537,9 @@ public final class ContentService extends IContentService.Stub {
// Look to see if the proper child already exists
String segment = getUriSegment(uri, index);
+ if (segment == null) {
+ throw new IllegalArgumentException("Invalid Uri (" + uri + ") used for observer");
+ }
int N = mChildren.size();
for (int i = 0; i < N; i++) {
ObserverNode node = mChildren.get(i);