preserving browser task
This commit is contained in:
@@ -108,15 +108,6 @@
|
||||
<action android:name="es.antonborri.home_widget.action.LAUNCH" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:mimeType="text/*" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@@ -129,8 +120,8 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Intent router: receives all VIEW intents and routes Custom Tab / PWA to
|
||||
ExternalAppBrowserActivity, regular VIEW intents to MainActivity -->
|
||||
<!-- Intent router: receives external VIEW/SEND intents and routes
|
||||
Custom Tab / PWA to ExternalAppBrowserActivity, regular intents to MainActivity -->
|
||||
<activity
|
||||
android:name="eu.weblibre.flutter_mozilla_components.activities.IntentReceiverActivity"
|
||||
android:theme="@style/Theme.AppCompat.Translucent"
|
||||
@@ -173,6 +164,12 @@
|
||||
<data android:mimeType="application/pdf" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/*" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- PWA launch from home screen shortcut -->
|
||||
<intent-filter>
|
||||
<action android:name="mozilla.components.feature.pwa.VIEW_PWA" />
|
||||
|
||||
+1
@@ -60,6 +60,7 @@ class IntentReceiverActivity : Activity() {
|
||||
// Strip flags that could interfere with task management
|
||||
intent.flags = intent.flags and Intent.FLAG_ACTIVITY_NEW_TASK.inv()
|
||||
intent.flags = intent.flags and Intent.FLAG_ACTIVITY_CLEAR_TASK.inv()
|
||||
intent.flags = intent.flags and Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.inv()
|
||||
|
||||
if (shouldBlockIntent(intent)) {
|
||||
finish()
|
||||
|
||||
Reference in New Issue
Block a user