b.java 2.33 KB
package com.instabug.library.e.a;

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

public class b
{
  private static b a;
  private com.instabug.library.e.a b = new com.instabug.library.e.a();
  
  public static b a()
  {
    if (a == null) {
      a = new b();
    }
    return a;
  }
  
  public Subscription a(Context paramContext, final com.instabug.library.model.a parama, final c.a<com.instabug.library.model.a, Throwable> parama1)
  {
    InstabugSDKLogger.d(this, "Downloading file request");
    for (;;)
    {
      try
      {
        paramContext = this.b.a(paramContext, parama.b(), c.d.a, a.a.c);
        InstabugSDKLogger.d(this, "create downloadFile request got error: " + localJSONException1.getMessage());
      }
      catch (JSONException localJSONException1)
      {
        try
        {
          paramContext.b(parama.c().getPath());
          this.b.a(paramContext).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Subscriber()
          {
            public final void onCompleted()
            {
              InstabugSDKLogger.d(this, "downloadFile request completed");
            }
            
            public final void onError(Throwable paramAnonymousThrowable)
            {
              InstabugSDKLogger.e(this, "downloadFile request got error: " + paramAnonymousThrowable.getMessage());
              parama1.a(paramAnonymousThrowable);
            }
            
            public final void onStart()
            {
              InstabugSDKLogger.d(this, "downloadFile request started");
            }
          });
        }
        catch (JSONException localJSONException2)
        {
          for (;;) {}
        }
        localJSONException1 = localJSONException1;
        paramContext = null;
      }
    }
  }
}


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