Fix tests by adding AndroidManifest.xml

This commit is contained in:
Tony Torralba
2021-05-06 10:55:56 +02:00
parent a706046a19
commit 84504a88e4
2 changed files with 16 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app" android:versionCode="1" android:versionName="1.0">
<application>
<activity android:name=".UnsafeAndroidAccess">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -1,3 +1,5 @@
package app;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
@@ -29,7 +31,7 @@ public class UnsafeAndroidAccess extends Activity {
});
String thisUrl = getIntent().getExtras().getString("url");
wv.loadUrl(thisUrl); // hasUnsafeAndroidAccess
wv.loadUrl(thisUrl); // $hasUnsafeAndroidAccess
wv.loadUrl("https://www.mycorp.com/" + thisUrl); // Safe
wv.loadUrl("https://www.mycorp.com"); // Safe
}
@@ -48,8 +50,8 @@ public class UnsafeAndroidAccess extends Activity {
});
String thisUrl = getIntent().getStringExtra("url");
wv.loadUrl(thisUrl); // hasUnsafeAndroidAccess
wv.loadUrl("https://www.mycorp.com/" + thisUrl); // hasUnsafeAndroidAccess
wv.loadUrl(thisUrl); // $hasUnsafeAndroidAccess
wv.loadUrl("https://www.mycorp.com/" + thisUrl); // Safe
wv.loadUrl("https://www.mycorp.com"); // Safe
}