[Catalyst] Update DataChangeReason usages to PreferenceChangeReason

Bug: 388677104
Test: atest and manual
Flag: EXEMPT refactor
NO_IFTTT=refactor
Change-Id: I3c1aae3dc10a1c78e1b2b0ead8ffc83da933e174
This commit is contained in:
Fan Wu
2025-01-09 16:16:25 +08:00
parent f48f0573e1
commit 4ca85b1e5c
10 changed files with 33 additions and 25 deletions

View File

@@ -21,9 +21,9 @@ import android.content.Context
import com.android.settings.R
import com.android.settings.widget.MainSwitchBarMetadata
import com.android.settingslib.datastore.AbstractKeyedDataObservable
import com.android.settingslib.datastore.DataChangeReason
import com.android.settingslib.datastore.KeyValueStore
import com.android.settingslib.datastore.Permissions
import com.android.settingslib.metadata.PreferenceChangeReason
import com.android.settingslib.metadata.PreferenceLifecycleProvider
import com.android.settingslib.metadata.ReadWritePermit
import com.android.settingslib.metadata.SensitivityLevel
@@ -75,7 +75,7 @@ class DataSaverMainSwitchPreference : MainSwitchBarMetadata, PreferenceLifecycle
override fun onLastObserverRemoved() = dataSaverBackend.remListener(this)
override fun onDataSaverChanged(isDataSaving: Boolean) =
notifyChange(KEY, DataChangeReason.UPDATE)
notifyChange(KEY, PreferenceChangeReason.VALUE)
}
companion object {