mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Turn splash screen duration into a resource variable
so screenshot tests can define a different duration
This commit is contained in:
@@ -61,6 +61,8 @@ public class SplashScreenActivity extends BaseActivity {
|
|||||||
startNextActivity(ENTRY_ACTIVITY);
|
startNextActivity(ENTRY_ACTIVITY);
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
|
int duration =
|
||||||
|
getResources().getInteger(R.integer.splashScreenDuration);
|
||||||
new Handler().postDelayed(() -> {
|
new Handler().postDelayed(() -> {
|
||||||
if (currentTimeMillis() >= EXPIRY_DATE) {
|
if (currentTimeMillis() >= EXPIRY_DATE) {
|
||||||
LOG.info("Expired");
|
LOG.info("Expired");
|
||||||
@@ -69,7 +71,7 @@ public class SplashScreenActivity extends BaseActivity {
|
|||||||
startNextActivity(ENTRY_ACTIVITY);
|
startNextActivity(ENTRY_ACTIVITY);
|
||||||
}
|
}
|
||||||
supportFinishAfterTransition();
|
supportFinishAfterTransition();
|
||||||
}, 500);
|
}, duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
<integer name="animationSpeed">@android:integer/config_mediumAnimTime</integer>
|
<integer name="animationSpeed">@android:integer/config_mediumAnimTime</integer>
|
||||||
|
|
||||||
|
<integer name="splashScreenDuration">500</integer>
|
||||||
|
|
||||||
<declare-styleable name="BriarRecyclerView">
|
<declare-styleable name="BriarRecyclerView">
|
||||||
<attr name="scrollToEnd" format="boolean" />
|
<attr name="scrollToEnd" format="boolean" />
|
||||||
<attr name="emptyImage" format="integer" />
|
<attr name="emptyImage" format="integer" />
|
||||||
|
|||||||
6
briar-android/src/screenshotDebug/res/values/attrs.xml
Normal file
6
briar-android/src/screenshotDebug/res/values/attrs.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<integer name="splashScreenDuration">7500</integer>
|
||||||
|
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user