mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
fixing import ordering and duplicated documentation
This commit is contained in:
parent
ed3b73a989
commit
045398d06f
8 changed files with 13 additions and 47 deletions
|
@ -23,10 +23,10 @@ import dagger.Module
|
|||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import im.vector.app.core.debug.DebugReceiver
|
||||
import im.vector.app.features.debug.DebugMenuActivity
|
||||
import im.vector.app.core.debug.DebugNavigator
|
||||
import im.vector.app.core.debug.DebugReceiver
|
||||
import im.vector.app.core.debug.FlipperProxy
|
||||
import im.vector.app.features.debug.DebugMenuActivity
|
||||
import im.vector.app.flipper.VectorFlipperProxy
|
||||
import im.vector.app.receivers.VectorDebugReceiver
|
||||
|
||||
|
@ -49,5 +49,4 @@ abstract class DebugModule {
|
|||
|
||||
@Binds
|
||||
abstract fun bindsFlipperProxy(flipperProxy: VectorFlipperProxy): FlipperProxy
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ import android.content.Intent
|
|||
import android.content.IntentFilter
|
||||
import android.content.SharedPreferences
|
||||
import androidx.core.content.edit
|
||||
import im.vector.app.core.di.DefaultSharedPreferences
|
||||
import im.vector.app.core.debug.DebugReceiver
|
||||
import im.vector.app.core.di.DefaultSharedPreferences
|
||||
import im.vector.app.core.utils.lsFiles
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -36,29 +36,14 @@ class FdroidFcmHelper @Inject constructor(
|
|||
|
||||
override fun isFirebaseAvailable(): Boolean = false
|
||||
|
||||
/**
|
||||
* Retrieves the FCM registration token.
|
||||
*
|
||||
* @return the FCM token or null if not received from FCM
|
||||
*/
|
||||
override fun getFcmToken(): String? {
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Store FCM token to the SharedPrefs
|
||||
*
|
||||
* @param token the token to store
|
||||
*/
|
||||
override fun storeFcmToken(token: String?) {
|
||||
// No op
|
||||
}
|
||||
|
||||
/**
|
||||
* onNewToken may not be called on application upgrade, so ensure my shared pref is set
|
||||
*
|
||||
* @param activity the first launch Activity
|
||||
*/
|
||||
override fun ensureFcmTokenIsRetrieved(activity: Activity, pushersManager: PushersManager, registerPusher: Boolean) {
|
||||
// No op
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor(
|
|||
private val testBatteryOptimization: TestBatteryOptimization,
|
||||
private val testNotification: TestNotification,
|
||||
private val vectorFeatures: VectorFeatures,
|
||||
): NotificationTroubleshootTestManagerFactory {
|
||||
) : NotificationTroubleshootTestManagerFactory {
|
||||
|
||||
override fun create(fragment: Fragment): NotificationTroubleshootTestManager {
|
||||
val mgr = NotificationTroubleshootTestManager(fragment)
|
||||
|
|
|
@ -49,4 +49,3 @@ abstract class FlavorModule {
|
|||
@Binds
|
||||
abstract fun bindsFlavorLegals(legals: GoogleFlavorLegals): FlavourLegals
|
||||
}
|
||||
|
||||
|
|
|
@ -45,32 +45,17 @@ class GoogleFcmHelper @Inject constructor(
|
|||
|
||||
override fun isFirebaseAvailable(): Boolean = true
|
||||
|
||||
/**
|
||||
* Retrieves the FCM registration token.
|
||||
*
|
||||
* @return the FCM token or null if not received from FCM
|
||||
*/
|
||||
override fun getFcmToken(): String? {
|
||||
return sharedPrefs.getString(PREFS_KEY_FCM_TOKEN, null)
|
||||
}
|
||||
|
||||
/**
|
||||
* Store FCM token to the SharedPrefs
|
||||
* TODO Store in realm
|
||||
*
|
||||
* @param token the token to store
|
||||
*/
|
||||
override fun storeFcmToken(token: String?) {
|
||||
// TODO Store in realm
|
||||
sharedPrefs.edit {
|
||||
putString(PREFS_KEY_FCM_TOKEN, token)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* onNewToken may not be called on application upgrade, so ensure my shared pref is set
|
||||
*
|
||||
* @param activity the first launch Activity
|
||||
*/
|
||||
override fun ensureFcmTokenIsRetrieved(activity: Activity, pushersManager: PushersManager, registerPusher: Boolean) {
|
||||
// if (TextUtils.isEmpty(getFcmToken(activity))) {
|
||||
// 'app should always check the device for a compatible Google Play services APK before accessing Google Play services features'
|
||||
|
@ -106,12 +91,10 @@ class GoogleFcmHelper @Inject constructor(
|
|||
return resultCode == ConnectionResult.SUCCESS
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
override fun onEnterForeground(activeSessionHolder: ActiveSessionHolder) {
|
||||
// No op
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
override fun onEnterBackground(activeSessionHolder: ActiveSessionHolder) {
|
||||
// No op
|
||||
}
|
||||
|
|
|
@ -25,22 +25,23 @@ interface FcmHelper {
|
|||
/**
|
||||
* Retrieves the FCM registration token.
|
||||
*
|
||||
* @return the FCM token or null if not received from FCM
|
||||
* @return the FCM token or null if not received from FCM.
|
||||
*/
|
||||
fun getFcmToken(): String?
|
||||
|
||||
/**
|
||||
* Store FCM token to the SharedPrefs
|
||||
* TODO Store in realm
|
||||
* Store FCM token to the SharedPrefs.
|
||||
*
|
||||
* @param token the token to store
|
||||
* @param token the token to store.
|
||||
*/
|
||||
fun storeFcmToken(token: String?)
|
||||
|
||||
/**
|
||||
* onNewToken may not be called on application upgrade, so ensure my shared pref is set
|
||||
* onNewToken may not be called on application upgrade, so ensure my shared pref is set.
|
||||
*
|
||||
* @param activity the first launch Activity
|
||||
* @param activity the first launch Activity.
|
||||
* @param pushersManager the instance to register the pusher on.
|
||||
* @param registerPusher whether the pusher should be registered.
|
||||
*/
|
||||
fun ensureFcmTokenIsRetrieved(activity: Activity, pushersManager: PushersManager, registerPusher: Boolean)
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import im.vector.app.R
|
||||
import im.vector.app.SpaceStateHandler
|
||||
import im.vector.app.config.OnboardingVariant
|
||||
import im.vector.app.core.debug.DebugNavigator
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.error.fatalError
|
||||
import im.vector.app.features.VectorFeatures
|
||||
|
@ -51,7 +52,6 @@ import im.vector.app.features.crypto.recover.BootstrapBottomSheet
|
|||
import im.vector.app.features.crypto.recover.SetupMode
|
||||
import im.vector.app.features.crypto.verification.SupportedVerificationMethodsProvider
|
||||
import im.vector.app.features.crypto.verification.VerificationBottomSheet
|
||||
import im.vector.app.core.debug.DebugNavigator
|
||||
import im.vector.app.features.devtools.RoomDevToolActivity
|
||||
import im.vector.app.features.home.room.detail.RoomDetailActivity
|
||||
import im.vector.app.features.home.room.detail.arguments.TimelineArgs
|
||||
|
@ -616,4 +616,3 @@ class DefaultNavigator @Inject constructor(
|
|||
context.startActivity(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue