mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 05:22:23 +00:00
Reduce usage of Log.w()
This commit is contained in:
@@ -240,7 +240,7 @@ public class ContactsCursorLoader extends CursorLoader {
|
||||
ContactsDatabase.NORMAL_TYPE});
|
||||
}
|
||||
}
|
||||
Log.w(TAG, "filterNonPushContacts() -> " + (System.currentTimeMillis() - startMillis) + "ms");
|
||||
Log.i(TAG, "filterNonPushContacts() -> " + (System.currentTimeMillis() - startMillis) + "ms");
|
||||
return matrix;
|
||||
} finally {
|
||||
cursor.close();
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ContactsDatabase {
|
||||
try (Cursor cursor = context.getContentResolver().query(currentContactsUri, projection, RawContacts.DELETED + " = ?", new String[] {"1"}, null)) {
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
long rawContactId = cursor.getLong(0);
|
||||
Log.w(TAG, "Deleting raw contact: " + cursor.getString(1) + ", " + rawContactId);
|
||||
Log.i(TAG, "Deleting raw contact: " + cursor.getString(1) + ", " + rawContactId);
|
||||
|
||||
context.getContentResolver().delete(currentContactsUri, RawContacts._ID + " = ?", new String[] {String.valueOf(rawContactId)});
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class ContactsDatabase {
|
||||
Optional<SystemContactInfo> systemContactInfo = getSystemContactInfo(registeredAddress);
|
||||
|
||||
if (systemContactInfo.isPresent()) {
|
||||
Log.w(TAG, "Adding number: " + registeredAddress);
|
||||
Log.i(TAG, "Adding number: " + registeredAddress);
|
||||
addTextSecureRawContact(operations, account, systemContactInfo.get().number,
|
||||
systemContactInfo.get().name, systemContactInfo.get().id);
|
||||
}
|
||||
@@ -122,16 +122,16 @@ public class ContactsDatabase {
|
||||
for (Map.Entry<Address, SignalContact> currentContactEntry : currentContacts.entrySet()) {
|
||||
if (!registeredAddressSet.contains(currentContactEntry.getKey())) {
|
||||
if (remove) {
|
||||
Log.w(TAG, "Removing number: " + currentContactEntry.getKey());
|
||||
Log.i(TAG, "Removing number: " + currentContactEntry.getKey());
|
||||
removeTextSecureRawContact(operations, account, currentContactEntry.getValue().getId());
|
||||
}
|
||||
} else if (!currentContactEntry.getValue().isVoiceSupported()) {
|
||||
Log.w(TAG, "Adding voice support: " + currentContactEntry.getKey());
|
||||
Log.i(TAG, "Adding voice support: " + currentContactEntry.getKey());
|
||||
addContactVoiceSupport(operations, currentContactEntry.getKey(), currentContactEntry.getValue().getId());
|
||||
} else if (!Util.isStringEquals(currentContactEntry.getValue().getRawDisplayName(),
|
||||
currentContactEntry.getValue().getAggregateDisplayName()))
|
||||
{
|
||||
Log.w(TAG, "Updating display name: " + currentContactEntry.getKey());
|
||||
Log.i(TAG, "Updating display name: " + currentContactEntry.getKey());
|
||||
updateDisplayName(operations, currentContactEntry.getValue().getAggregateDisplayName(), currentContactEntry.getValue().getId(), currentContactEntry.getValue().getDisplayNameSource());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ContactsSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
public void onPerformSync(Account account, Bundle extras, String authority,
|
||||
ContentProviderClient provider, SyncResult syncResult)
|
||||
{
|
||||
Log.w(TAG, "onPerformSync(" + authority +")");
|
||||
Log.i(TAG, "onPerformSync(" + authority +")");
|
||||
|
||||
if (TextSecurePreferences.isPushRegistered(getContext())) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user