From 2b1cc31f1bc9103121a39e14a55c49856dd9db31 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 11 Oct 2012 11:34:12 -0700 Subject: [PATCH] Sometimes its a non-sql exception that gets thrown in the phone state receiver --- .../com/todoroo/astrid/calls/PhoneStateChangedReceiver.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/calls/PhoneStateChangedReceiver.java b/astrid/plugin-src/com/todoroo/astrid/calls/PhoneStateChangedReceiver.java index 05fa975fc..e5d17f1a3 100644 --- a/astrid/plugin-src/com/todoroo/astrid/calls/PhoneStateChangedReceiver.java +++ b/astrid/plugin-src/com/todoroo/astrid/calls/PhoneStateChangedReceiver.java @@ -11,7 +11,6 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.database.Cursor; -import android.database.sqlite.SQLiteException; import android.net.Uri; import android.provider.CallLog.Calls; import android.provider.ContactsContract; @@ -66,7 +65,7 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver { new String[] { Integer.toString(Calls.MISSED_TYPE), "1" }, Calls.DATE + " DESC" ); - } catch (SQLiteException e) { // Sometimes database is locked, retry once + } catch (Exception e) { // Sometimes database is locked, retry once AndroidUtilities.sleepDeep(300L); try { calls = context.getContentResolver().query( @@ -76,7 +75,7 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver { new String[] { Integer.toString(Calls.MISSED_TYPE), "1" }, Calls.DATE + " DESC" ); - } catch (SQLiteException e2) { + } catch (Exception e2) { calls = null; } }