package com.google.android.gms.location;

import android.content.Intent;
import android.location.Location;
import com.google.android.gms.internal.nn;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class GeofencingEvent
{
  private final int agl;
  private final List<Geofence> agm;
  private final Location agn;
  private final int tq;

  private GeofencingEvent(int paramInt1, int paramInt2, List<Geofence> paramList, Location paramLocation)
  {
    this.tq = paramInt1;
    this.agl = paramInt2;
    this.agm = paramList;
    this.agn = paramLocation;
  }

  public static GeofencingEvent fromIntent(Intent paramIntent)
  {
    if (paramIntent == null)
      return null;
    return new GeofencingEvent(paramIntent.getIntExtra("gms_error_code", -1), k(paramIntent), l(paramIntent), (Location)paramIntent.getParcelableExtra("com.google.android.location.intent.extra.triggering_location"));
  }

  private static int k(Intent paramIntent)
  {
    int i = paramIntent.getIntExtra("com.google.android.location.intent.extra.transition", -1);
    if (i == -1);
    while ((i != 1) && (i != 2) && (i != 4))
      return -1;
    return i;
  }

  private static List<Geofence> l(Intent paramIntent)
  {
    ArrayList localArrayList1 = (ArrayList)paramIntent.getSerializableExtra("com.google.android.location.intent.extra.geofence_list");
    if (localArrayList1 == null)
      return null;
    ArrayList localArrayList2 = new ArrayList(localArrayList1.size());
    Iterator localIterator = localArrayList1.iterator();
    while (localIterator.hasNext())
      localArrayList2.add(nn.h((byte[])localIterator.next()));
    return localArrayList2;
  }

  public int getErrorCode()
  {
    return this.tq;
  }

  public int getGeofenceTransition()
  {
    return this.agl;
  }

  public List<Geofence> getTriggeringGeofences()
  {
    return this.agm;
  }

  public Location getTriggeringLocation()
  {
    return this.agn;
  }

  public boolean hasError()
  {
    return this.tq != -1;
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.gms.location.GeofencingEvent
 * JD-Core Version:    0.6.2
 */