Commit bb03049f authored by Sawyer Blatz's avatar Sawyer Blatz Committed by Emily Kager
Browse files

Add documentation

parent 8bfc4935
......@@ -248,7 +248,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
// Launch this on a background thread so as not to affect startup performance
lifecycleScope.launch(IO) {
if (settings().wasDefaultBrowserOnLastPause != settings().isDefaultBrowser()) {
if (
settings().isDefaultBrowser() &&
settings().wasDefaultBrowserOnLastPause != settings().isDefaultBrowser()
) {
metrics.track(Event.ChangedToDefaultBrowser)
}
}
......@@ -259,7 +262,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
}
if (settings().wasDefaultBrowserOnLastPause != settings().isDefaultBrowser()) {
if (settings().wasDefaultBrowserOnLastPause != settings().isDefaultBrowser()
) {
settings().wasDefaultBrowserOnLastPause = settings().isDefaultBrowser()
}
......
......@@ -10,8 +10,6 @@ import android.widget.Switch
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.utils.BrowsersCache
class DefaultBrowserPreference @JvmOverloads constructor(
......
......@@ -246,6 +246,16 @@ Here is the list of current Events sent, which can be found here in the code bas
<td>The user has installed an addon from the addon management page.</td>
<td><a href="https://github.com/mozilla-mobile/fenix/pull/12136#issuecomment-651922547">#12136</a></td>
</tr>
<tr>
<td>`E_Search_Widget_Added`</td>
<td>The user has installed the search widget to their homescreen.</td>
<td><a href="https://github.com/mozilla-mobile/fenix/pull/13003">#13003</a></td>
</tr>
<tr>
<td>`E_Changed_Default_To_Fenix`</td>
<td>The user has changed their default browser to Fenix while Fenix was in the background and then resumed the app</td>
<td><a href="https://github.com/mozilla-mobile/fenix/pull/13003">#13003</a></td>
</tr>
</table>
Deep links
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment