Project

General

Profile

« Previous | Next » 

Revision 67179b40

Added by Leszek Koltunski almost 2 years ago

SetName dialog can become entangled in exceptions...

View differences:

src/main/java/org/distorted/dialogs/RubikDialogSetName.java
132 132

  
133 133
          name = name.replace(' ', '_');
134 134

  
135
          RubikActivity act = (RubikActivity)getActivity();
136
          ScreenList.switchScreen(act, ScreenList.PLAY);
137
          RubikScores.getInstance().setName(name);
135
          try
136
            {
137
            RubikActivity act = (RubikActivity)getActivity();
138
            ScreenList.switchScreen(act, ScreenList.PLAY);
139
            RubikScores.getInstance().setName(name);
138 140

  
139
          Bundle bundle = new Bundle();
140
          bundle.putInt("tab", RubikObjectList.getCurrObject() );
141
          bundle.putBoolean("submitting", true);
141
            Bundle bundle = new Bundle();
142
            bundle.putInt("tab", RubikObjectList.getCurrObject() );
143
            bundle.putBoolean("submitting", true);
142 144

  
143
          RubikDialogScores scores = new RubikDialogScores();
144
          scores.setArguments(bundle);
145
          scores.show(act.getSupportFragmentManager(), null);
145
            RubikDialogScores scores = new RubikDialogScores();
146
            scores.setArguments(bundle);
147
            scores.show(act.getSupportFragmentManager(), null);
148
            }
149
          catch(IllegalStateException ex)
150
            {
151
            android.util.Log.e("D", "IllegalStateException trying to display SetName");
152
            }
146 153
          }
147 154
        }
148 155
      });

Also available in: Unified diff