summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Wen <josephwen@google.com>2015-05-26 15:11:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-26 15:11:09 +0000
commitf981ea95f2e951a558f73fb941cf006423e52627 (patch)
tree71d5578c5295487d27ecb7569b54b758262574a2
parentb7b7b5ece86e32a7e5636d0c41c3dee373e8ac5a (diff)
parentb409110cc114c30ddd6a3a64e6c2395caf413dec (diff)
downloadframeworks_base-f981ea95f2e951a558f73fb941cf006423e52627.zip
frameworks_base-f981ea95f2e951a558f73fb941cf006423e52627.tar.gz
frameworks_base-f981ea95f2e951a558f73fb941cf006423e52627.tar.bz2
Merge "Update Statement Service" into mnc-dev
-rw-r--r--packages/StatementService/src/com/android/statementservice/retriever/Relation.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/StatementService/src/com/android/statementservice/retriever/Relation.java b/packages/StatementService/src/com/android/statementservice/retriever/Relation.java
index 91218c6..124f46d 100644
--- a/packages/StatementService/src/com/android/statementservice/retriever/Relation.java
+++ b/packages/StatementService/src/com/android/statementservice/retriever/Relation.java
@@ -30,16 +30,12 @@ import java.util.regex.Pattern;
* <p> We may add other kinds in the future.
*
* <p> The detail field is a lowercase alphanumeric string with underscores and periods allowed
- * (matching the regex [a-z0-9_.]+), but otherwise unstructured. It is also possible to specify '*'
- * (the wildcard character) as the detail if the relation applies to any detail in the specified
- * kind.
+ * (matching the regex [a-z0-9_.]+), but otherwise unstructured.
*/
public final class Relation {
private static final Pattern KIND_PATTERN = Pattern.compile("^[a-z0-9_.]+$");
- private static final Pattern DETAIL_PATTERN = Pattern.compile("^([a-z0-9_.]+|[*])$");
-
- private static final String MATCH_ALL_DETAILS = "*";
+ private static final Pattern DETAIL_PATTERN = Pattern.compile("^([a-z0-9_.]+)$");
private final String mKind;
private final String mDetail;
@@ -92,12 +88,10 @@ public final class Relation {
}
/**
- * Returns true if {@code relation} has the same kind and detail. If {@code
- * relation.getDetail()} is wildcard (*) then returns true if the kind is the same.
+ * Returns true if {@code relation} has the same kind and detail.
*/
public boolean matches(Relation relation) {
- return getKind().equals(relation.getKind()) && (getDetail().equals(MATCH_ALL_DETAILS)
- || getDetail().equals(relation.getDetail()));
+ return getKind().equals(relation.getKind()) && getDetail().equals(relation.getDetail());
}
/**