summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2010-05-19 09:03:57 -0700
committerAndroid Code Review <code-review@android.com>2010-05-19 09:03:57 -0700
commitbcb62f099a8619c1045df54e33d43cde85af4036 (patch)
tree5ae601798ebbea388c1ba8248704202295ba7bc8 /core
parenta3e764551413bead7608c4e0396afc5070b8e1c8 (diff)
parentf51266471cb6c3e824435ae6e416012a62266d52 (diff)
downloadframeworks_base-bcb62f099a8619c1045df54e33d43cde85af4036.zip
frameworks_base-bcb62f099a8619c1045df54e33d43cde85af4036.tar.gz
frameworks_base-bcb62f099a8619c1045df54e33d43cde85af4036.tar.bz2
Merge "Don't allow invalid Uris to be added as observers."
Diffstat (limited to 'core')
-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 974a667..89e504e 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -496,6 +496,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);