summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/build.gradle3
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/base/ProviderBaseTest.java21
-rw-r--r--app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java15
-rw-r--r--app/src/debug/AndroidManifest.xml17
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/LeakCanaryInstaller.java60
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/test/resources/v4/riseup.net.cert96
-rwxr-xr-xscripts/fastlane.sh15
8 files changed, 172 insertions, 58 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 5e5de9d0..6db759b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -410,6 +410,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.0'
+ androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
testImplementation 'tools.fastlane:screengrab:2.1.1'
@@ -417,7 +418,7 @@ dependencies {
testImplementation 'org.json:json:20180813'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
+ debugImplementation 'com.squareup.leakcanary:leakcanary-android-core:2.9.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2'
implementation 'com.jakewharton:butterknife:10.2.1'
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/base/ProviderBaseTest.java b/app/src/androidTest/java/se/leap/bitmaskclient/base/ProviderBaseTest.java
index bbfcdc8b..26cd8699 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/base/ProviderBaseTest.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/base/ProviderBaseTest.java
@@ -14,22 +14,25 @@ import static androidx.test.espresso.matcher.ViewMatchers.withTagValue;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anything;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.hasToString;
import static org.hamcrest.Matchers.is;
import static se.leap.bitmaskclient.base.models.Constants.SHARED_PREFERENCES;
import static utils.CustomInteractions.tryResolve;
+import android.app.Instrumentation;
import android.content.SharedPreferences;
+import android.net.VpnService;
import android.view.Gravity;
-import androidx.test.espresso.DataInteraction;
-import androidx.test.espresso.NoMatchingViewException;
import androidx.test.espresso.ViewInteraction;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.UiDevice;
+import androidx.test.uiautomator.UiObject;
+import androidx.test.uiautomator.UiObjectNotFoundException;
+import androidx.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.ClassRule;
@@ -56,15 +59,18 @@ public abstract class ProviderBaseTest {
public ActivityScenarioRule<StartActivity> mActivityScenarioRule =
new ActivityScenarioRule<>(StartActivity.class);
+ UiDevice device;
@Before
public void setup() {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
SharedPreferences preferences = getApplicationContext().getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);
preferences.edit().clear().commit();
+ Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
+ device = UiDevice.getInstance(instrumentation);
}
@Test
- public void test01_vpnStartTest() throws InterruptedException {
+ public void test01_vpnStartTest() throws InterruptedException, UiObjectNotFoundException {
boolean configurationNeeded = configureProviderIfNeeded();
ViewInteraction mainButtonStop;
@@ -87,6 +93,11 @@ public abstract class ProviderBaseTest {
20);
Screengrab.screenshot("VPN_connected");
} else {
+ // handle VPN permission dialog
+ if (VpnService.prepare(getApplicationContext()) != null) {
+ UiObject okButton = device.findObject(new UiSelector().packageName("com.android.vpndialogs").resourceId("android:id/button1"));
+ okButton.click();
+ }
// on new configurations the VPN is automatically started
Screengrab.screenshot("VPN_connecting");
mainButtonStop = tryResolve(
diff --git a/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java b/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java
index 1a0814b6..92416af4 100644
--- a/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java
+++ b/app/src/androidTestCustom/java/se/leap/bitmaskclient/base/CustomProviderTest.java
@@ -1,5 +1,6 @@
package se.leap.bitmaskclient.base;
+import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
@@ -9,7 +10,12 @@ import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static utils.CustomInteractions.tryResolve;
+import android.net.VpnService;
+
import androidx.test.espresso.ViewInteraction;
+import androidx.test.uiautomator.UiObject;
+import androidx.test.uiautomator.UiObjectNotFoundException;
+import androidx.test.uiautomator.UiSelector;
import org.junit.Test;
@@ -20,7 +26,14 @@ public class CustomProviderTest extends ProviderBaseTest {
@Test
@Override
- public void test01_vpnStartTest() throws InterruptedException {
+ public void test01_vpnStartTest() throws InterruptedException, UiObjectNotFoundException {
+ // handle VPN permission dialog
+ if (VpnService.prepare(getApplicationContext()) != null) {
+ UiObject okButton = device.findObject(new UiSelector().packageName("com.android.vpndialogs").resourceId("android:id/button1"));
+ okButton.waitForExists(30000);
+ okButton.click();
+ }
+
ViewInteraction mainButtonStop;
mainButtonStop = tryResolve(
onView(withId(R.id.main_button)),
diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml
index 51e17015..08062ff3 100644
--- a/app/src/debug/AndroidManifest.xml
+++ b/app/src/debug/AndroidManifest.xml
@@ -19,6 +19,23 @@
package="se.leap.bitmaskclient"
android:requestLegacyExternalStorage="true"
>
+
+ <application
+ android:name=".base.BitmaskApp"
+ android:allowBackup="true"
+ android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
+ android:extractNativeLibs="true"
+ android:appCategory="productivity"
+ android:logo="@mipmap/ic_launcher"
+ android:theme="@style/BitmaskTheme">
+ >
+ <provider
+ android:name=".LeakCanaryInstaller"
+ android:authorities="${applicationId}.leakcanary-installer"
+ android:exported="false" />
+ </application>
+
<!-- package is overwritten in build.gradle -->
<!-- The following permissions are required by fastlane / espresso -->
diff --git a/app/src/debug/java/se/leap/bitmaskclient/LeakCanaryInstaller.java b/app/src/debug/java/se/leap/bitmaskclient/LeakCanaryInstaller.java
new file mode 100644
index 00000000..25b94ef2
--- /dev/null
+++ b/app/src/debug/java/se/leap/bitmaskclient/LeakCanaryInstaller.java
@@ -0,0 +1,60 @@
+package se.leap.bitmaskclient;
+
+import android.app.Application;
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.net.Uri;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import leakcanary.AppWatcher;
+
+public class LeakCanaryInstaller extends ContentProvider {
+
+ @Override
+ public boolean onCreate() {
+ if (!isTest()) {
+ AppWatcher.INSTANCE.manualInstall((Application)getContext().getApplicationContext());
+ }
+ return false;
+ }
+
+ @Nullable
+ @Override
+ public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ public String getType(@NonNull Uri uri) {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
+ return null;
+ }
+
+ @Override
+ public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
+ return 0;
+ }
+
+ @Override
+ public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
+ return 0;
+ }
+
+
+ private boolean isTest() {
+ try {
+ return Class.forName("org.junit.Test") != null;
+ } catch (ClassNotFoundException e) {
+ return false;
+ }
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6a9de68d..5d221529 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -15,6 +15,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
package="se.leap.bitmaskclient">
<!-- package is overwritten in build.gradle -->
@@ -26,7 +27,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
- android:maxSdkVersion="18"/>
+ tools:ignore="ScopedStorage" />
<!-- Used to show all apps in the allowed Apps selection -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
diff --git a/app/src/test/resources/v4/riseup.net.cert b/app/src/test/resources/v4/riseup.net.cert
index 2708a8c8..e8c0d36f 100644
--- a/app/src/test/resources/v4/riseup.net.cert
+++ b/app/src/test/resources/v4/riseup.net.cert
@@ -1,54 +1,54 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEA29qrZxVQz0crl9USbBpzZCMfbDno8tZVjI/imqLgdfgmaW2D
-5YEmDMPrr3GEqVBKAYT9LHRgmTSi63PW3N8gb9CKMdoQtSL35XcLbXgtdsJEzSSy
-CbtXmB4Yrp2NhzMS9qhFAjbLjjnZkaECLmZDka5dy6j6JWjRNlpE4umqGSCzBtaA
-IXuUjMF3hyZ9kY2ojdRDSo3I/gebo2vwaUj/lwYbs1lkDf0LVCcwmpLkppxnf+Cg
-T8MA9HRvOk8TZJpShAPWWOBNWVjh79OF41MCbIAr9ynrNR8grOT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ZYBGMA0GCSqGSIb3DQEBCwUAA4ICAQBc
+Ah7+JUyBDDjHJRtRlkIW5jaBMqtIa6D6WXglfMuKaUs2dXYF2DMUFJH8GPEdvazY
+C0IXsZb60WnxSmGxJyAFEe1nWzzZ494lAxSjNmkpCBrqaMISABIvqjCViO5ozZ77
+tKcqZVSjuIQvOtjwsYcTkOn9LR+F1Jzlr8K3mtukhy1U1heYY1EZNH5DMlqDGtyI
+gJfxZiNu1en46Qfx4EenVKCe4pk3RWhXNlv/1XOyRLrz8T7L8LbcOWCkU07N9Qgj
+8SnbzRin/uUNUNjZ00sbcr2NJmmecOZXLz4td/+sGBbONhiPtkU5gbzoXsCUS9Fd
+li0lHDmj4aso934eWwS5xUi5vii2jqgr7STi99JlDR1x+wT56fbWa1EB9J7GWubh
+jMoyoAq6Fs0fl8p+vLSft4TYj/mXcvXJbIPZjqk1oTXm7wGJnh7uXA1NPRS69pUr
++Z7xEjDXN0SN81xFEBZx7CHXxOlMRa8e9Ch6EvxWfUzzT18rsNpWhYW6XikMFvuQ
+XXDg2vnqXQa5JvOZrmeQ4HqDa+7lm8jBbpPJpWasTE+ebBlHEkaxBBxYqi6/bxXJ
+xNGx9hJA8yoVwURAYkQ8zgfjjx3lEd0zzlRn0sVYWIBxamHisqNRwV1z4iFZIEdQ
+rDc9567yE4enRLKcSEv+aeW/N8pf57sWur0fjUOPbw==
+-----END CERTIFICATE-----
diff --git a/scripts/fastlane.sh b/scripts/fastlane.sh
index 1ce06ab8..42bcb0fd 100755
--- a/scripts/fastlane.sh
+++ b/scripts/fastlane.sh
@@ -4,6 +4,13 @@ GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
+function setHeadsupNotifications {
+ echo -e "${GREEN}---------------------------------------${NC}"
+ echo -e "${GREEN}-- Setting head-up notifications: $1 ---${NC}"
+ echo -e "${GREEN}---------------------------------------${NC}"
+ adb devices | grep -v -i "list" | sed 's/\t/ /' | cut -d ' ' -f 1 | xargs -I {} adb -s {} shell settings put global heads_up_notifications_enabled $1
+}
+
# init parameters
if [[ ${1} = "custom" ]]; then
BUILD_CUSTOM=true
@@ -25,9 +32,13 @@ SCRIPT_DIR=$(dirname "$0")
BASE_DIR="$SCRIPT_DIR/.."
cd $BASE_DIR
+setHeadsupNotifications 0
if [[ -z $BUILD_CUSTOM ]]; then
- fastlane --verbose android bitmask_screenshots
+ echo -e "${GREEN}-- Screenshotting Bitmask ---${NC}"
+ fastlane --verbose android bitmask_screenshots
else
- fastlane android custom_build_screenshots --env custom
+ echo -e "${GREEN}-- Screenshotting custom build ---${NC}"
+ fastlane android custom_build_screenshots --env custom
fi;
+setHeadsupNotifications 1
cd -