package com.google.android.gms.internal;

import java.util.Map;

final class kq
  implements cp
{
  kq(ko paramKo) {}
  
  public final void a(mm paramMm, Map<String, String> paramMap)
  {
    ks localKs;
    String str;
    synchronized (ko.a(this.a))
    {
      if (ko.b(this.a).isDone()) {
        return;
      }
      localKs = new ks(-2, paramMap);
      str = localKs.d();
      if (str == null)
      {
        mi.e("URL missing in loadAdUrl GMSG.");
        return;
      }
    }
    if (str.contains("%40mediation_adapters%40"))
    {
      paramMm = str.replaceAll("%40mediation_adapters%40", lf.a(paramMm.getContext(), (String)paramMap.get("check_adapters"), ko.c(this.a)));
      localKs.a(paramMm);
      mi.d("Ad request URL modified to " + paramMm);
    }
    ko.b(this.a).a(localKs);
  }
}
