fixing import ordering and duplicated documentation
This commit is contained in:
parent
ed3b73a989
commit
045398d06f
@ -23,10 +23,10 @@ import dagger.Module
|
|||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import dagger.hilt.InstallIn
|
import dagger.hilt.InstallIn
|
||||||
import dagger.hilt.components.SingletonComponent
|
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.DebugNavigator
|
||||||
|
import im.vector.app.core.debug.DebugReceiver
|
||||||
import im.vector.app.core.debug.FlipperProxy
|
import im.vector.app.core.debug.FlipperProxy
|
||||||
|
import im.vector.app.features.debug.DebugMenuActivity
|
||||||
import im.vector.app.flipper.VectorFlipperProxy
|
import im.vector.app.flipper.VectorFlipperProxy
|
||||||
import im.vector.app.receivers.VectorDebugReceiver
|
import im.vector.app.receivers.VectorDebugReceiver
|
||||||
|
|
||||||
@ -49,5 +49,4 @@ abstract class DebugModule {
|
|||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
abstract fun bindsFlipperProxy(flipperProxy: VectorFlipperProxy): FlipperProxy
|
abstract fun bindsFlipperProxy(flipperProxy: VectorFlipperProxy): FlipperProxy
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ import android.content.Intent
|
|||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import im.vector.app.core.di.DefaultSharedPreferences
|
|
||||||
import im.vector.app.core.debug.DebugReceiver
|
import im.vector.app.core.debug.DebugReceiver
|
||||||
|
import im.vector.app.core.di.DefaultSharedPreferences
|
||||||
import im.vector.app.core.utils.lsFiles
|
import im.vector.app.core.utils.lsFiles
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -36,29 +36,14 @@ class FdroidFcmHelper @Inject constructor(
|
|||||||
|
|
||||||
override fun isFirebaseAvailable(): Boolean = false
|
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? {
|
override fun getFcmToken(): String? {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Store FCM token to the SharedPrefs
|
|
||||||
*
|
|
||||||
* @param token the token to store
|
|
||||||
*/
|
|
||||||
override fun storeFcmToken(token: String?) {
|
override fun storeFcmToken(token: String?) {
|
||||||
// No op
|
// 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) {
|
override fun ensureFcmTokenIsRetrieved(activity: Activity, pushersManager: PushersManager, registerPusher: Boolean) {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor(
|
|||||||
private val testBatteryOptimization: TestBatteryOptimization,
|
private val testBatteryOptimization: TestBatteryOptimization,
|
||||||
private val testNotification: TestNotification,
|
private val testNotification: TestNotification,
|
||||||
private val vectorFeatures: VectorFeatures,
|
private val vectorFeatures: VectorFeatures,
|
||||||
): NotificationTroubleshootTestManagerFactory {
|
) : NotificationTroubleshootTestManagerFactory {
|
||||||
|
|
||||||
override fun create(fragment: Fragment): NotificationTroubleshootTestManager {
|
override fun create(fragment: Fragment): NotificationTroubleshootTestManager {
|
||||||
val mgr = NotificationTroubleshootTestManager(fragment)
|
val mgr = NotificationTroubleshootTestManager(fragment)
|
||||||
|
@ -49,4 +49,3 @@ abstract class FlavorModule {
|
|||||||
@Binds
|
@Binds
|
||||||
abstract fun bindsFlavorLegals(legals: GoogleFlavorLegals): FlavourLegals
|
abstract fun bindsFlavorLegals(legals: GoogleFlavorLegals): FlavourLegals
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,32 +45,17 @@ class GoogleFcmHelper @Inject constructor(
|
|||||||
|
|
||||||
override fun isFirebaseAvailable(): Boolean = true
|
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? {
|
override fun getFcmToken(): String? {
|
||||||
return sharedPrefs.getString(PREFS_KEY_FCM_TOKEN, null)
|
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?) {
|
override fun storeFcmToken(token: String?) {
|
||||||
|
// TODO Store in realm
|
||||||
sharedPrefs.edit {
|
sharedPrefs.edit {
|
||||||
putString(PREFS_KEY_FCM_TOKEN, token)
|
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) {
|
override fun ensureFcmTokenIsRetrieved(activity: Activity, pushersManager: PushersManager, registerPusher: Boolean) {
|
||||||
// if (TextUtils.isEmpty(getFcmToken(activity))) {
|
// if (TextUtils.isEmpty(getFcmToken(activity))) {
|
||||||
// 'app should always check the device for a compatible Google Play services APK before accessing Google Play services features'
|
// '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
|
return resultCode == ConnectionResult.SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
|
||||||
override fun onEnterForeground(activeSessionHolder: ActiveSessionHolder) {
|
override fun onEnterForeground(activeSessionHolder: ActiveSessionHolder) {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
|
||||||
override fun onEnterBackground(activeSessionHolder: ActiveSessionHolder) {
|
override fun onEnterBackground(activeSessionHolder: ActiveSessionHolder) {
|
||||||
// No op
|
// No op
|
||||||
}
|
}
|
||||||
|
@ -25,22 +25,23 @@ interface FcmHelper {
|
|||||||
/**
|
/**
|
||||||
* Retrieves the FCM registration token.
|
* 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?
|
fun getFcmToken(): String?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store FCM token to the SharedPrefs
|
* Store FCM token to the SharedPrefs.
|
||||||
* TODO Store in realm
|
|
||||||
*
|
*
|
||||||
* @param token the token to store
|
* @param token the token to store.
|
||||||
*/
|
*/
|
||||||
fun storeFcmToken(token: String?)
|
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)
|
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.R
|
||||||
import im.vector.app.SpaceStateHandler
|
import im.vector.app.SpaceStateHandler
|
||||||
import im.vector.app.config.OnboardingVariant
|
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.di.ActiveSessionHolder
|
||||||
import im.vector.app.core.error.fatalError
|
import im.vector.app.core.error.fatalError
|
||||||
import im.vector.app.features.VectorFeatures
|
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.recover.SetupMode
|
||||||
import im.vector.app.features.crypto.verification.SupportedVerificationMethodsProvider
|
import im.vector.app.features.crypto.verification.SupportedVerificationMethodsProvider
|
||||||
import im.vector.app.features.crypto.verification.VerificationBottomSheet
|
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.devtools.RoomDevToolActivity
|
||||||
import im.vector.app.features.home.room.detail.RoomDetailActivity
|
import im.vector.app.features.home.room.detail.RoomDetailActivity
|
||||||
import im.vector.app.features.home.room.detail.arguments.TimelineArgs
|
import im.vector.app.features.home.room.detail.arguments.TimelineArgs
|
||||||
@ -616,4 +616,3 @@ class DefaultNavigator @Inject constructor(
|
|||||||
context.startActivity(this)
|
context.startActivity(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user