Improved some logs
This commit is contained in:
parent
003b32aa9e
commit
09ebb7e63b
3 changed files with 5 additions and 4 deletions
|
@ -32,8 +32,9 @@ class LinphoneApplication : Application() {
|
|||
lateinit var corePreferences: CorePreferences
|
||||
lateinit var coreContext: CoreContext
|
||||
|
||||
fun ensureCoreExists(context: Context) {
|
||||
fun ensureCoreExists(context: Context, pushReceived: Boolean = false) {
|
||||
if (::coreContext.isInitialized && !coreContext.stopped) {
|
||||
Log.d("[Application] Skipping Core creation (push received? $pushReceived)")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -49,7 +50,7 @@ class LinphoneApplication : Application() {
|
|||
val appName = context.getString(R.string.app_name)
|
||||
Factory.instance().setDebugMode(corePreferences.debugLogs, appName)
|
||||
|
||||
Log.i("[Application] Core context created")
|
||||
Log.i("[Application] Core context created ${if (pushReceived) "from push" else ""}")
|
||||
coreContext = CoreContext(context, config)
|
||||
coreContext.start()
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class NativeContactEditor(
|
|||
private var pictureByteArray: ByteArray? = null
|
||||
|
||||
init {
|
||||
Log.i("[Native Contact Editor] Using sync account $syncAccountName with type $syncAccountType")
|
||||
Log.d("[Native Contact Editor] Using sync account $syncAccountName with type $syncAccountType")
|
||||
val contentResolver = coreContext.context.contentResolver
|
||||
val cursor = contentResolver.query(
|
||||
RawContacts.CONTENT_URI,
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.linphone.core.tools.Log
|
|||
|
||||
class CorePushReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
ensureCoreExists(context.applicationContext)
|
||||
ensureCoreExists(context.applicationContext, true)
|
||||
Log.i("[Push Receiver] Push notification received")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue