Implement logging interface for ringrtc-0.1.8

Implement the org.signal.ringrtc.Log.Logger interface, using
org.thoughtcrime.securesms.logging.Log as the underlying logger.

This allows ringrtc to log in the same way as the rest of the
application.
This commit is contained in:
Curt Brune
2019-10-29 19:32:23 -07:00
committed by Alan Evans
parent 7bb1caa22e
commit 2b1386232f
4 changed files with 35 additions and 4 deletions

View File

@@ -64,6 +64,7 @@ import org.thoughtcrime.securesms.notifications.MessageNotifier;
import org.thoughtcrime.securesms.notifications.NotificationChannels;
import org.thoughtcrime.securesms.providers.BlobProvider;
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
import org.thoughtcrime.securesms.ringrtc.RingRtcLogger;
import org.thoughtcrime.securesms.service.DirectoryRefreshListener;
import org.thoughtcrime.securesms.service.ExpiringMessageManager;
import org.thoughtcrime.securesms.service.IncomingMessageObserver;
@@ -319,7 +320,7 @@ public class ApplicationContext extends MultiDexApplication implements DefaultLi
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true);
}
CallConnectionFactory.initialize(this);
CallConnectionFactory.initialize(this, new RingRtcLogger());
} catch (UnsatisfiedLinkError e) {
Log.w(TAG, e);
}

View File

@@ -0,0 +1,30 @@
package org.thoughtcrime.securesms.ringrtc;
import org.thoughtcrime.securesms.logging.Log;
public class RingRtcLogger implements org.signal.ringrtc.Log.Logger {
@Override
public void v(String tag, String message, Throwable t) {
Log.v(tag, message, t);
}
@Override
public void d(String tag, String message, Throwable t) {
Log.d(tag, message, t);
}
@Override
public void i(String tag, String message, Throwable t) {
Log.i(tag, message, t);
}
@Override
public void w(String tag, String message, Throwable t) {
Log.w(tag, message, t);
}
@Override
public void e(String tag, String message, Throwable t) {
Log.e(tag, message, t);
}
}