diff options
Diffstat (limited to 'core/java/android/content/ComponentName.java')
| -rw-r--r-- | core/java/android/content/ComponentName.java | 11 |
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 |
