2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

For #14854: Added ProfilerViewModel

This commit is contained in:
Marc Leclair 2022-05-03 20:19:09 -04:00 committed by mergify[bot]
parent 83e19be385
commit 09a31e03ab

View File

@ -0,0 +1,21 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.perf
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
class ProfilerViewModel : ViewModel() {
var isProfilerActive : MutableLiveData<Boolean> = MutableLiveData()
fun getProfilerState(): LiveData<Boolean> {
return isProfilerActive
}
fun setProfilerState(isActive: Boolean){
isProfilerActive.value = isActive
}
}