FolderPickerActivity.java 22 KB

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