summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2010-05-19 09:43:20 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-05-19 09:43:20 -0700
commitb32a74c73b1433a3613419e61c05f6ff8efb5b41 (patch)
treec98a9fb6c7c2b12468e7b94c8221d32ed9814945
parent37b0da26fc898e75027a4df8219fb07376f8640f (diff)
parentee1cdd0e605e9154b3b61d4bf7dd5aad9cab88ed (diff)
downloadframeworks_base-b32a74c73b1433a3613419e61c05f6ff8efb5b41.zip
frameworks_base-b32a74c73b1433a3613419e61c05f6ff8efb5b41.tar.gz
frameworks_base-b32a74c73b1433a3613419e61c05f6ff8efb5b41.tar.bz2
am ee1cdd0e: merge from open-source master
Merge commit 'ee1cdd0e605e9154b3b61d4bf7dd5aad9cab88ed' into kraken * commit 'ee1cdd0e605e9154b3b61d4bf7dd5aad9cab88ed': Don't allow invalid Uris to be added as observers.
-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);