package com.ikea.shared.geofence;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.Geofence;
import com.google.android.gms.location.GeofencingEvent;
import com.ikea.shared.util.L;
import java.util.List;

public class GeofenceEventReceiver extends BroadcastReceiver
{
  private Context context;
  private GoogleApiClient googleApiClient;

  private void HandleIntent(Intent paramIntent, Context paramContext)
  {
    GeofencingEvent localGeofencingEvent = GeofencingEvent.fromIntent(paramIntent);
    if ((localGeofencingEvent == null) || (localGeofencingEvent.hasError()));
    int i;
    do
    {
      return;
      i = localGeofencingEvent.getGeofenceTransition();
      L.D(this, "ReceiveTransitionsIntentService  transition " + i);
    }
    while ((i != 1) && (i != 2));
    List localList = localGeofencingEvent.getTriggeringGeofences();
    String str1 = "";
    if ((localList != null) && (!localList.isEmpty()))
      str1 = ((Geofence)localList.get(0)).getRequestId();
    String str2 = getTransitionString(i, paramContext);
    L.D(this, "ReceiveTransitionsIntentService  sendNotification ids " + str1);
    L.D(this, "ReceiveTransitionsIntentService  sendNotification transitionType " + str2);
    notifyStoreInOut(i, str1, paramContext);
  }

  private String getTransitionString(int paramInt, Context paramContext)
  {
    switch (paramInt)
    {
    default:
      return "Unknown transition";
    case 1:
      return "Entered";
    case 2:
    }
    return "Exited";
  }

  private void notifyStoreInOut(int paramInt, String paramString, Context paramContext)
  {
    GeofenceService.i(paramContext).notifyStoreInOut(paramInt, paramString);
  }

  public void onReceive(Context paramContext, Intent paramIntent)
  {
    this.context = paramContext;
    HandleIntent(paramIntent, paramContext);
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.ikea.shared.geofence.GeofenceEventReceiver
 * JD-Core Version:    0.6.2
 */