diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 42c68accc..564e7d965 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -136,7 +136,7 @@ open class FenixApplication : Application() { * private mode was in use during the previous session. */ fun maybeClearPrivateMode(settings: Settings = settings()) { - if (!settings.alwaysOpenInPrivateMode) settings.usePrivateMode = false + if (!settings.openLinksInAPrivateTab) settings.usePrivateMode = false } private fun registerRxExceptionHandling() { diff --git a/app/src/main/java/org/mozilla/fenix/IntentReceiverActivity.kt b/app/src/main/java/org/mozilla/fenix/IntentReceiverActivity.kt index 776c27bf8..89a348382 100644 --- a/app/src/main/java/org/mozilla/fenix/IntentReceiverActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/IntentReceiverActivity.kt @@ -50,7 +50,7 @@ class IntentReceiverActivity : Activity() { if (didLaunchPrivateLink && Browsers.all(this).isDefaultBrowser) { this.settings().openLinksInAPrivateTab = true } else if (!Browsers.all(this).isDefaultBrowser) { - /* If the user has unset us as the default browser, unset alwaysOpenInPrivateMode */ + /* If the user has unset us as the default browser, unset openLinksInAPrivateTab */ this.settings().openLinksInAPrivateTab = false } diff --git a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt index a9eb5f686..9f1a966f1 100644 --- a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt +++ b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt @@ -30,8 +30,8 @@ class FenixApplicationTest { } @Test - fun `GIVEN alwaysOpenInPrivateMode is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() { - every { settings.alwaysOpenInPrivateMode } returns true + fun `GIVEN openLinksInAPrivateTab is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() { + every { settings.openLinksInAPrivateTab } returns true application.maybeClearPrivateMode(settings) @@ -39,8 +39,8 @@ class FenixApplicationTest { } @Test - fun `GIVEN alwaysOpenInPrivateMode is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() { - every { settings.alwaysOpenInPrivateMode } returns false + fun `GIVEN openLinksInAPrivateTab is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() { + every { settings.openLinksInAPrivateTab } returns false application.maybeClearPrivateMode(settings) diff --git a/docs/metrics.md b/docs/metrics.md index 4b1e7b239..91c9ae914 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -77,7 +77,7 @@ The following metrics are added to the ping: | events.browser_menu_action |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A browser menu item was tapped |[1](https://github.com/mozilla-mobile/fenix/pull/1214#issue-264756708), [2](https://github.com/mozilla-mobile/fenix/pull/5098#issuecomment-529658996)||2020-03-01 | | events.entered_url |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user entered a url |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673)||2020-03-01 | | events.performed_search |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user performed a search |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [2](https://github.com/mozilla-mobile/fenix/pull/1677)||2020-03-01 | -| events.preference_toggled |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user toggled a preference switch in settings |[1](https://github.com/mozilla-mobile/fenix/pull/1896), [2](https://github.com/mozilla-mobile/fenix/pull/TODO)||2020-03-01 | +| events.preference_toggled |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user toggled a preference switch in settings |[1](https://github.com/mozilla-mobile/fenix/pull/1896), [2](https://github.com/mozilla-mobile/fenix/pull/5704)||2020-03-01 | | events.search_bar_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped the search bar |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673)||2020-03-01 | | events.whats_new_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the "what's new" page button |[1](https://github.com/mozilla-mobile/fenix/pull/5090)||2020-03-01 | | find_in_page.closed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user closed the find in page UI |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 | @@ -120,8 +120,6 @@ The following metrics are added to the ping: | reader_mode.available |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Reader mode is available for the current page |[1](https://github.com/mozilla-mobile/fenix/pull/3941)||2020-03-01 | | reader_mode.closed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user closed reader mode |[1](https://github.com/mozilla-mobile/fenix/pull/4328)||2020-03-01 | | reader_mode.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened reader mode |[1](https://github.com/mozilla-mobile/fenix/pull/3941)||2020-03-01 | -| search_shortcuts.closed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user closed the search shortcut menu in the search view by pressing the shortcuts button |[1](https://github.com/mozilla-mobile/fenix/pull/1202#issuecomment-476870449)||2020-03-01 | -| search_shortcuts.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the search shortcut menu in the search view by pressing the shortcuts button |[1](https://github.com/mozilla-mobile/fenix/pull/1202#issuecomment-476870449)||2020-03-01 | | search_shortcuts.selected |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user selected a search shortcut engine to use |[1](https://github.com/mozilla-mobile/fenix/pull/1202#issuecomment-476870449)||2020-03-01 | | search_widget.new_tab_button |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed anywhere from the Firefox logo until the start of the microphone icon, opening a new tab search screen. |[1](https://github.com/mozilla-mobile/fenix/pull/4714)||2020-03-01 | | search_widget.voice_button |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the microphone icon, opening a new voice search screen. |[1](https://github.com/mozilla-mobile/fenix/pull/4714)||2020-03-01 |