question: @ NotNull static String removeCommonPackagePrefix ( @ NotNull String packagePrefix , @ NotNull String packageName ) { String relativePackageName = packageName ; if ( packageName . equals ( packagePrefix ) ) { relativePackageName = "" ; } else if ( packageName . length ( ) > packagePrefix . length ( ) && packageName . startsWith ( packagePrefix ) && packageName . charAt ( packagePrefix . length ( ) ) == '.' ) { relativePackageName = relativePackageName . substring ( packagePrefix . length ( ) + 1 ) ; } return relativePackageName ; }
target:  Makes the package name relative to a package prefix. Examples: getRelativePackageName("com.google", "com.google.android") -> "android" getRelativePackageName("com.google.android", "com.google.android") -> "" getRelativePackageName("com.google.android", "not.google.android") -> "not.google.android"