fix indentation in various key import methods
This commit is contained in:
@@ -498,13 +498,12 @@ public class ProviderHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mIndent -= 1;
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_IO_EXC);
|
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_IO_EXC);
|
||||||
Log.e(Constants.TAG, "IOException during import", e);
|
Log.e(Constants.TAG, "IOException during import", e);
|
||||||
mIndent -= 1;
|
|
||||||
return SaveKeyringResult.RESULT_ERROR;
|
return SaveKeyringResult.RESULT_ERROR;
|
||||||
|
} finally {
|
||||||
|
mIndent -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -523,19 +522,16 @@ public class ProviderHelper {
|
|||||||
mContentResolver.applyBatch(KeychainContract.CONTENT_AUTHORITY, operations);
|
mContentResolver.applyBatch(KeychainContract.CONTENT_AUTHORITY, operations);
|
||||||
|
|
||||||
log(LogLevel.OK, LogType.MSG_IP_SUCCESS);
|
log(LogLevel.OK, LogType.MSG_IP_SUCCESS);
|
||||||
mIndent -= 1;
|
|
||||||
progress.setProgress(LogType.MSG_IP_SUCCESS.getMsgId(), 90, 100);
|
progress.setProgress(LogType.MSG_IP_SUCCESS.getMsgId(), 90, 100);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_REMOTE_EX);
|
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_REMOTE_EX);
|
||||||
Log.e(Constants.TAG, "RemoteException during import", e);
|
Log.e(Constants.TAG, "RemoteException during import", e);
|
||||||
mIndent -= 1;
|
|
||||||
return SaveKeyringResult.RESULT_ERROR;
|
return SaveKeyringResult.RESULT_ERROR;
|
||||||
} catch (OperationApplicationException e) {
|
} catch (OperationApplicationException e) {
|
||||||
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_OP_EXC);
|
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_OP_EXC);
|
||||||
Log.e(Constants.TAG, "OperationApplicationException during import", e);
|
Log.e(Constants.TAG, "OperationApplicationException during import", e);
|
||||||
mIndent -= 1;
|
|
||||||
return SaveKeyringResult.RESULT_ERROR;
|
return SaveKeyringResult.RESULT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,6 +577,7 @@ public class ProviderHelper {
|
|||||||
log(LogLevel.START, LogType.MSG_IS,
|
log(LogLevel.START, LogType.MSG_IS,
|
||||||
new String[]{ PgpKeyHelper.convertKeyIdToHex(masterKeyId) });
|
new String[]{ PgpKeyHelper.convertKeyIdToHex(masterKeyId) });
|
||||||
mIndent += 1;
|
mIndent += 1;
|
||||||
|
try {
|
||||||
|
|
||||||
// Canonicalize this key, to assert a number of assumptions made about it.
|
// Canonicalize this key, to assert a number of assumptions made about it.
|
||||||
keyRing = keyRing.canonicalize(mLog, mIndent);
|
keyRing = keyRing.canonicalize(mLog, mIndent);
|
||||||
@@ -624,9 +621,9 @@ public class ProviderHelper {
|
|||||||
for (UncachedPublicKey sub :
|
for (UncachedPublicKey sub :
|
||||||
new IterableIterator<UncachedPublicKey>(keyRing.getPublicKeys())) {
|
new IterableIterator<UncachedPublicKey>(keyRing.getPublicKeys())) {
|
||||||
long id = sub.getKeyId();
|
long id = sub.getKeyId();
|
||||||
if(available.contains(id)) {
|
if (available.contains(id)) {
|
||||||
int upd = mContentResolver.update(uri, values, Keys.KEY_ID + " = ?",
|
int upd = mContentResolver.update(uri, values, Keys.KEY_ID + " = ?",
|
||||||
new String[] { Long.toString(id) });
|
new String[]{Long.toString(id)});
|
||||||
if (upd == 1) {
|
if (upd == 1) {
|
||||||
log(LogLevel.DEBUG, LogType.MSG_IS_SUBKEY_OK, new String[]{
|
log(LogLevel.DEBUG, LogType.MSG_IS_SUBKEY_OK, new String[]{
|
||||||
PgpKeyHelper.convertKeyIdToHex(id)
|
PgpKeyHelper.convertKeyIdToHex(id)
|
||||||
@@ -651,6 +648,10 @@ public class ProviderHelper {
|
|||||||
log(LogLevel.OK, LogType.MSG_IS_SUCCESS);
|
log(LogLevel.OK, LogType.MSG_IS_SUCCESS);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
mIndent -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -738,12 +739,13 @@ public class ProviderHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mIndent -= 1;
|
|
||||||
return new SaveKeyringResult(result, mLog);
|
return new SaveKeyringResult(result, mLog);
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_IO_EXC);
|
log(LogLevel.ERROR, LogType.MSG_IP_FAIL_IO_EXC);
|
||||||
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);
|
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);
|
||||||
|
} finally {
|
||||||
|
mIndent -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -833,6 +835,8 @@ public class ProviderHelper {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log(LogLevel.ERROR, LogType.MSG_IS_FAIL_IO_EXC, null);
|
log(LogLevel.ERROR, LogType.MSG_IS_FAIL_IO_EXC, null);
|
||||||
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);
|
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);
|
||||||
|
} finally {
|
||||||
|
mIndent -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user