Fix IllegalStateException on Toolbar while activity recreation

Signed-off-by: Unpublished <unpublished@gmx.net>
This commit is contained in:
Unpublished 2019-05-20 12:33:20 +02:00
parent 0bb4e72e95
commit c16622dd94

View file

@ -228,11 +228,12 @@ public class FileDisplayActivity extends FileActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start"); Log_OC.v(TAG, "onCreate() start");
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account is valid
// Set the default theme to replace the launch screen theme. // Set the default theme to replace the launch screen theme.
setTheme(R.style.Theme_ownCloud_Toolbar_Drawer); setTheme(R.style.Theme_ownCloud_Toolbar_Drawer);
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account is valid
/// Load of saved instance state /// Load of saved instance state
if (savedInstanceState != null) { if (savedInstanceState != null) {
mWaitingToPreview = savedInstanceState.getParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW); mWaitingToPreview = savedInstanceState.getParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW);