trigger save state info processing in test

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2020-10-07 10:34:38 +02:00
parent 4aac2d48d3
commit 29ba8c948f
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,23 @@
/*
* Nextcloud Android client application
*
* @author Andy Scherzinger
* Copyright (C) 2020 Andy Scherzinger
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.activity;
import android.content.Intent;
@ -35,10 +55,10 @@ public class UserInfoActivityIT extends AbstractIT {
null
);
intent.putExtra(UserInfoActivity.KEY_USER_DATA, Parcels.wrap(userInfo));
UserInfoActivity sut = activityRule.launchActivity(intent);
longSleep();
shortSleep();
shortSleep();
screenshot(sut);
}

View file

@ -135,6 +135,8 @@ public class UserInfoActivity extends DrawerActivity implements Injectable {
if (savedInstanceState != null && savedInstanceState.containsKey(KEY_USER_DATA)) {
userInfo = Parcels.unwrap(savedInstanceState.getParcelable(KEY_USER_DATA));
} else if (bundle.containsKey(KEY_ACCOUNT)) {
userInfo = Parcels.unwrap(bundle.getParcelable(KEY_USER_DATA));
}
mCurrentAccountAvatarRadiusDimension = getResources().getDimension(R.dimen.nav_drawer_header_avatar_radius);