Reduce usage of Log.w()

This commit is contained in:
Greyson Parrelli
2018-08-02 09:25:33 -04:00
parent a498176043
commit 43068e0613
115 changed files with 400 additions and 387 deletions

View File

@@ -50,7 +50,7 @@ public class MarkReadReceiver extends BroadcastReceiver {
List<MarkedMessageInfo> messageIdsCollection = new LinkedList<>();
for (long threadId : threadIds) {
Log.w(TAG, "Marking as read: " + threadId);
Log.i(TAG, "Marking as read: " + threadId);
List<MarkedMessageInfo> messageIds = DatabaseFactory.getThreadDatabase(context).setRead(threadId, true);
messageIdsCollection.addAll(messageIds);
}

View File

@@ -196,7 +196,7 @@ public class MessageNotifier {
public static void updateNotification(@NonNull Context context, long threadId)
{
if (System.currentTimeMillis() - lastDesktopActivityTimestamp < DESKTOP_ACTIVITY_PERIOD) {
Log.w(TAG, "Scheduling delayed notification...");
Log.i(TAG, "Scheduling delayed notification...");
executor.execute(new DelayedNotification(context, threadId));
} else {
updateNotification(context, threadId, true);
@@ -526,14 +526,14 @@ public class MessageNotifier {
MessageNotifier.updateNotification(context);
long delayMillis = delayUntil - System.currentTimeMillis();
Log.w(TAG, "Waiting to notify: " + delayMillis);
Log.i(TAG, "Waiting to notify: " + delayMillis);
if (delayMillis > 0) {
Util.sleep(delayMillis);
}
if (!canceled.get()) {
Log.w(TAG, "Not canceled, notifying...");
Log.i(TAG, "Not canceled, notifying...");
MessageNotifier.updateNotification(context, threadId, true);
MessageNotifier.cancelDelayedNotifications();
} else {

View File

@@ -19,6 +19,8 @@ import java.util.List;
public class NotificationState {
private static final String TAG = NotificationState.class.getSimpleName();
private final LinkedList<NotificationItem> notifications = new LinkedList<>();
private final LinkedHashSet<Long> threads = new LinkedHashSet<>();
@@ -102,7 +104,7 @@ public class NotificationState {
int index = 0;
for (long thread : threads) {
Log.w("NotificationState", "Added thread: " + thread);
Log.i(TAG, "Added thread: " + thread);
threadArray[index++] = thread;
}
@@ -145,7 +147,7 @@ public class NotificationState {
long[] threadArray = new long[threads.size()];
int index = 0;
for (long thread : threads) {
Log.w("NotificationState", "getAndroidAutoHeardIntent Added thread: " + thread);
Log.i(TAG, "getAndroidAutoHeardIntent Added thread: " + thread);
threadArray[index++] = thread;
}