mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Move stuff
This commit is contained in:
parent
767560a2e0
commit
ef4ac587ce
1 changed files with 17 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue