ki.java 2.98 KB
import android.net.Uri;
import com.google.android.gms.tagmanager.zzbo;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class ki
{
  private static ki d;
  public volatile ki.a a = ki.a.a;
  public volatile String b = null;
  public volatile String c = null;
  private volatile String e = null;
  
  private static String a(String paramString)
  {
    return paramString.split("&")[0].split("=")[1];
  }
  
  public static ki a()
  {
    try
    {
      if (d == null) {
        d = new ki();
      }
      ki localki = d;
      return localki;
    }
    finally {}
  }
  
  public final boolean a(Uri paramUri)
  {
    boolean bool = true;
    String str2;
    try
    {
      str2 = URLDecoder.decode(paramUri.toString(), "UTF-8");
      if (!str2.matches("^tagmanager.c.\\S+:\\/\\/preview\\/p\\?id=\\S+&gtm_auth=\\S+&gtm_preview=\\d+(&gtm_debug=x)?$")) {
        break label182;
      }
      str1 = String.valueOf(str2);
      if (str1.length() == 0) {
        break label154;
      }
      str1 = "Container preview url: ".concat(str1);
    }
    catch (UnsupportedEncodingException paramUri)
    {
      for (;;)
      {
        label128:
        bool = false;
        continue;
        label154:
        String str1 = new String("Container preview url: ");
      }
    }
    finally {}
    zzbo.v(str1);
    if (str2.matches(".*?&gtm_debug=x$"))
    {
      this.a = ki.a.c;
      this.e = paramUri.getQuery().replace("&gtm_debug=x", "");
      if ((this.a == ki.a.b) || (this.a == ki.a.c))
      {
        paramUri = String.valueOf("/r?");
        str1 = String.valueOf(this.e);
        if (str1.length() == 0) {
          break label305;
        }
        paramUri = paramUri.concat(str1);
        this.c = paramUri;
      }
      this.b = a(this.e);
    }
    for (;;)
    {
      return bool;
      this.a = ki.a.b;
      break;
      label182:
      if (str2.matches("^tagmanager.c.\\S+:\\/\\/preview\\/p\\?id=\\S+&gtm_preview=$"))
      {
        if (a(paramUri.getQuery()).equals(this.b))
        {
          paramUri = String.valueOf(this.b);
          if (paramUri.length() != 0) {}
          for (paramUri = "Exit preview mode for container: ".concat(paramUri);; paramUri = new String("Exit preview mode for container: "))
          {
            zzbo.v(paramUri);
            this.a = ki.a.a;
            this.c = null;
            break;
          }
        }
      }
      else
      {
        paramUri = String.valueOf(str2);
        if (paramUri.length() != 0) {}
        for (paramUri = "Invalid preview uri: ".concat(paramUri);; paramUri = new String("Invalid preview uri: "))
        {
          zzbo.zzbh(paramUri);
          bool = false;
          break;
        }
        label305:
        paramUri = new String(paramUri);
        break label128;
      }
      bool = false;
    }
  }
  
  public static enum a
  {
    private a() {}
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/ki.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */