private OCFileListFragment mFileList;\r
\r
private boolean mDualPane;\r
+ private boolean mBackFromCreatingFirstAccount;\r
\r
private static final int DIALOG_SETUP_ACCOUNT = 0;\r
private static final int DIALOG_CREATE_DIR = 1;\r
\r
// show changelog, if needed\r
//showChangeLog();\r
+ mBackFromCreatingFirstAccount = false;\r
\r
Log.d(getClass().toString(), "onCreate() end");\r
}\r
if (mDualPane) {\r
initFileDetailsInDualPane();\r
}\r
+ mBackFromCreatingFirstAccount = true;\r
}\r
\r
// Listen for sync messages\r
break;\r
}\r
case DIALOG_CHOOSE_UPLOAD_SOURCE: {\r
- final String[] items = { getString(R.string.actionbar_upload_files),\r
- getString(R.string.actionbar_upload_from_apps), \r
- getString(R.string.actionbar_failed_instant_upload) };\r
+ \r
+ String[] items = null;\r
+ \r
+ String[] allTheItems = { getString(R.string.actionbar_upload_files),\r
+ getString(R.string.actionbar_upload_from_apps),\r
+ getString(R.string.actionbar_failed_instant_upload) };\r
+ \r
+ String[] commonItems = { getString(R.string.actionbar_upload_files),\r
+ getString(R.string.actionbar_upload_from_apps) };\r
+ \r
+ if (InstantUploadActivity.IS_ENABLED)\r
+ items = allTheItems;\r
+ else \r
+ items = commonItems;\r
+ \r
builder = new AlertDialog.Builder(this);\r
builder.setTitle(R.string.actionbar_upload);\r
builder.setItems(items, new DialogInterface.OnClickListener() {\r
action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);\r
startActivityForResult(Intent.createChooser(action, getString(R.string.upload_chooser_title)),\r
ACTION_SELECT_CONTENT_FROM_APPS);\r
- } else if (item == 2) {\r
+ } else if (item == 2 && InstantUploadActivity.IS_ENABLED) {\r
Account account = AccountUtils.getCurrentOwnCloudAccount(FileDisplayActivity.this);\r
Intent action = new Intent(FileDisplayActivity.this, InstantUploadActivity.class);\r
action.putExtra(FileUploader.KEY_ACCOUNT, account);\r
}\r
\r
setSupportProgressBarIndeterminateVisibility(inProgress);\r
+ if (mBackFromCreatingFirstAccount) {\r
+ // awful patch to fix problem with visibility of progress circle with the first refresh of the first account\r
+ // TODO - kill this Activity when the first account has to be created instead of stack the account creation on it\r
+ getSupportActionBar().hide();\r
+ getSupportActionBar().show();\r
+ mBackFromCreatingFirstAccount = false;\r
+ }\r
removeStickyBroadcast(intent);\r
\r
}\r