summaryrefslogtreecommitdiff
path: root/core/java/android/content/ComponentName.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2018-12-10 14:53:58 -0800
committerFelipe Leme <felipeal@google.com>2018-12-14 18:02:24 -0800
commitaa5088ede6b10c38a1a1ea29289e3c110d06962e (patch)
tree9341a792aab3bfb2c533136e009099ca6e731191 /core/java/android/content/ComponentName.java
parentbaa9c5fb55537a39a19b761440697b463fa279ca (diff)
Another round of changes on Content Capture.
- Get rid of activity-level events. - Renamed InteractionSessionId and InteractionContext to ContentCaptureSessionId and ContentCaptureContext (and made them public) - Create the explicit concept of ContentCaptureSesssion (and moved notification APIs to it). - Added APIs to let apps create new sessions (not implemented yet). - Added APIs to remove user data based on some context properties (like URI). The reasoning behind this change is to let app developers explicitly associate the captured content with some app-level domain (and also let the app ask the service to clear such data at user's request). For example, a browser app (and WebView) can use these APIs to associate the content capture events with the URL being rendered. Bug: 117944706 Fixes: 121034139 Test: atest CtsContentCaptureServiceTestCases Test: m update-api && m Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
Diffstat (limited to 'core/java/android/content/ComponentName.java')
-rw-r--r--core/java/android/content/ComponentName.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/content/ComponentName.java b/core/java/android/content/ComponentName.java
index 54e6342747db..e6ffe8b4fe86 100644
--- a/core/java/android/content/ComponentName.java
+++ b/core/java/android/content/ComponentName.java
@@ -192,6 +192,17 @@ public final class ComponentName implements Parcelable, Cloneable, Comparable<Co
}
/**
+ * Helper to get {@link #flattenToShortString()} in a {@link ComponentName} reference that can
+ * be {@code null}.
+ *
+ * @hide
+ */
+ @Nullable
+ public static String flattenToShortString(@Nullable ComponentName componentName) {
+ return componentName == null ? null : componentName.flattenToShortString();
+ }
+
+ /**
* Return a String that unambiguously describes both the package and
* class names contained in the ComponentName. You can later recover
* the ComponentName from this string through