je.java 2.48 KB
import android.content.Context;
import com.google.android.gms.tagmanager.zzbo;
import com.google.android.gms.tagmanager.zzdc;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.concurrent.LinkedBlockingQueue;

public final class je
  extends Thread
  implements jd
{
  private static je d;
  private final LinkedBlockingQueue<Runnable> a = new LinkedBlockingQueue();
  private volatile boolean b = false;
  private volatile boolean c = false;
  private volatile jf e;
  private final Context f;
  
  private je(Context paramContext)
  {
    super("GAThread");
    if (paramContext != null) {}
    for (this.f = paramContext.getApplicationContext();; this.f = paramContext)
    {
      start();
      return;
    }
  }
  
  public static je a(Context paramContext)
  {
    if (d == null) {
      d = new je(paramContext);
    }
    return d;
  }
  
  public final void a(Runnable paramRunnable)
  {
    this.a.add(paramRunnable);
  }
  
  public final void a(String paramString)
  {
    a(new Runnable()
    {
      public final void run()
      {
        if (je.a(je.this) == null)
        {
          zzdc localzzdc = zzdc.a();
          localzzdc.a(je.b(je.this), jdField_this);
          je.a(je.this, localzzdc.b());
        }
        je.a(je.this).a(this.b, this.c);
      }
    });
  }
  
  public final void run()
  {
    for (;;)
    {
      boolean bool = this.c;
      try
      {
        Runnable localRunnable = (Runnable)this.a.take();
        if (!this.b) {
          localRunnable.run();
        }
      }
      catch (InterruptedException localInterruptedException)
      {
        zzbo.zzbg(localInterruptedException.toString());
      }
      catch (Throwable localThrowable)
      {
        ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
        PrintStream localPrintStream = new PrintStream(localByteArrayOutputStream);
        localThrowable.printStackTrace(localPrintStream);
        localPrintStream.flush();
        str = String.valueOf(new String(localByteArrayOutputStream.toByteArray()));
        if (str.length() == 0) {}
      }
    }
    for (String str = "Error on Google TagManager Thread: ".concat(str);; str = new String("Error on Google TagManager Thread: "))
    {
      zzbo.e(str);
      zzbo.e("Google TagManager is shutting down.");
      this.b = true;
      break;
    }
  }
}


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