@Test public void shouldExtractPackageNameFromComponentNameFlattenString() { val packageName = ComponentNameUtils.packageNameFrom("com.abc/MyActivity"); assertThat(packageName, is("com.abc")); }
@NonNull public static String packageNameFrom(@Nullable final String flattenComponentName) { val parts = nullToEmpty(flattenComponentName).split(COMPONENT_NAME_SEPARATOR); return (parts.length == 2) ? parts[0] : ""; }
ComponentNameUtils { @NonNull public static String packageNameFrom(@Nullable final String flattenComponentName) { val parts = nullToEmpty(flattenComponentName).split(COMPONENT_NAME_SEPARATOR); return (parts.length == 2) ? parts[0] : ""; } }
ComponentNameUtils { @NonNull public static String packageNameFrom(@Nullable final String flattenComponentName) { val parts = nullToEmpty(flattenComponentName).split(COMPONENT_NAME_SEPARATOR); return (parts.length == 2) ? parts[0] : ""; } private  ComponentNameUtils(); }
ComponentNameUtils { @NonNull public static String packageNameFrom(@Nullable final String flattenComponentName) { val parts = nullToEmpty(flattenComponentName).split(COMPONENT_NAME_SEPARATOR); return (parts.length == 2) ? parts[0] : ""; } private  ComponentNameUtils(); @NonNull static String packageNameFrom(@Nullable final String flattenComponentName); @NonNull static ComponentName fromFlattenString(@Nullable final String flattenComponentName); }
ComponentNameUtils { @NonNull public static String packageNameFrom(@Nullable final String flattenComponentName) { val parts = nullToEmpty(flattenComponentName).split(COMPONENT_NAME_SEPARATOR); return (parts.length == 2) ? parts[0] : ""; } private  ComponentNameUtils(); @NonNull static String packageNameFrom(@Nullable final String flattenComponentName); @NonNull static ComponentName fromFlattenString(@Nullable final String flattenComponentName); static final ComponentName DUMMY_COMPONENT; }