b.java 1.75 KB
package com.instabug.library.internal.layer;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.view.View;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.SnapshotReadyCallback;
import com.instabug.library.util.InstabugSDKLogger;
import java.lang.ref.WeakReference;

public class b
  implements c
{
  private WeakReference<GoogleMap> a;
  private WeakReference<View> b;
  private Bitmap c;
  
  public b(View paramView, GoogleMap paramGoogleMap)
  {
    this.a = new WeakReference(paramGoogleMap);
    this.b = new WeakReference(paramView);
  }
  
  public void a(Canvas paramCanvas)
  {
    int[] arrayOfInt = new int[2];
    ((View)this.b.get()).getLocationOnScreen(arrayOfInt);
    paramCanvas.drawBitmap(this.c, arrayOfInt[0], arrayOfInt[1], null);
  }
  
  public void a(final c.a parama)
  {
    if ((this.a == null) || (this.a.get() == null) || (this.b == null) || (this.b.get() == null) || (((View)this.b.get()).getVisibility() != 0)) {
      parama.a();
    }
    ((GoogleMap)this.a.get()).snapshot(new GoogleMap.SnapshotReadyCallback() {});
  }
  
  public boolean a()
  {
    if ((this.a.get() == null) || (this.b.get() == null))
    {
      InstabugSDKLogger.w(this, "Registered Google MapView no longer exists. Skipping.");
      return false;
    }
    if (((View)this.b.get()).getWindowToken() == null)
    {
      InstabugSDKLogger.w(this, "Registered Google MapView is not attached to window. Skipping.");
      return false;
    }
    return true;
  }
  
  public View c()
  {
    return (View)this.b.get();
  }
}


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