package iphan.pibex.igarassu.ifpe.edu.br.ui.fragments;

import android.app.AlertDialog;
import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;

import iphan.pibex.igarassu.ifpe.edu.br.constants.Constants;
import iphan.pibex.igarassu.ifpe.edu.br.model.GoogleMapsModel;
import iphan.pibex.igarassu.ifpe.edu.br.R;
import iphan.pibex.igarassu.ifpe.edu.br.util.SharedPreferencesUtil;

/**
 * Método de AlertDialog para escolha do tipo do mapa
 */
public class DialogTypeMapsFragment extends DialogFragment {
    private static AlertDialog.Builder builder;

    public static void alertDialog(final Context context) {
        builder = new AlertDialog.Builder(context);
        builder.setTitle(R.string.type_maps)
                .setItems(R.array.type_maps, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        if (which == 0) {
                            GoogleMapsModel.getMap().setMapType(Constants.MAP_TYPE_NORMAL);
                            SharedPreferencesUtil.setTypeMaps(context, Constants.MAP_TYPE_NORMAL);
                        } else if (which == 1) {
                            GoogleMapsModel.getMap().setMapType(Constants.MAP_TYPE_HYBRID);
                            SharedPreferencesUtil.setTypeMaps(context, Constants.MAP_TYPE_HYBRID);
                        }
                    }
                });
        builder.show();
    }

}

@@ -907,21 +907,18 @@
 og, int 
-which
+id
 ) %7B%0A    
@@ -937,29 +937,26 @@
         if (
-which
+id
  == 0) %7B%0A   
@@ -1182,13 +1182,10 @@
 if (
-which
+id
  == 

Update DialogTypeMapsFragment.java