Unverified Commit 6484a481 authored by Sawyer Blatz's avatar Sawyer Blatz Committed by GitHub
Browse files

For #5787: Fixes shortcuts asking to launch private alias (#5825)

parent 18a130b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <category android:name="mozilla.components.pwa.category.SHORTCUT" />
                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>
+2 −2
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ open class HomeActivity : AppCompatActivity() {
    override fun onResume() {
        super.onResume()

        unsetOpenLinksInAPrivateTab()
        unsetOpenLinksInAPrivateTabIfNecessary()

        lifecycleScope.launch {
            with(components.backgroundServices) {
@@ -125,7 +125,7 @@ open class HomeActivity : AppCompatActivity() {
        }
    }

    private fun unsetOpenLinksInAPrivateTab() {
    private fun unsetOpenLinksInAPrivateTabIfNecessary() {
        // Toggle off the open_link_in_private_tab pref if we are no longer set as the default browser
        // We do this on a separate thread to alleviate performance issues
        val weakReferenceContext = WeakReference(this)