+
+ @Override
+ protected void onAccountSet(boolean stateWasRecovered) {
+ if (getAccount() != null) {
+ OCFile file = getFile();
+ if (getFile() == null) {
+ Log_OC.e(TAG, "No conflictive file received");
+ finish();
+ } else {
+ /// Check whether the 'main' OCFile handled by the Activity is contained in the current Account
+ FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContentResolver());
+ file = storageManager.getFileByPath(file.getRemotePath()); // file = null if not in the current Account
+ if (file != null) {
+ setFile(file);
+ ConflictsResolveDialog d = ConflictsResolveDialog.newInstance(file.getRemotePath(), this);
+ d.showDialog(this);
+
+ } else {
+ // account was changed to a different one - just finish
+ finish();
+ }
+ }
+
+ } else {
+ Log_OC.wtf(TAG, "onAccountChanged was called with NULL account associated!");
+ finish();
+ }
+
+ }