Small benchmark improvements (#2264)

This commit is contained in:
Hocuri 2022-04-07 21:30:01 +02:00 committed by GitHub
parent f5570baa0b
commit 724dc43970
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View file

@ -59,11 +59,13 @@ public class TestUtils {
}
@NonNull
public static ActivityScenarioRule<ConversationListActivity> getOfflineActivityRule() {
public static ActivityScenarioRule<ConversationListActivity> getOfflineActivityRule(boolean useExistingChats) {
Intent intent =
Intent.makeMainActivity(
new ComponentName(getInstrumentation().getTargetContext(), ConversationListActivity.class));
createOfflineAccount();
if (!useExistingChats) {
createOfflineAccount();
}
prepare();
return new ActivityScenarioRule<>(intent);
}