Revert "Add logging to indicate how many call log rows are clean..."
Revert submission 24179730-cherrypick-calllog-logging-ta8jp2a4iaa Reason for revert: Moving to D1-Dev and going to make some other logging improvements. Reverted changes: /q/submissionid:24179730-cherrypick-calllog-logging-ta8jp2a4iaa Bug: 290557274 Change-Id: I476a398ffe317a13b115701d79e1f615314ed8ad Test: Build.
This commit is contained in:
committed by
Android (Google) Code Review
parent
bb3e0b23f9
commit
4f1d70bc15
@@ -1985,14 +1985,13 @@ public class CallLog {
|
||||
Log.w(LOG_TAG, "Failed to insert into call log; null result uri.");
|
||||
}
|
||||
|
||||
int numDeleted;
|
||||
if (values.containsKey(PHONE_ACCOUNT_ID)
|
||||
&& !TextUtils.isEmpty(values.getAsString(PHONE_ACCOUNT_ID))
|
||||
&& values.containsKey(PHONE_ACCOUNT_COMPONENT_NAME)
|
||||
&& !TextUtils.isEmpty(values.getAsString(PHONE_ACCOUNT_COMPONENT_NAME))) {
|
||||
// Only purge entries for the same phone account.
|
||||
numDeleted = resolver.delete(uri, "_id IN "
|
||||
+ "(SELECT _id FROM calls"
|
||||
resolver.delete(uri, "_id IN " +
|
||||
"(SELECT _id FROM calls"
|
||||
+ " WHERE " + PHONE_ACCOUNT_COMPONENT_NAME + " = ?"
|
||||
+ " AND " + PHONE_ACCOUNT_ID + " = ?"
|
||||
+ " ORDER BY " + DEFAULT_SORT_ORDER
|
||||
@@ -2002,15 +2001,14 @@ public class CallLog {
|
||||
});
|
||||
} else {
|
||||
// No valid phone account specified, so default to the old behavior.
|
||||
numDeleted = resolver.delete(uri, "_id IN "
|
||||
+ "(SELECT _id FROM calls ORDER BY " + DEFAULT_SORT_ORDER
|
||||
resolver.delete(uri, "_id IN " +
|
||||
"(SELECT _id FROM calls ORDER BY " + DEFAULT_SORT_ORDER
|
||||
+ " LIMIT -1 OFFSET 500)", null);
|
||||
}
|
||||
Log.i(LOG_TAG, "addEntry: cleaned up " + numDeleted + " old entries");
|
||||
|
||||
return result;
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(LOG_TAG, "Failed to insert calllog", e);
|
||||
Log.w(LOG_TAG, "Failed to insert calllog", e);
|
||||
// Even though we make sure the target user is running and decrypted before calling
|
||||
// this method, there's a chance that the user just got shut down, in which case
|
||||
// we'll still get "IllegalArgumentException: Unknown URL content://call_log/calls".
|
||||
|
||||
Reference in New Issue
Block a user