diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-11-12 14:12:07 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-11-12 14:12:07 +0100 |
commit | 9b43b1ed8f21577de6b020cdf03246cc74254681 (patch) | |
tree | ecd622bc075936104222e43e5f72d799553c6fb1 /main/src/cgeo/geocaching/cgeoinit.java | |
parent | 923c694b028a0b6541eb89164275297038655b02 (diff) | |
download | cgeo-9b43b1ed8f21577de6b020cdf03246cc74254681.zip cgeo-9b43b1ed8f21577de6b020cdf03246cc74254681.tar.gz cgeo-9b43b1ed8f21577de6b020cdf03246cc74254681.tar.bz2 |
ask for restore after reinstallation, fixes #777
Diffstat (limited to 'main/src/cgeo/geocaching/cgeoinit.java')
-rw-r--r-- | main/src/cgeo/geocaching/cgeoinit.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/main/src/cgeo/geocaching/cgeoinit.java b/main/src/cgeo/geocaching/cgeoinit.java index 8391f15..13a358c 100644 --- a/main/src/cgeo/geocaching/cgeoinit.java +++ b/main/src/cgeo/geocaching/cgeoinit.java @@ -33,7 +33,6 @@ import android.widget.Spinner; import android.widget.TextView; import java.io.File; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; public class cgeoinit extends AbstractActivity { @@ -603,28 +602,7 @@ public class cgeoinit extends AbstractActivity { * unused here but needed since this method is referenced from XML layout */ public void restore(View view) { - final ProgressDialog dialog = ProgressDialog.show(this, res.getString(R.string.init_backup_restore), res.getString(R.string.init_restore_running), true, false); - final AtomicBoolean atomic = new AtomicBoolean(false); - Thread restoreThread = new Thread() { - final Handler handler = new Handler() { - public void handleMessage(Message msg) { - dialog.dismiss(); - boolean restored = atomic.get(); - if (restored) { - helpDialog(res.getString(R.string.init_backup_restore), res.getString(R.string.init_restore_success)); - } else { - helpDialog(res.getString(R.string.init_backup_restore), res.getString(R.string.init_restore_failed)); - } - } - }; - - @Override - public void run() { - atomic.set(app.restoreDatabase()); - handler.sendMessage(handler.obtainMessage()); - } - }; - restoreThread.start(); + app.restoreDatabase(this); } public boolean saveValues() { |