diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index c5b4ea61c..04471cd6d 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -37,17 +37,17 @@ platform :android do
lane :screenshots do
json_key = "./key.json"
- gradle(task: "clean")
- build_android_app(
- task: 'assemble',
- build_type: 'Mockdata'
- )
- build_android_app(
- task: 'assemble',
- build_type: 'AndroidTest'
- )
+# gradle(task: "clean")
+# build_android_app(
+# task: 'assemble',
+# build_type: 'Mockdata'
+# )
+# build_android_app(
+# task: 'assemble',
+# build_type: 'AndroidTest'
+# )
- sh("../start-emulators.sh")
+ sh("../start-emulator.sh Nexus_S_API_O")
capture_android_screenshots(
clear_previous_screenshots: true,
@@ -86,7 +86,11 @@ platform :android do
device_type: "phone",
specific_device: "emulator-5580"
)
+
+ sh("../start-emulator.sh Nexus_7_API_O")
+
capture_android_screenshots(
+ clear_previous_screenshots: true,
skip_open_summary: true,
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
tests_apk_path: "build/outputs/apk/androidTest/mockdata/irccloud-android-mockdata-androidTest.apk",
@@ -96,7 +100,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dawn"],
device_type: "sevenInch",
- specific_device: "emulator-5582"
+ specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
@@ -108,7 +112,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dusk"],
device_type: "sevenInch",
- specific_device: "emulator-5582"
+ specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
@@ -120,9 +124,13 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme midnight"],
device_type: "sevenInch",
- specific_device: "emulator-5582"
+ specific_device: "emulator-5580"
)
+
+ sh("../start-emulator.sh Nexus_10_API_O")
+
capture_android_screenshots(
+ clear_previous_screenshots: true,
skip_open_summary: true,
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
tests_apk_path: "build/outputs/apk/androidTest/mockdata/irccloud-android-mockdata-androidTest.apk",
@@ -132,7 +140,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dawn"],
device_type: "tenInch",
- specific_device: "emulator-5584"
+ specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
@@ -144,7 +152,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dusk"],
device_type: "tenInch",
- specific_device: "emulator-5584"
+ specific_device: "emulator-5580"
)
capture_android_screenshots(
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
@@ -155,10 +163,9 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme midnight"],
device_type: "tenInch",
- specific_device: "emulator-5584"
+ specific_device: "emulator-5580"
)
+
sh("adb -s emulator-5580 emu kill")
- sh("adb -s emulator-5582 emu kill")
- sh("adb -s emulator-5584 emu kill")
end
end
diff --git a/fastlane/metadata/android/screenshots.html b/fastlane/metadata/android/screenshots.html
index 98d75f4c3..1dfc2610d 100644
--- a/fastlane/metadata/android/screenshots.html
+++ b/fastlane/metadata/android/screenshots.html
@@ -75,68 +75,68 @@
en-US
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
-
+
+
|
-
+ |
sevenInchScreenshots
|
@@ -146,59 +146,306 @@ en-US
+
+
+
+
+ |
+
+
+
+
+ |
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
|
-
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ tenInchScreenshots
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
|
diff --git a/irccloud-android.iml b/irccloud-android.iml
index 755ee2aa2..cebeebfd9 100644
--- a/irccloud-android.iml
+++ b/irccloud-android.iml
@@ -8,52 +8,58 @@
-
-
-
+
+
+
- generateDebugSources
+ generateMockdataSources
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -119,113 +125,113 @@
+
+
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+
+
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/com/irccloud/android/NetworkConnection.java b/src/com/irccloud/android/NetworkConnection.java
index 15d8911c6..47925e544 100644
--- a/src/com/irccloud/android/NetworkConnection.java
+++ b/src/com/irccloud/android/NetworkConnection.java
@@ -2051,7 +2051,7 @@ public void parse(IRCCloudJSONObject object) throws JSONException {
editor.putString("email", userInfo.email);
editor.putString("highlights", userInfo.highlights);
editor.putBoolean("autoaway", userInfo.auto_away);
- if (userInfo.prefs != null) {
+ if (userInfo.prefs != null && !BuildConfig.MOCK_DATA) {
editor.putBoolean("time-24hr", userInfo.prefs.has("time-24hr") && userInfo.prefs.get("time-24hr") instanceof Boolean && userInfo.prefs.getBoolean("time-24hr"));
editor.putBoolean("time-seconds", userInfo.prefs.has("time-seconds") && userInfo.prefs.get("time-seconds") instanceof Boolean && userInfo.prefs.getBoolean("time-seconds"));
editor.putBoolean("mode-showsymbol", userInfo.prefs.has("mode-showsymbol") && userInfo.prefs.get("mode-showsymbol") instanceof Boolean && userInfo.prefs.getBoolean("mode-showsymbol"));
diff --git a/start-emulator.sh b/start-emulator.sh
new file mode 100755
index 000000000..dc953c57e
--- /dev/null
+++ b/start-emulator.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+$(which adb) -s emulator-5580 emu kill
+sleep 5
+$(which emulator) -avd $1 -ports 5580,5581 -no-snapshot -no-boot-anim > /dev/null 2>&1 &
+sleep 20
+$(which adb) shell settings put global sysui_demo_allowed 1
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command enter
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 0900
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command network -e nosim hide
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e datatype 4g -e level 4 -e fully true
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4
+$(which adb) shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false
+$(which adb) shell pm clear com.irccloud.android.mockdata
diff --git a/start-emulators.sh b/start-emulators.sh
deleted file mode 100755
index c6b33156b..000000000
--- a/start-emulators.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-$(which emulator) -avd Nexus_S_API_O -port 5580 > /dev/null 2>&1 &
-$(which emulator) -avd Nexus_7_API_O -port 5582 > /dev/null 2>&1 &
-$(which emulator) -avd Nexus_10_API_O -port 5584 > /dev/null 2>&1 &
-sleep 30