Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean flag = false;
- for (int i = 0; i < constants.MIN_RETRY_AFTER_MASSIVE_UPDATE; i++){
- for(Zone aZone: zoneList) {
- for (Zone oldZone: Singleton.getInstance().getMyZones()){
- if (aZone.getId().equals(oldZone.getId()))
- flag = aZone.getFlags().charAt(2) != oldZone.getFlags().charAt(2);
- }
- }
- if (flag)
- break;
- // do something to make the handler sleep for some seconds
- }
- if (flag){
- dialog.hide();
- dialog.dismiss();
- } else {
- dialog.hide();
- dialog.dismiss();
- AlertDialog.Builder builder = new AlertDialog.Builder(plantZones.this);
- // 2. Chain together various setter methods to set the dialog characteristics
- builder.setMessage(getString(R.string.operation_error))
- .setTitle(getString(R.string.operation_title))
- .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialogInterface, int i) {
- dialog.hide();
- dialog.dismiss();
- }
- });
- // 3. Get the AlertDialog from create()
- dialog = builder.create();
- dialog.show();
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement