FolderPickerActivity.java 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /*
  2. * ownCloud Android client application
  3. *
  4. * Copyright (C) 2016 ownCloud Inc.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2,
  8. * as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. package com.owncloud.android.ui.activity;
  20. import android.accounts.Account;
  21. import android.accounts.AuthenticatorException;
  22. import android.app.Activity;
  23. import android.content.BroadcastReceiver;
  24. import android.content.Context;
  25. import android.content.Intent;
  26. import android.content.IntentFilter;
  27. import android.content.res.Resources.NotFoundException;
  28. import android.graphics.PorterDuff;
  29. import android.graphics.drawable.Drawable;
  30. import android.os.Bundle;
  31. import android.os.Parcelable;
  32. import android.util.Log;
  33. import android.view.Menu;
  34. import android.view.MenuInflater;
  35. import android.view.MenuItem;
  36. import android.view.View;
  37. import android.view.View.OnClickListener;
  38. import android.widget.Button;
  39. import com.owncloud.android.R;
  40. import com.owncloud.android.datamodel.OCFile;
  41. import com.owncloud.android.lib.common.operations.RemoteOperation;
  42. import com.owncloud.android.lib.common.operations.RemoteOperationResult;
  43. import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
  44. import com.owncloud.android.lib.common.utils.Log_OC;
  45. import com.owncloud.android.operations.CreateFolderOperation;
  46. import com.owncloud.android.operations.RefreshFolderOperation;
  47. import com.owncloud.android.syncadapter.FileSyncAdapter;
  48. import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
  49. import com.owncloud.android.ui.dialog.SortingOrderDialogFragment;
  50. import com.owncloud.android.ui.fragment.FileFragment;
  51. import com.owncloud.android.ui.fragment.OCFileListFragment;
  52. import com.owncloud.android.utils.DataHolderUtil;
  53. import com.owncloud.android.utils.DisplayUtils;
  54. import com.owncloud.android.utils.ErrorMessageAdapter;
  55. import com.owncloud.android.utils.ThemeUtils;
  56. import java.util.ArrayList;
  57. import androidx.appcompat.app.ActionBar;
  58. import androidx.fragment.app.Fragment;
  59. import androidx.fragment.app.FragmentManager;
  60. import androidx.fragment.app.FragmentTransaction;
  61. import static com.owncloud.android.db.PreferenceManager.getSortOrderByFolder;
  62. public class FolderPickerActivity extends FileActivity implements FileFragment.ContainerActivity,
  63. OnClickListener, OnEnforceableRefreshListener {
  64. public static final String EXTRA_FOLDER = FolderPickerActivity.class.getCanonicalName() + ".EXTRA_FOLDER";
  65. public static final String EXTRA_FILES = FolderPickerActivity.class.getCanonicalName() + ".EXTRA_FILES";
  66. public static final String EXTRA_ACTION = FolderPickerActivity.class.getCanonicalName() + ".EXTRA_ACTION";
  67. public static final String EXTRA_CURRENT_FOLDER = FolderPickerActivity.class.getCanonicalName() +
  68. ".EXTRA_CURRENT_FOLDER";
  69. public static final String MOVE = "MOVE";
  70. public static final String COPY = "COPY";
  71. private SyncBroadcastReceiver mSyncBroadcastReceiver;
  72. private static final String TAG = FolderPickerActivity.class.getSimpleName();
  73. protected static final String TAG_LIST_OF_FOLDERS = "LIST_OF_FOLDERS";
  74. private boolean mSyncInProgress;
  75. private boolean mSearchOnlyFolders;
  76. private boolean mDoNotEnterEncryptedFolder;
  77. protected Button mCancelBtn;
  78. protected Button mChooseBtn;
  79. private String caption;
  80. @Override
  81. protected void onCreate(Bundle savedInstanceState) {
  82. Log_OC.d(TAG, "onCreate() start");
  83. super.onCreate(savedInstanceState);
  84. if (this instanceof FilePickerActivity) {
  85. setContentView(R.layout.files_picker);
  86. } else {
  87. setContentView(R.layout.files_folder_picker);
  88. }
  89. // sets callback listeners for UI elements
  90. initControls();
  91. // Action bar setup
  92. setupToolbar();
  93. if (getIntent().getStringExtra(EXTRA_ACTION) != null) {
  94. switch (getIntent().getStringExtra(EXTRA_ACTION)) {
  95. case MOVE:
  96. caption = getResources().getText(R.string.move_to).toString();
  97. mSearchOnlyFolders = true;
  98. mDoNotEnterEncryptedFolder = true;
  99. break;
  100. case COPY:
  101. caption = getResources().getText(R.string.copy_to).toString();
  102. mSearchOnlyFolders = true;
  103. mDoNotEnterEncryptedFolder = true;
  104. break;
  105. default:
  106. caption = ThemeUtils.getDefaultDisplayNameForRootFolder(this);
  107. break;
  108. }
  109. } else {
  110. caption = ThemeUtils.getDefaultDisplayNameForRootFolder(this);
  111. }
  112. if (getIntent().getParcelableExtra(EXTRA_CURRENT_FOLDER) != null) {
  113. setFile(getIntent().getParcelableExtra(EXTRA_CURRENT_FOLDER));
  114. }
  115. if (savedInstanceState == null) {
  116. createFragments();
  117. }
  118. if (getSupportActionBar() != null) {
  119. getSupportActionBar().setDisplayShowTitleEnabled(true);
  120. ThemeUtils.setColoredTitle(getSupportActionBar(), caption, this);
  121. }
  122. setIndeterminate(mSyncInProgress);
  123. // always AFTER setContentView(...) ; to work around bug in its implementation
  124. // sets message for empty list of folders
  125. setBackgroundText();
  126. Log_OC.d(TAG, "onCreate() end");
  127. }
  128. @Override
  129. protected void onStart() {
  130. super.onStart();
  131. }
  132. /**
  133. * Called when the ownCloud {@link Account} associated to the Activity was just updated.
  134. */
  135. @Override
  136. protected void onAccountSet(boolean stateWasRecovered) {
  137. super.onAccountSet(stateWasRecovered);
  138. if (getAccount() != null) {
  139. updateFileFromDB();
  140. OCFile folder = getFile();
  141. if (folder == null || !folder.isFolder()) {
  142. // fall back to root folder
  143. setFile(getStorageManager().getFileByPath(OCFile.ROOT_PATH));
  144. folder = getFile();
  145. }
  146. if (!stateWasRecovered) {
  147. OCFileListFragment listOfFolders = getListOfFilesFragment();
  148. listOfFolders.listDirectory(folder, false, false);
  149. startSyncFolderOperation(folder, false);
  150. }
  151. updateNavigationElementsInActionBar();
  152. }
  153. }
  154. private Activity getActivity() {
  155. return this;
  156. }
  157. protected void createFragments() {
  158. OCFileListFragment listOfFiles = new OCFileListFragment();
  159. Bundle args = new Bundle();
  160. args.putBoolean(OCFileListFragment.ARG_ONLY_FOLDERS_CLICKABLE, true);
  161. args.putBoolean(OCFileListFragment.ARG_HIDE_FAB, true);
  162. args.putBoolean(OCFileListFragment.ARG_HIDE_ITEM_OPTIONS, true);
  163. args.putBoolean(OCFileListFragment.ARG_SEARCH_ONLY_FOLDER, mSearchOnlyFolders);
  164. listOfFiles.setArguments(args);
  165. FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
  166. transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
  167. transaction.commit();
  168. }
  169. /**
  170. * Show a text message on screen view for notifying user if content is
  171. * loading or folder is empty
  172. */
  173. private void setBackgroundText() {
  174. OCFileListFragment listFragment = getListOfFilesFragment();
  175. if (listFragment != null) {
  176. if (!mSyncInProgress) {
  177. listFragment.setMessageForEmptyList(
  178. R.string.file_list_empty_headline,
  179. R.string.file_list_empty_moving,
  180. R.drawable.ic_list_empty_create_folder,
  181. true
  182. );
  183. } else {
  184. listFragment.setEmptyListLoadingMessage();
  185. }
  186. } else {
  187. Log.e(TAG, "OCFileListFragment is null");
  188. }
  189. }
  190. protected OCFileListFragment getListOfFilesFragment() {
  191. Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(FolderPickerActivity.TAG_LIST_OF_FOLDERS);
  192. if (listOfFiles != null) {
  193. return (OCFileListFragment) listOfFiles;
  194. }
  195. Log_OC.e(TAG, "Access to non existing list of files fragment!!");
  196. return null;
  197. }
  198. /**
  199. * {@inheritDoc}
  200. * <p>
  201. * Updates action bar and second fragment, if in dual pane mode.
  202. */
  203. @Override
  204. public void onBrowsedDownTo(OCFile directory) {
  205. setFile(directory);
  206. updateNavigationElementsInActionBar();
  207. // Sync Folder
  208. startSyncFolderOperation(directory, false);
  209. }
  210. @Override
  211. public void onSavedCertificate() {
  212. startSyncFolderOperation(getCurrentDir(), false);
  213. }
  214. public void startSyncFolderOperation(OCFile folder, boolean ignoreETag) {
  215. long currentSyncTime = System.currentTimeMillis();
  216. mSyncInProgress = true;
  217. // perform folder synchronization
  218. RemoteOperation refreshFolderOperation = new RefreshFolderOperation(folder, currentSyncTime, false,
  219. ignoreETag, getStorageManager(), getAccount(), getApplicationContext());
  220. refreshFolderOperation.execute(getAccount(), this, null, null);
  221. setIndeterminate(true);
  222. setBackgroundText();
  223. }
  224. @Override
  225. protected void onResume() {
  226. super.onResume();
  227. Log_OC.e(TAG, "onResume() start");
  228. // refresh list of files
  229. refreshListOfFilesFragment(false);
  230. // Listen for sync messages
  231. IntentFilter syncIntentFilter = new IntentFilter(FileSyncAdapter.EVENT_FULL_SYNC_START);
  232. syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_END);
  233. syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED);
  234. syncIntentFilter.addAction(RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED);
  235. syncIntentFilter.addAction(RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED);
  236. mSyncBroadcastReceiver = new SyncBroadcastReceiver();
  237. registerReceiver(mSyncBroadcastReceiver, syncIntentFilter);
  238. Log_OC.d(TAG, "onResume() end");
  239. }
  240. @Override
  241. protected void onPause() {
  242. Log_OC.e(TAG, "onPause() start");
  243. if (mSyncBroadcastReceiver != null) {
  244. unregisterReceiver(mSyncBroadcastReceiver);
  245. //LocalBroadcastManager.getInstance(this).unregisterReceiver(mSyncBroadcastReceiver);
  246. mSyncBroadcastReceiver = null;
  247. }
  248. Log_OC.d(TAG, "onPause() end");
  249. super.onPause();
  250. }
  251. @Override
  252. public boolean onCreateOptionsMenu(Menu menu) {
  253. MenuInflater inflater = getMenuInflater();
  254. inflater.inflate(R.menu.main_menu, menu);
  255. menu.findItem(R.id.action_switch_view).setVisible(false);
  256. menu.findItem(R.id.action_sync_account).setVisible(false);
  257. menu.findItem(R.id.action_select_all).setVisible(false);
  258. // menu.findItem(R.id.action_sort).setVisible(false);
  259. return true;
  260. }
  261. @Override
  262. public boolean onOptionsItemSelected(MenuItem item) {
  263. boolean retval = true;
  264. switch (item.getItemId()) {
  265. case R.id.action_create_dir: {
  266. CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(getCurrentFolder());
  267. dialog.show(getSupportFragmentManager(), CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT);
  268. break;
  269. }
  270. case android.R.id.home: {
  271. OCFile currentDir = getCurrentFolder();
  272. if (currentDir != null && currentDir.getParentId() != 0) {
  273. onBackPressed();
  274. }
  275. break;
  276. }
  277. case R.id.action_sort: {
  278. FragmentManager fm = getSupportFragmentManager();
  279. FragmentTransaction ft = fm.beginTransaction();
  280. ft.addToBackStack(null);
  281. SortingOrderDialogFragment mSortingOrderDialogFragment = SortingOrderDialogFragment.newInstance(
  282. getSortOrderByFolder(this, getListOfFilesFragment().getCurrentFile()));
  283. mSortingOrderDialogFragment.show(ft, SortingOrderDialogFragment.SORTING_ORDER_FRAGMENT);
  284. break;
  285. }
  286. default:
  287. retval = super.onOptionsItemSelected(item);
  288. break;
  289. }
  290. return retval;
  291. }
  292. protected OCFile getCurrentFolder() {
  293. OCFile file = getFile();
  294. if (file != null) {
  295. if (file.isFolder()) {
  296. return file;
  297. } else if (getStorageManager() != null) {
  298. String parentPath = file.getRemotePath().substring(0, file.getRemotePath().lastIndexOf(file.getFileName()));
  299. return getStorageManager().getFileByPath(parentPath);
  300. }
  301. }
  302. return null;
  303. }
  304. public void refreshListOfFilesFragment(boolean fromSearch) {
  305. OCFileListFragment fileListFragment = getListOfFilesFragment();
  306. if (fileListFragment != null) {
  307. fileListFragment.listDirectory(false, fromSearch);
  308. }
  309. }
  310. public void browseToRoot() {
  311. OCFileListFragment listOfFiles = getListOfFilesFragment();
  312. if (listOfFiles != null) { // should never be null, indeed
  313. OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
  314. listOfFiles.listDirectory(root, false, false);
  315. setFile(listOfFiles.getCurrentFile());
  316. updateNavigationElementsInActionBar();
  317. startSyncFolderOperation(root, false);
  318. }
  319. }
  320. @Override
  321. public void onBackPressed() {
  322. OCFileListFragment listOfFiles = getListOfFilesFragment();
  323. if (listOfFiles != null) { // should never be null, indeed
  324. int levelsUp = listOfFiles.onBrowseUp();
  325. if (levelsUp == 0) {
  326. finish();
  327. return;
  328. }
  329. setFile(listOfFiles.getCurrentFile());
  330. updateNavigationElementsInActionBar();
  331. }
  332. }
  333. protected void updateNavigationElementsInActionBar() {
  334. OCFile currentDir = getCurrentFolder();
  335. ActionBar actionBar = getSupportActionBar();
  336. if (actionBar != null) {
  337. boolean atRoot = currentDir == null || currentDir.getParentId() == 0;
  338. actionBar.setDisplayHomeAsUpEnabled(!atRoot);
  339. actionBar.setHomeButtonEnabled(!atRoot);
  340. Drawable backArrow = getResources().getDrawable(R.drawable.ic_arrow_back);
  341. actionBar.setHomeAsUpIndicator(ThemeUtils.tintDrawable(backArrow, ThemeUtils.fontColor(this)));
  342. ThemeUtils.setColoredTitle(getSupportActionBar(), atRoot ? caption : currentDir.getFileName(), this);
  343. }
  344. }
  345. /**
  346. * Set per-view controllers
  347. */
  348. private void initControls() {
  349. mCancelBtn = findViewById(R.id.folder_picker_btn_cancel);
  350. mChooseBtn = findViewById(R.id.folder_picker_btn_choose);
  351. if (mChooseBtn != null) {
  352. mChooseBtn.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP);
  353. mChooseBtn.setOnClickListener(this);
  354. }
  355. if (mCancelBtn != null) {
  356. mCancelBtn.setTextColor(ThemeUtils.primaryColor(this, true));
  357. mCancelBtn.setOnClickListener(this);
  358. }
  359. }
  360. @Override
  361. public void onClick(View v) {
  362. if (v.equals(mCancelBtn)) {
  363. finish();
  364. } else if (v.equals(mChooseBtn)) {
  365. Intent i = getIntent();
  366. ArrayList<Parcelable> targetFiles = i.getParcelableArrayListExtra(FolderPickerActivity.EXTRA_FILES);
  367. Intent data = new Intent();
  368. data.putExtra(EXTRA_FOLDER, getCurrentFolder());
  369. data.putParcelableArrayListExtra(EXTRA_FILES, targetFiles);
  370. setResult(RESULT_OK, data);
  371. finish();
  372. }
  373. }
  374. @Override
  375. public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
  376. super.onRemoteOperationFinish(operation, result);
  377. if (operation instanceof CreateFolderOperation) {
  378. onCreateFolderOperationFinish((CreateFolderOperation) operation, result);
  379. }
  380. }
  381. /**
  382. * Updates the view associated to the activity after the finish of an operation trying
  383. * to create a new folder.
  384. *
  385. * @param operation Creation operation performed.
  386. * @param result Result of the creation.
  387. */
  388. private void onCreateFolderOperationFinish(
  389. CreateFolderOperation operation, RemoteOperationResult result
  390. ) {
  391. if (result.isSuccess()) {
  392. refreshListOfFilesFragment(false);
  393. } else {
  394. try {
  395. DisplayUtils.showSnackMessage(
  396. this, ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources())
  397. );
  398. } catch (NotFoundException e) {
  399. Log_OC.e(TAG, "Error while trying to show fail message ", e);
  400. }
  401. }
  402. }
  403. private class SyncBroadcastReceiver extends BroadcastReceiver {
  404. /**
  405. * {@link BroadcastReceiver} to enable syncing feedback in UI
  406. */
  407. @Override
  408. public void onReceive(Context context, Intent intent) {
  409. try {
  410. String event = intent.getAction();
  411. Log_OC.d(TAG, "Received broadcast " + event);
  412. String accountName = intent.getStringExtra(FileSyncAdapter.EXTRA_ACCOUNT_NAME);
  413. String syncFolderRemotePath = intent.getStringExtra(FileSyncAdapter.EXTRA_FOLDER_PATH);
  414. RemoteOperationResult syncResult = (RemoteOperationResult)
  415. DataHolderUtil.getInstance().retrieve(intent.getStringExtra(FileSyncAdapter.EXTRA_RESULT));
  416. boolean sameAccount = getAccount() != null && accountName.equals(getAccount().name)
  417. && getStorageManager() != null;
  418. if (sameAccount) {
  419. if (FileSyncAdapter.EVENT_FULL_SYNC_START.equals(event)) {
  420. mSyncInProgress = true;
  421. } else {
  422. OCFile currentFile = (getFile() == null) ? null :
  423. getStorageManager().getFileByPath(getFile().getRemotePath());
  424. OCFile currentDir = (getCurrentFolder() == null) ? null :
  425. getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
  426. if (currentDir == null) {
  427. // current folder was removed from the server
  428. DisplayUtils.showSnackMessage(getActivity(), R.string.sync_current_folder_was_removed,
  429. getCurrentFolder().getFileName());
  430. browseToRoot();
  431. } else {
  432. if (currentFile == null && !getFile().isFolder()) {
  433. // currently selected file was removed in the server, and now we know it
  434. currentFile = currentDir;
  435. }
  436. if (currentDir.getRemotePath().equals(syncFolderRemotePath)) {
  437. OCFileListFragment fileListFragment = getListOfFilesFragment();
  438. if (fileListFragment != null) {
  439. fileListFragment.listDirectory(currentDir, false, false);
  440. }
  441. }
  442. setFile(currentFile);
  443. }
  444. mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) &&
  445. !RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
  446. if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.equals(event) &&
  447. /// TODO refactor and make common
  448. syncResult != null && !syncResult.isSuccess()) {
  449. if (ResultCode.UNAUTHORIZED.equals(syncResult.getCode()) || (syncResult.isException()
  450. && syncResult.getException() instanceof AuthenticatorException)) {
  451. requestCredentialsUpdate(context);
  452. } else if (RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED
  453. .equals(syncResult.getCode())) {
  454. showUntrustedCertDialog(syncResult);
  455. }
  456. }
  457. }
  458. removeStickyBroadcast(intent);
  459. DataHolderUtil.getInstance().delete(intent.getStringExtra(FileSyncAdapter.EXTRA_RESULT));
  460. Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
  461. setIndeterminate(mSyncInProgress);
  462. setBackgroundText();
  463. }
  464. } catch (RuntimeException e) {
  465. // avoid app crashes after changing the serial id of RemoteOperationResult
  466. // in owncloud library with broadcast notifications pending to process
  467. removeStickyBroadcast(intent);
  468. DataHolderUtil.getInstance().delete(intent.getStringExtra(FileSyncAdapter.EXTRA_RESULT));
  469. }
  470. }
  471. }
  472. @Override
  473. public void showDetails(OCFile file) {
  474. // not used at the moment
  475. }
  476. @Override
  477. public void showDetails(OCFile file, int activeTab) {
  478. // not used at the moment
  479. }
  480. /**
  481. * {@inheritDoc}
  482. */
  483. @Override
  484. public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading) {
  485. // not used at the moment
  486. }
  487. @Override
  488. public void onRefresh() {
  489. refreshList(true);
  490. }
  491. @Override
  492. public void onRefresh(boolean enforced) {
  493. refreshList(enforced);
  494. }
  495. private void refreshList(boolean ignoreETag) {
  496. OCFileListFragment listOfFiles = getListOfFilesFragment();
  497. if (listOfFiles != null) {
  498. OCFile folder = listOfFiles.getCurrentFile();
  499. if (folder != null) {
  500. startSyncFolderOperation(folder, ignoreETag);
  501. }
  502. }
  503. }
  504. public boolean isDoNotEnterEncryptedFolder() {
  505. return mDoNotEnterEncryptedFolder;
  506. }
  507. }