Name Description Size
FirefoxViewModelProviders.kt Returns an instance of the view model for the given application building block (fragment, activity) for the given lifecycle. This is a wrapper around the framework's [ViewModelProvider] using the application's [ViewModelFactory] to reduce code duplication. 1200
KillswitchLayout.kt Can be used to wrap some other [View] in order to prevent it from ever being shown if certain locale and experiment requirements are not met. This is done to prevent bugs similar to #2133. In that bug, a view was set to visibility GONE when disabled, however its animation toggled that visibility back to VISIBLE. [KillswitchLayout] allows us to be sure that something will not be displayed if requirements are not set by intercepting [setVisibility] calls. 4037
ViewModelFactory.kt Used by [ViewModelProviders] to instantiate [ViewModel]s with constructor arguments. This should be used through [FirefoxViewModelProviders.of]. Example usage: ```kotlin val myViewModel = FirefoxViewModelProviders.of(this).get(ExampleViewModel::class.java) ``` 4165