1
0
Fork 0

Add documentation

master
Sawyer Blatz 2020-07-27 14:36:48 -07:00 committed by Emily Kager
parent 8bfc493568
commit bb03049fb5
3 changed files with 16 additions and 4 deletions

View File

@ -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()
}

View File

@ -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(

View File

@ -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