|
|
@ -69,14 +69,14 @@ public class Contact { //
|
|
|
|
String name = cursor.getString(0);
|
|
|
|
String name = cursor.getString(0);
|
|
|
|
sContactCache.put(phoneNumber, name);
|
|
|
|
sContactCache.put(phoneNumber, name);
|
|
|
|
return name;
|
|
|
|
return name;
|
|
|
|
// 异常
|
|
|
|
// 异常处理
|
|
|
|
} catch (IndexOutOfBoundsException e) {
|
|
|
|
} catch (IndexOutOfBoundsException e) {
|
|
|
|
Log.e(TAG, " Cursor get string error " + e.toString());
|
|
|
|
Log.e(TAG, " Cursor get string error " + e.toString());
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
cursor.close();
|
|
|
|
cursor.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 未找到相关信息
|
|
|
|
// 未找到相关信息处理
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Log.d(TAG, "No contact matched with number:" + phoneNumber);
|
|
|
|
Log.d(TAG, "No contact matched with number:" + phoneNumber);
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|