mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 06:49:35 +00:00
Reduce usage of Log.w()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user