Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
Dominic Fischer 2019-10-12 16:04:47 +01:00
parent c57af9cf3e
commit f7f97e2098
3 changed files with 0 additions and 48 deletions

View File

@ -785,7 +785,6 @@ internal class DefaultCryptoService @Inject constructor(
*
* @param password the password
* @param anIterationCount the encryption iteration count (0 means no encryption)
* @param callback the exported keys
*/
private suspend fun exportRoomKeys(password: String, anIterationCount: Int): ByteArray {
return withContext(coroutineDispatchers.crypto) {

View File

@ -164,7 +164,6 @@ internal class MXMegolmEncryption(
*
* @param session the session info
* @param devicesByUser the devices map
* @param callback the asynchronous callback
*/
private suspend fun shareUserDevicesKey(session: MXOutboundSessionInfo,
devicesByUser: Map<String, List<MXDeviceInfo>>) {
@ -272,7 +271,6 @@ internal class MXMegolmEncryption(
* This method must be called in getDecryptingThreadHandler() thread.
*
* @param userIds the user ids whose devices must be checked.
* @param callback the asynchronous callback
*/
private suspend fun getDevicesInRoom(userIds: List<String>): MXUsersDevicesMap<MXDeviceInfo> {
// We are happy to use a cached version here: we assume that if we already

View File

@ -215,8 +215,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Clear the preferences.
*
* @param context the context
*/
fun clearPreferences() {
val keysToKeep = HashSet(mKeysToKeepAfterLogout)
@ -266,7 +264,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if we have already asked the user to disable battery optimisations on android >= M devices.
*
* @param context the context
* @return true if it was already requested
*/
fun didAskUserToIgnoreBatteryOptimizations(): Boolean {
@ -275,8 +272,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Mark as requested the question to disable battery optimisations.
*
* @param context the context
*/
fun setDidAskUserToIgnoreBatteryOptimizations() {
defaultPrefs.edit {
@ -297,7 +292,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the timestamp must be displayed in 12h format
*
* @param context the context
* @return true if the time must be displayed in 12h format
*/
fun displayTimeIn12hFormat(): Boolean {
@ -307,7 +301,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the join and leave membership events should be shown in the messages list.
*
* @param context the context
* @return true if the join and leave membership events should be shown in the messages list
*/
fun showJoinLeaveMessages(): Boolean {
@ -317,7 +310,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the avatar and display name events should be shown in the messages list.
*
* @param context the context
* @return true true if the avatar and display name events should be shown in the messages list.
*/
fun showAvatarDisplayNameChangeMessages(): Boolean {
@ -327,7 +319,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells the native camera to take a photo or record a video.
*
* @param context the context
* @return true to use the native camera app to record video or take photo.
*/
fun useNativeCamera(): Boolean {
@ -337,7 +328,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the send voice feature is enabled.
*
* @param context the context
* @return true if the send voice feature is enabled.
*/
fun isSendVoiceFeatureEnabled(): Boolean {
@ -347,7 +337,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells which compression level to use by default
*
* @param context the context
* @return the selected compression level
*/
fun getSelectedDefaultMediaCompressionLevel(): Int {
@ -357,7 +346,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells which media source to use by default
*
* @param context the context
* @return the selected media source
*/
fun getSelectedDefaultMediaSource(): Int {
@ -367,7 +355,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells whether to use shutter sound.
*
* @param context the context
* @return true if shutter sound should play
*/
fun useShutterSound(): Boolean {
@ -377,7 +364,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Update the notification ringtone
*
* @param context the context
* @param uri the new notification ringtone, or null for no RingTone
*/
fun setNotificationRingTone(uri: Uri?) {
@ -402,7 +388,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Provides the selected notification ring tone
*
* @param context the context
* @return the selected ring tone or null for no RingTone
*/
fun getNotificationRingTone(): Uri? {
@ -435,7 +420,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Provide the notification ringtone filename
*
* @param context the context
* @return the filename or null if "None" is selected
*/
fun getNotificationRingToneName(): String? {
@ -469,7 +453,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Enable or disable the lazy loading
*
* @param context the context
* @param newValue true to enable lazy loading, false to disable it
*/
fun setUseLazyLoading(newValue: Boolean) {
@ -481,7 +464,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the lazy loading is enabled
*
* @param context the context
* @return true if the lazy loading of room members is enabled
*/
fun useLazyLoading(): Boolean {
@ -491,7 +473,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* User explicitly refuses the lazy loading.
*
* @param context the context
*/
fun setUserRefuseLazyLoading() {
defaultPrefs.edit {
@ -502,7 +483,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the user has explicitly refused the lazy loading
*
* @param context the context
* @return true if the user has explicitly refuse the lazy loading of room members
*/
fun hasUserRefusedLazyLoading(): Boolean {
@ -512,7 +492,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the data save mode is enabled
*
* @param context the context
* @return true if the data save mode is enabled
*/
fun useDataSaveMode(): Boolean {
@ -522,7 +501,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the conf calls must be done with Jitsi.
*
* @param context the context
* @return true if the conference call must be done with jitsi.
*/
fun useJitsiConfCall(): Boolean {
@ -532,7 +510,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the application is started on boot
*
* @param context the context
* @return true if the application must be started on boot
*/
fun autoStartOnBoot(): Boolean {
@ -542,7 +519,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the application is started on boot
*
* @param context the context
* @param value true to start the application on boot
*/
fun setAutoStartOnBoot(value: Boolean) {
@ -554,7 +530,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Provides the selected saving period.
*
* @param context the context
* @return the selected period
*/
fun getSelectedMediasSavingPeriod(): Int {
@ -564,7 +539,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Updates the selected saving period.
*
* @param context the context
* @param index the selected period index
*/
fun setSelectedMediasSavingPeriod(index: Int) {
@ -576,7 +550,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Provides the minimum last access time to keep a media file.
*
* @param context the context
* @return the min last access time (in seconds)
*/
fun getMinMediasLastAccessTime(): Long {
@ -595,7 +568,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Provides the selected saving period.
*
* @param context the context
* @return the selected period
*/
fun getSelectedMediasSavingPeriodString(): String {
@ -620,7 +592,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the markdown is enabled
*
* @param context the context
* @return true if the markdown is enabled
*/
fun isMarkdownEnabled(): Boolean {
@ -630,7 +601,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Update the markdown enable status.
*
* @param context the context
* @param isEnabled true to enable the markdown
*/
fun setMarkdownEnabled(isEnabled: Boolean) {
@ -642,7 +612,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the read receipts should be shown
*
* @param context the context
* @return true if the read receipts should be shown
*/
fun showReadReceipts(): Boolean {
@ -652,7 +621,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the message timestamps must be always shown
*
* @param context the context
* @return true if the message timestamps must be always shown
*/
fun alwaysShowTimeStamps(): Boolean {
@ -662,7 +630,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the typing notifications should be sent
*
* @param context the context
* @return true to send the typing notifs
*/
fun sendTypingNotifs(): Boolean {
@ -672,7 +639,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells of the missing notifications rooms must be displayed at left (home screen)
*
* @param context the context
* @return true to move the missed notifications to the left side
*/
fun pinMissedNotifications(): Boolean {
@ -682,7 +648,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells of the unread rooms must be displayed at left (home screen)
*
* @param context the context
* @return true to move the unread room to the left side
*/
fun pinUnreadMessages(): Boolean {
@ -692,7 +657,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the phone must vibrate when mentioning
*
* @param context the context
* @return true
*/
fun vibrateWhenMentioning(): Boolean {
@ -702,7 +666,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if a dialog has been displayed to ask to use the analytics tracking (piwik, matomo, etc.).
*
* @param context the context
* @return true if a dialog has been displayed to ask to use the analytics tracking
*/
fun didAskToUseAnalytics(): Boolean {
@ -712,7 +675,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* To call if the user has been asked for analytics tracking.
*
* @param context the context
*/
fun setDidAskToUseAnalytics() {
defaultPrefs.edit {
@ -723,7 +685,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the analytics tracking is authorized (piwik, matomo, etc.).
*
* @param context the context
* @return true if the analytics tracking is authorized
*/
fun useAnalytics(): Boolean {
@ -733,7 +694,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Enable or disable the analytics tracking.
*
* @param context the context
* @param useAnalytics true to enable the analytics tracking
*/
fun setUseAnalytics(useAnalytics: Boolean) {
@ -745,7 +705,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if media should be previewed before sending
*
* @param context the context
* @return true to preview media
*/
fun previewMediaWhenSending(): Boolean {
@ -755,7 +714,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if message should be send by pressing enter on the soft keyboard
*
* @param context the context
* @return true to send message with enter
*/
fun sendMessageWithEnter(): Boolean {
@ -765,7 +723,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if the rage shake is used.
*
* @param context the context
* @return true if the rage shake is used
*/
fun useRageshake(): Boolean {
@ -775,7 +732,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Update the rage shake status.
*
* @param context the context
* @param isEnabled true to enable the rage shake
*/
fun setUseRageshake(isEnabled: Boolean) {
@ -787,7 +743,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
/**
* Tells if all the events must be displayed ie even the redacted events.
*
* @param context the context
* @return true to display all the events even the redacted ones.
*/
fun displayAllEvents(): Boolean {