Commit bd57be70 authored by Matthew Finkel's avatar Matthew Finkel Committed by brizental
Browse files

[android] Modify UI/UX

Bug 40015: Modify Home menu

Bug 40016: Hide unwanted Settings

Bug 40016: Modify Default toolbar menu

Bug 40016: Add Donate settings button

Bug 40016: Move Allow Screenshots under Advanced

Bug 40016: Don't install WebCompat webext

Bug 40016: Don't onboard Search Suggestions

Bug 40094: Do not use MasterPasswordTipProvider in HomeFragment

Bug 40095: Hide "Sign in to sync" in bookmarks

Bug 40031: Hide Mozilla-specific items on About page

Bug 40063: Do not sort search engines alphabetically

Bug 40141: Hide EME site permission

Bug 40166: Hide "Normal" tab (again) and Sync tab in TabTray

Bug 40167: Hide "Save to Collection" in menu

Bug 40172: Find the Quit button

Bug 40186: Hide Credit Cards in Settings

Bug 40198: Spoof English toggle now overlaps with locale list
parent 77613c1f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ class SessionAutocompleteProvider(

        val tabUrl = store.state.tabs
            .firstOrNull {
                !it.content.private && doesUrlStartsWithText(it.content.url, query)
                /* !it.content.private && */ doesUrlStartsWithText(it.content.url, query)
            }
            ?.content?.url
            ?: return null
+2 −2
Original line number Diff line number Diff line
@@ -52,12 +52,12 @@ class SessionSuggestionProvider(
        val searchWords = searchText.split(" ")

        distinctTabs.filter { item ->
            !item.content.private &&
                // tor-browser#43788: Show "Switch to tab" suggestions also on private tabs.
                searchWords.all { item.contains(it) } &&
                resultsUriFilter?.invoke(item.content.url.toUri()) != false &&
                shouldIncludeSelectedTab(state, item)
        }.forEach { item ->
            val iconRequest = icons?.loadIcon(IconRequest(url = item.content.url, waitOnNetworkLoad = false))
            val iconRequest = icons?.loadIcon(IconRequest(url = item.content.url, isPrivate = item.content.private, waitOnNetworkLoad = false))
            suggestions.add(
                AwesomeBar.Suggestion(
                    provider = this,
+10 −10
Original line number Diff line number Diff line
@@ -89,15 +89,15 @@ class SiteSecurityRobot {
    fun verifyETPSwitchVisibility(visible: Boolean) {
        waitForAppWindowToBeUpdated()
        if (visible) {
            Log.i(TAG, "verifyETPSwitchVisibility: Trying to verify ETP toggle is displayed")
            enhancedTrackingProtectionSwitch()
                .check(matches(isDisplayed()))
            Log.i(TAG, "verifyETPSwitchVisibility: Verified ETP toggle is displayed")
//            Log.i(TAG, "verifyETPSwitchVisibility: Trying to verify ETP toggle is displayed")
//            enhancedTrackingProtectionSwitch()
//                .check(matches(isDisplayed()))
//            Log.i(TAG, "verifyETPSwitchVisibility: Verified ETP toggle is displayed")
        } else {
            Log.i(TAG, "verifyETPSwitchVisibility: Trying to verify ETP toggle is not displayed")
            enhancedTrackingProtectionSwitch()
                .check(matches(not(isDisplayed())))
            Log.i(TAG, "verifyETPSwitchVisibility: Verified ETP toggle is not displayed")
//            Log.i(TAG, "verifyETPSwitchVisibility: Trying to verify ETP toggle is not displayed")
//            enhancedTrackingProtectionSwitch()
//                .check(matches(not(isDisplayed())))
//            Log.i(TAG, "verifyETPSwitchVisibility: Verified ETP toggle is not displayed")
        }
    }

@@ -243,8 +243,8 @@ private fun clearSiteDataPrompt(url: String) =
private fun cancelClearSiteDataButton() = onView(withId(android.R.id.button2)).inRoot(RootMatchers.isDialog())
private fun deleteSiteDataButton() = onView(withId(android.R.id.button1)).inRoot(RootMatchers.isDialog())

private fun enhancedTrackingProtectionSwitch() =
    onView(withId(R.id.trackingProtectionSwitch))
//private fun enhancedTrackingProtectionSwitch() =
//    onView(withId(R.id.trackingProtectionSwitch))

private fun openEnhancedTrackingProtectionDetails() =
    mDevice.findObject(UiSelector().resourceId("$packageName:id/trackingProtectionDetails"))
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler, SystemIns
            view = view,
        )

        if (settings.shouldShowOpenInAppCfr) {
        if (false) { // settings.shouldShowOpenInAppCfr
            openInAppOnboardingObserver.set(
                feature = OpenInAppOnboardingObserver(
                    context = context,
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class OpenInAppOnboardingObserver(
                        currentUrl = tab.content.url
                    } else {
                        // Loading state has changed
                        maybeShowOpenInAppBanner(tab.content.url, tab.content.loading)
//                      maybeShowOpenInAppBanner(tab.content.url, tab.content.loading)
                    }
                }
        }
Loading