c.java 1.76 KB
package com.instabug.library.e.a;

import android.content.Context;
import com.instabug.library.e.c.a;
import com.instabug.library.e.c.b;
import com.instabug.library.e.c.d;
import com.instabug.library.e.d;
import com.instabug.library.internal.a.b;
import com.instabug.library.util.InstabugSDKLogger;
import java.io.IOException;
import org.json.JSONException;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;

public class c
{
  private static c a;
  private com.instabug.library.e.a b = new com.instabug.library.e.a();
  
  public static c a()
  {
    if (a == null) {
      a = new c();
    }
    return a;
  }
  
  public void a(Context paramContext, String paramString, final c.a<String, Throwable> parama)
    throws JSONException, IOException
  {
    InstabugSDKLogger.d(this, "Registering GCM");
    com.instabug.library.e.c localc = this.b.a(paramContext, c.b.c, c.d.c);
    localc.a("device_token", new com.instabug.library.internal.module.a().a(paramContext).l());
    localc.a("push_token", paramString);
    this.b.a(localc).subscribeOn(Schedulers.io()).subscribe(new Subscriber()
    {
      public final void onCompleted()
      {
        InstabugSDKLogger.d(this, "registerGCM request completed");
      }
      
      public final void onError(Throwable paramAnonymousThrowable)
      {
        InstabugSDKLogger.d(this, "registerGCM request got error: " + paramAnonymousThrowable.getMessage());
        parama.a(paramAnonymousThrowable);
      }
      
      public final void onStart()
      {
        InstabugSDKLogger.d(this, "registerGCM request started");
      }
    });
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/e/a/c.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */