Loading packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/HandlerExecutor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.concurrent.Executor * Adapter of [Handler] and [Executor], where the task is executed on handler with given looper. * * When current looper is same with the given looper, task passed to [Executor.execute] will be * executed immediately to improve better performance. * executed immediately to achieve better performance. * * @param looper Looper of the handler. */ Loading packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/KeyedObserver.kt +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,10 @@ interface KeyedObservable<K> { fun notifyChange(key: K, reason: Int) } /** Delegation of [KeyedObservable]. */ open class KeyedObservableDelegate<K>(delegate: KeyedObservable<K>) : KeyedObservable<K> by delegate /** A thread safe implementation of [KeyedObservable]. */ open class KeyedDataObservable<K> : KeyedObservable<K> { // Instead of @GuardedBy("this"), guarded by itself because KeyedDataObservable object could be Loading packages/SettingsLib/Preference/src/com/android/settingslib/preference/PreferenceScreenBindingHelper.kt +2 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,8 @@ class PreferenceScreenBindingHelper( } else { preferences[preference.key]?.let { preferenceBindingFactory.bind(preference, it) (it as? PersistentPreference<*>)?.storage(context)?.let { storage -> val metadata = it.metadata (metadata as? PersistentPreference<*>)?.storage(context)?.let { storage -> preference.preferenceDataStore = storages.getOrPut(storage) { PreferenceDataStoreAdapter(storage) } } Loading Loading
packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/HandlerExecutor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.concurrent.Executor * Adapter of [Handler] and [Executor], where the task is executed on handler with given looper. * * When current looper is same with the given looper, task passed to [Executor.execute] will be * executed immediately to improve better performance. * executed immediately to achieve better performance. * * @param looper Looper of the handler. */ Loading
packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/KeyedObserver.kt +4 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,10 @@ interface KeyedObservable<K> { fun notifyChange(key: K, reason: Int) } /** Delegation of [KeyedObservable]. */ open class KeyedObservableDelegate<K>(delegate: KeyedObservable<K>) : KeyedObservable<K> by delegate /** A thread safe implementation of [KeyedObservable]. */ open class KeyedDataObservable<K> : KeyedObservable<K> { // Instead of @GuardedBy("this"), guarded by itself because KeyedDataObservable object could be Loading
packages/SettingsLib/Preference/src/com/android/settingslib/preference/PreferenceScreenBindingHelper.kt +2 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,8 @@ class PreferenceScreenBindingHelper( } else { preferences[preference.key]?.let { preferenceBindingFactory.bind(preference, it) (it as? PersistentPreference<*>)?.storage(context)?.let { storage -> val metadata = it.metadata (metadata as? PersistentPreference<*>)?.storage(context)?.let { storage -> preference.preferenceDataStore = storages.getOrPut(storage) { PreferenceDataStoreAdapter(storage) } } Loading