android-components / mozilla.components.feature.session / SettingsUseCases


class SettingsUseCases (source)

Contains use cases related to user settings.


engineSettings - the engine’s Settings.

sessionManager - the application’s SessionManager.


Name Summary
UpdateSettingUseCase abstract class UpdateSettingUseCase<T>
Use case to update a setting and then change all active browsing sessions to use the new setting.
UpdateTrackingProtectionUseCase class UpdateTrackingProtectionUseCase : UpdateSettingUseCase<TrackingProtectionPolicy>
Updates the tracking protection policy to the given policy value when invoked. All active sessions are automatically updated with the new policy.


Name Summary
<init> SettingsUseCases(engineSettings: Settings, sessionManager: SessionManager)
Contains use cases related to user settings.


Name Summary
updateTrackingProtection val updateTrackingProtection: UpdateTrackingProtectionUseCase

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.