@@ -45,12 +45,13 @@ import io.element.android.features.call.impl.pip.PipView
4545import io.element.android.features.call.impl.services.CallForegroundService
4646import io.element.android.features.call.impl.utils.CallIntentDataParser
4747import io.element.android.libraries.architecture.bindings
48+ import io.element.android.libraries.core.log.logger.LoggerTag
4849import io.element.android.libraries.designsystem.theme.ElementThemeApp
4950import io.element.android.libraries.preferences.api.store.AppPreferencesStore
5051import timber.log.Timber
5152import javax.inject.Inject
5253
53- private const val loggerTag = " ElementCallActivity"
54+ private val loggerTag = LoggerTag ( " ElementCallActivity" )
5455
5556class ElementCallActivity :
5657 AppCompatActivity (),
@@ -135,7 +136,7 @@ class ElementCallActivity :
135136 DisposableEffect (Unit ) {
136137 val listener = Runnable {
137138 if (requestPermissionCallback != null ) {
138- Timber .tag(loggerTag).w(" Ignoring onUserLeaveHint event because user is asked to grant permissions" )
139+ Timber .tag(loggerTag.value ).w(" Ignoring onUserLeaveHint event because user is asked to grant permissions" )
139140 } else {
140141 pipEventSink(PictureInPictureEvents .EnterPictureInPicture )
141142 }
@@ -149,7 +150,7 @@ class ElementCallActivity :
149150 val onPictureInPictureModeChangedListener = Consumer { _: PictureInPictureModeChangedInfo ->
150151 pipEventSink(PictureInPictureEvents .OnPictureInPictureModeChanged (isInPictureInPictureMode))
151152 if (! isInPictureInPictureMode && ! lifecycle.currentState.isAtLeast(Lifecycle .State .STARTED )) {
152- Timber .tag(loggerTag).d(" Exiting PiP mode: Hangup the call" )
153+ Timber .tag(loggerTag.value ).d(" Exiting PiP mode: Hangup the call" )
153154 eventSink?.invoke(CallScreenEvents .Hangup )
154155 }
155156 }
@@ -193,18 +194,18 @@ class ElementCallActivity :
193194 }
194195 val currentCallType = webViewTarget.value
195196 if (currentCallType == null && callType == null ) {
196- Timber .tag(loggerTag).d(" Re-opened the activity but we have no url to load or a cached one, finish the activity" )
197+ Timber .tag(loggerTag.value ).d(" Re-opened the activity but we have no url to load or a cached one, finish the activity" )
197198 finish()
198199 } else if (currentCallType == null ) {
199- Timber .tag(loggerTag).d(" Set the call type and create the presenter" )
200+ Timber .tag(loggerTag.value ).d(" Set the call type and create the presenter" )
200201 webViewTarget.value = callType
201202 presenter = presenterFactory.create(callType!! , this )
202203 } else if (callType != currentCallType) {
203- Timber .tag(loggerTag).d(" User starts another call, restart the Activity" )
204+ Timber .tag(loggerTag.value ).d(" User starts another call, restart the Activity" )
204205 setIntent(intent)
205206 recreate()
206207 } else {
207- Timber .tag(loggerTag).d(" Coming back from notification, do nothing" )
208+ Timber .tag(loggerTag.value ).d(" Coming back from notification, do nothing" )
208209 }
209210 }
210211
0 commit comments