code: public static String authoritySafePath(String authority, String path) {
          if (authority != null && !authority.isEmpty() && !path.isEmpty() && !path.startsWith("/")) {
              return "/" + path;
          }
          return path;
      }
docs: Returns a path that can be safely concatenated with {@code authority}. If
  the authority is null or empty, this can be any path. Otherwise the paths
  run together like {@code http://android.comindex.html}.