Use dialog utilities when showing sql error, version bump

pull/14/head 4.3.4.2
Sam Bosley 12 years ago
parent 9a4633b2e6
commit 37a9f88a7c

@ -6,8 +6,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid"
android:versionName="4.3.4.1"
android:versionCode="283">
android:versionName="4.3.4.2"
android:versionCode="284">
<!-- widgets, alarms, and services will break if Astrid is installed on SD card -->
<!-- android:installLocation="internalOnly"> -->

@ -36,6 +36,7 @@ import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.actfm.sync.ActFmPreferenceService;
import com.todoroo.astrid.actfm.sync.ActFmSyncService;
@ -256,11 +257,11 @@ public class StartupService {
* @param e error that was raised
*/
public static void handleSQLiteError(Context context, final SQLiteException e) {
new AlertDialog.Builder(context)
.setTitle(R.string.DB_corrupted_title)
.setMessage(R.string.DB_corrupted_body)
.setPositiveButton(R.string.DLG_ok, null)
.create().show();
if (context instanceof Activity) {
Activity activity = (Activity) context;
DialogUtilities.okDialog(activity, activity.getString(R.string.DB_corrupted_title),
0, activity.getString(R.string.DB_corrupted_body), null);
}
e.printStackTrace();
}

@ -46,6 +46,7 @@ import com.todoroo.astrid.utility.AstridPreferences;
public final class UpgradeService {
public static final int V4_3_4_2 = 284;
public static final int V4_3_4_1 = 283;
public static final int V4_3_4 = 282;
public static final int V4_3_3 = 281;

@ -14,7 +14,6 @@ import org.json.JSONObject;
import android.content.Context;
import android.database.sqlite.SQLiteException;
import android.os.Looper;
import android.util.Log;
import com.todoroo.andlib.data.TodorooCursor;
@ -67,7 +66,6 @@ public final class ABTestEventReportingService {
new Thread(new Runnable() {
@Override
public void run() {
Looper.prepare(); // In case something goes wrong
try {
abTestEventDao.createRelativeDateEvents();
pushAllUnreportedABTestEvents();

Loading…
Cancel
Save