|
@@ -232,6 +232,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|
if (mDirs != null)
|
|
if (mDirs != null)
|
|
for (String s : mDirs)
|
|
for (String s : mDirs)
|
|
mDirectories.insert(s, 0);
|
|
mDirectories.insert(s, 0);
|
|
|
|
+ mCurrentDir = savedInstanceState.getParcelable(KEY_CURRENT_DIR);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -285,7 +286,9 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|
|
|
|
|
// Clear intent extra, so rotating the screen will not return us to this directory
|
|
// Clear intent extra, so rotating the screen will not return us to this directory
|
|
getIntent().removeExtra(FileDetailFragment.EXTRA_FILE);
|
|
getIntent().removeExtra(FileDetailFragment.EXTRA_FILE);
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ mCurrentDir = mFileList.getCurrentFile();
|
|
|
|
+ }
|
|
|
|
|
|
// Drop-Down navigation and file list restore
|
|
// Drop-Down navigation and file list restore
|
|
mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);
|
|
mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);
|
|
@@ -336,7 +339,6 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|
unregisterReceiver(syncBroadcastRevceiver);
|
|
unregisterReceiver(syncBroadcastRevceiver);
|
|
syncBroadcastRevceiver = null;
|
|
syncBroadcastRevceiver = null;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -361,7 +363,6 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|
builder.setTitle(R.string.uploader_info_dirname);
|
|
builder.setTitle(R.string.uploader_info_dirname);
|
|
int typed_color = getResources().getColor(R.color.setup_text_typed);
|
|
int typed_color = getResources().getColor(R.color.setup_text_typed);
|
|
dirNameInput.setTextColor(typed_color);
|
|
dirNameInput.setTextColor(typed_color);
|
|
-
|
|
|
|
builder.setPositiveButton(android.R.string.ok,
|
|
builder.setPositiveButton(android.R.string.ok,
|
|
new OnClickListener() {
|
|
new OnClickListener() {
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
@@ -372,12 +373,11 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|
}
|
|
}
|
|
|
|
|
|
// Figure out the path where the dir needs to be created
|
|
// Figure out the path where the dir needs to be created
|
|
- String path = mCurrentDir.getRemotePath();
|
|
|
|
|
|
+ String path = FileDisplayActivity.this.mCurrentDir.getRemotePath();
|
|
|
|
|
|
// Create directory
|
|
// Create directory
|
|
path += directoryName + "/";
|
|
path += directoryName + "/";
|
|
- Thread thread = new Thread(new DirectoryCreator(
|
|
|
|
- path, a));
|
|
|
|
|
|
+ Thread thread = new Thread(new DirectoryCreator(path, a));
|
|
thread.start();
|
|
thread.start();
|
|
|
|
|
|
// Save new directory in local database
|
|
// Save new directory in local database
|