//获取当前的手机号
public String getLocalNumber() {
Context context = getApplicationContext();
TelephonyManager tManager = (TelephonyManager)context.getSystemService(TELEPHONY_SERVICE);
String number = tManager.getLine1Number();
return number;
}
//删除通话记录
private void DeleteCall()
{
getContentResolver().delete(CallLog.Calls.CONTENT_URI, CallLog.Calls.NUMBER+"=?" , new String[]{"13078943473"});
}
//修改通话记录
private void ModifyCall()
{
ContentValues content = new ContentValues();
content.put(CallLog.Calls.TYPE, CallLog.Calls.INCOMING_TYPE);
content.put(CallLog.Calls.NUMBER,"13078945773");
content.put(CallLog.Calls.DATE, 123123123);
content.put(CallLog.Calls.NEW, "1");//0已看1未看
getContentResolver().update(CallLog.Calls.CONTENT_URI, content,CallLog.Calls.NUMBER+"=?" , new String