Move stuff

This commit is contained in:
Mario Danic 2017-02-19 15:35:42 +01:00 committed by AndyScherzinger
parent 767560a2e0
commit ef4ac587ce
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -159,21 +159,7 @@ public class FileDisplayActivity extends HookActivity
Intent initObserversIntent = FileObserverService.makeInitIntent(this);
startService(initObserversIntent);
}
/// Load of saved instance state
if (savedInstanceState != null) {
mWaitingToPreview = (OCFile) savedInstanceState.getParcelable(
FileDisplayActivity.KEY_WAITING_TO_PREVIEW);
mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS);
mWaitingToSend = (OCFile) savedInstanceState.getParcelable(
FileDisplayActivity.KEY_WAITING_TO_SEND);
searchQuery = savedInstanceState.getString(KEY_SEARCH_QUERY);
} else {
mWaitingToPreview = null;
mSyncInProgress = false;
mWaitingToSend = null;
}
/// USER INTERFACE
// Inflate and set the layout view
@ -963,6 +949,22 @@ public class FileDisplayActivity extends HookActivity
}
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState != null) {
mWaitingToPreview = (OCFile) savedInstanceState.getParcelable(
FileDisplayActivity.KEY_WAITING_TO_PREVIEW);
mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS);
mWaitingToSend = (OCFile) savedInstanceState.getParcelable(
FileDisplayActivity.KEY_WAITING_TO_SEND);
searchQuery = savedInstanceState.getString(KEY_SEARCH_QUERY);
} else {
mWaitingToPreview = null;
mSyncInProgress = false;
mWaitingToSend = null;
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
// responsibility of restore is preferred in onCreate() before than in