Update VectorPreferences.kt

This commit is contained in:
Neil Alexander 2021-02-19 14:23:38 +00:00 committed by GitHub
parent e53801957c
commit adc461d2f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@
package im.vector.app.features.settings package im.vector.app.features.settings
import android.content.Context import android.content.Context
import android.content.SharedPreferences
import android.media.RingtoneManager import android.media.RingtoneManager
import android.net.Uri import android.net.Uri
import android.provider.MediaStore import android.provider.MediaStore
@ -246,11 +247,11 @@ class VectorPreferences @Inject constructor(private val context: Context) {
* in a background service, e.g. for the P2P demos. * in a background service, e.g. for the P2P demos.
*/ */
public fun subscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) { fun subscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) {
defaultPrefs.registerOnSharedPreferenceChangeListener(listener) defaultPrefs.registerOnSharedPreferenceChangeListener(listener)
} }
public fun unsubscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) { fun unsubscribeToChanges(listener: SharedPreferences.OnSharedPreferenceChangeListener) {
defaultPrefs.unregisterOnSharedPreferenceChangeListener(listener) defaultPrefs.unregisterOnSharedPreferenceChangeListener(listener)
} }