p.java 3.26 KB
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Looper;
import android.os.Message;
import java.lang.ref.WeakReference;

public final class p
{
  private static p e;
  public final Object a = new Object();
  public final Handler b = new Handler(Looper.getMainLooper(), new Handler.Callback()
  {
    public final boolean handleMessage(Message arg1)
    {
      switch (???.what)
      {
      default: 
        return false;
      }
      p localp = p.this;
      p.b localb = (p.b)???.obj;
      synchronized (localp.a)
      {
        if ((localp.c == localb) || (localp.d == localb)) {
          localp.a(localb, 2);
        }
        return true;
      }
    }
  });
  public p.b c;
  public p.b d;
  
  public static p a()
  {
    if (e == null) {
      e = new p();
    }
    return e;
  }
  
  public final void a(p.a parama)
  {
    synchronized (this.a)
    {
      if (e(parama)) {
        this.b.removeCallbacksAndMessages(this.c);
      }
      return;
    }
  }
  
  public final void a(p.b paramb)
  {
    if (paramb.b == -2) {
      return;
    }
    int i = 2750;
    if (paramb.b > 0) {
      i = paramb.b;
    }
    for (;;)
    {
      this.b.removeCallbacksAndMessages(paramb);
      this.b.sendMessageDelayed(Message.obtain(this.b, 0, paramb), i);
      return;
      if (paramb.b == -1) {
        i = 1500;
      }
    }
  }
  
  public final boolean a(p.b paramb, int paramInt)
  {
    p.a locala = (p.a)paramb.a.get();
    if (locala != null)
    {
      this.b.removeCallbacksAndMessages(paramb);
      locala.a(paramInt);
      return true;
    }
    return false;
  }
  
  public final void b()
  {
    if (this.d != null)
    {
      this.c = this.d;
      this.d = null;
      p.a locala = (p.a)this.c.a.get();
      if (locala != null) {
        locala.a();
      }
    }
    else
    {
      return;
    }
    this.c = null;
  }
  
  public final void b(p.a parama)
  {
    synchronized (this.a)
    {
      if (e(parama)) {
        a(this.c);
      }
      return;
    }
  }
  
  public final boolean c(p.a parama)
  {
    synchronized (this.a)
    {
      boolean bool = e(parama);
      return bool;
    }
  }
  
  public final boolean d(p.a parama)
  {
    for (;;)
    {
      synchronized (this.a)
      {
        if (!e(parama))
        {
          if (!f(parama)) {
            break label40;
          }
          break label35;
          return bool;
        }
      }
      label35:
      boolean bool = true;
      continue;
      label40:
      bool = false;
    }
  }
  
  public final boolean e(p.a parama)
  {
    return (this.c != null) && (this.c.a(parama));
  }
  
  public final boolean f(p.a parama)
  {
    return (this.d != null) && (this.d.a(parama));
  }
  
  public static abstract interface a
  {
    public abstract void a();
    
    public abstract void a(int paramInt);
  }
  
  public static final class b
  {
    final WeakReference<p.a> a;
    public int b;
    
    public b(int paramInt, p.a parama)
    {
      this.a = new WeakReference(parama);
      this.b = paramInt;
    }
    
    final boolean a(p.a parama)
    {
      return (parama != null) && (this.a.get() == parama);
    }
  }
}


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