Allow Internet permission

This commit is contained in:
Thomas 2020-02-18 08:09:33 +01:00
parent b7c2c6d777
commit 1a37d8a9f5
2 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="app.fedilab.nitterizeme">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
@ -12,6 +12,7 @@
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
@ -21,11 +22,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TransformActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:noHistory="true">
<!-- The app should handle these domains, more can be added here -->
<!-- SHORTENED URLs -->
<!-- t.co -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -43,6 +47,7 @@
</intent-filter>
<!-- TWITTER URLs -->
<!-- mobile.twitter.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -58,7 +63,6 @@
<data android:mimeType="text/plain"
android:host="mobile.twitter.com" />
</intent-filter>
<!-- www.twitter.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -74,7 +78,6 @@
<data android:mimeType="text/plain"
android:host="www.twitter.com" />
</intent-filter>
<!-- twitter.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -92,6 +95,7 @@
android:host="twitter.com" />
</intent-filter>
<!-- YOUTUBE URLs -->
<!-- www.youtube.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -106,7 +110,6 @@
<data android:mimeType="text/plain"
android:host="www.youtube.com" />
</intent-filter>
<!-- m.youtube.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -121,7 +124,6 @@
<data android:mimeType="text/plain"
android:host="m.youtube.com" />
</intent-filter>
<!-- youtube.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -136,7 +138,6 @@
<data android:mimeType="text/plain"
android:host="youtube.com" />
</intent-filter>
<!-- youtu.be -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -151,7 +152,6 @@
<data android:mimeType="text/plain"
android:host="youtu.be" />
</intent-filter>
<!-- youtube-nocookie.com -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -167,6 +167,7 @@
android:host="youtube-nocookie.com" />
</intent-filter>
<!-- MAPS URLs -->
<!-- /maps/ -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -183,8 +184,6 @@
android:pathPattern="/maps/place/.*"
android:host="*" />
</intent-filter>
</activity>
<activity

View File

@ -162,6 +162,8 @@ public class TransformActivity extends Activity {
Intent targetIntent = new Intent(action);
targetIntent.setDataAndType(intent.getData(), intent.getType());
targetIntent.setPackage(intent.getPackage());
targetIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
targetIntent.setComponent(new ComponentName(packageName, currentInfo.activityInfo.name));
targetIntents.add(targetIntent);
}