Search in sources :

Example 1 with ConflictsResolveDialog

use of com.owncloud.android.ui.dialog.ConflictsResolveDialog in project android by owncloud.

the class ConflictsResolveActivity method onAccountSet.

@Override
protected void onAccountSet(boolean stateWasRecovered) {
    super.onAccountSet(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
            // file = null if not in the
            file = getStorageManager().getFileByPath(file.getRemotePath());
            // 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 {
        finish();
    }
}
Also used : OCFile(com.owncloud.android.datamodel.OCFile) ConflictsResolveDialog(com.owncloud.android.ui.dialog.ConflictsResolveDialog)

Aggregations

OCFile (com.owncloud.android.datamodel.OCFile)1 ConflictsResolveDialog (com.owncloud.android.ui.dialog.ConflictsResolveDialog)1