Bug Fix: Crash on preparing delivery reports
This commit is contained in:
parent
a4faf1dc43
commit
bf00fb48c6
@ -240,7 +240,13 @@ public class DeliveryDbAdapter {
|
|||||||
|
|
||||||
public String nameFromNumber(String number) {
|
public String nameFromNumber(String number) {
|
||||||
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
|
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
|
||||||
Cursor c = mCtx.getContentResolver().query(uri, new String[]{PhoneLookup.DISPLAY_NAME},null, null, null);
|
Cursor c = null;
|
||||||
|
try {
|
||||||
|
c = mCtx.getContentResolver().query(uri, new String[]{PhoneLookup.DISPLAY_NAME},null, null, null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/*Uri contactUri = Uri.withAppendedPath(Phones.CONTENT_FILTER_URL, Uri.encode(number));
|
/*Uri contactUri = Uri.withAppendedPath(Phones.CONTENT_FILTER_URL, Uri.encode(number));
|
||||||
Cursor c = mCtx.getContentResolver().query(contactUri, new String[] { Phones.DISPLAY_NAME }, null, null, null);
|
Cursor c = mCtx.getContentResolver().query(contactUri, new String[] { Phones.DISPLAY_NAME }, null, null, null);
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user