Skip to content

Commit

Permalink
Added check for BadTokenException.
Browse files Browse the repository at this point in the history
  • Loading branch information
johannilsson committed Jul 10, 2011
1 parent f38484d commit a85032e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/markupartist/sthlmtraveling/DeviationsActivity.java
Expand Up @@ -34,6 +34,7 @@
import android.view.ContextMenu;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager.BadTokenException;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.SimpleAdapter;
Expand Down Expand Up @@ -332,7 +333,11 @@ protected void onPostExecute(ArrayList<Deviation> result) {
if (mWasSuccess) {
fillData(result);
} else {
showDialog(DIALOG_GET_DEVIATIONS_NETWORK_PROBLEM);
try {
showDialog(DIALOG_GET_DEVIATIONS_NETWORK_PROBLEM);
} catch (BadTokenException e) {
Log.w(TAG, "Caught BadTokenException when trying to show network error dialog.");
}
}
}
}
Expand Down

0 comments on commit a85032e

Please sign in to comment.