@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;
}

@ 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 ; }
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 "
