code: public static Map<String, String> splitQueryParameters(Uri rawUri) {
          String query = rawUri.getEncodedQuery();
  
          if (query == null) {
              return Collections.emptyMap();
          }
  
          Map<String, String> paramMap = new LinkedHashMap<>();
          int start = 0;
          do {
              int next = query.indexOf('&', start);
              int end = (next == -1) ? query.length() : next;
  
              int separator = query.indexOf('=', start);
              if (separator > end || separator == -1) {
                  separator = end;
              }
  
              String name = query.substring(start, separator);
  
              if (!android.text.TextUtils.isEmpty(name)) {
                  String value = (separator == end ? "" : query.substring(separator + 1, end));
                  paramMap.put(Uri.decode(name), Uri.decode(value));
              }
  
              // Move start to end of name.
              start = end + 1;
          } while (start < query.length());
  
          return Collections.unmodifiableMap(paramMap);
      }
docs: Split query parameters
  @param rawUri raw uri
  @return map with params