-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: database logger [WPB-14608] (#3798)
- Loading branch information
1 parent
8d45505
commit b0aa25c
Showing
11 changed files
with
160 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
app/src/main/kotlin/com/wire/android/debug/DatabaseProfilingManager.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
app/src/main/kotlin/com/wire/android/di/accountScoped/DebugModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2025 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.android.di.accountScoped | ||
|
||
import com.wire.android.di.CurrentAccount | ||
import com.wire.android.di.KaliumCoreLogic | ||
import com.wire.kalium.logic.CoreLogic | ||
import com.wire.kalium.logic.data.user.UserId | ||
import com.wire.kalium.logic.feature.debug.BreakSessionUseCase | ||
import com.wire.kalium.logic.feature.debug.DebugScope | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.ViewModelComponent | ||
import dagger.hilt.android.scopes.ViewModelScoped | ||
|
||
@Module | ||
@InstallIn(ViewModelComponent::class) | ||
class DebugModule { | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun providesDebugScope( | ||
@KaliumCoreLogic coreLogic: CoreLogic, | ||
@CurrentAccount currentAccount: UserId | ||
): DebugScope = coreLogic.getSessionScope(currentAccount).debug | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun provideDisableEventProcessing(debugScope: DebugScope) = | ||
debugScope.disableEventProcessing | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun provideBreakSessionUseCase(debugScope: DebugScope): BreakSessionUseCase = | ||
debugScope.breakSession | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun provideSendFCMTokenToAPIUseCase(debugScope: DebugScope) = | ||
debugScope.sendFCMTokenToServer | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun provideChangeProfilingUseCase(debugScope: DebugScope) = | ||
debugScope.changeProfiling | ||
|
||
@ViewModelScoped | ||
@Provides | ||
fun provideObserveDatabaseLoggerState(debugScope: DebugScope) = | ||
debugScope.observeDatabaseLoggerState | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.