Use Timber instead of Android.Log
This commit is contained in:
@@ -21,10 +21,10 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class CertifyFingerprintActivity extends BaseActivity {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CertifyFingerprintActivity extends BaseActivity {
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be uri of key!");
|
||||
Timber.e("Data missing. Should be uri of key!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class CertifyFingerprintActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri.toString());
|
||||
Timber.i("mDataUri: " + mDataUri.toString());
|
||||
|
||||
startFragment(savedInstanceState, mDataUri);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,8 @@
|
||||
package org.sufficientlysecure.keychain.ui;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.LoaderManager;
|
||||
@@ -33,14 +30,13 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.KeyRepository;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.ui.base.LoaderFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class CertifyFingerprintFragment extends LoaderFragment implements
|
||||
@@ -106,7 +102,7 @@ public class CertifyFingerprintFragment extends LoaderFragment implements
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +113,7 @@ public class CertifyFingerprintFragment extends LoaderFragment implements
|
||||
private void loadData(Uri dataUri) {
|
||||
mDataUri = dataUri;
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri.toString());
|
||||
Timber.i("mDataUri: " + mDataUri.toString());
|
||||
|
||||
// Prepare the loaders. Either re-connect with an existing ones,
|
||||
// or start new ones.
|
||||
@@ -187,7 +183,7 @@ public class CertifyFingerprintFragment extends LoaderFragment implements
|
||||
.getCachedPublicKeyRing(dataUri)
|
||||
.extractOrGetMasterKeyId();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
Intent certifyIntent = new Intent(getActivity(), CertifyKeyActivity.class);
|
||||
certifyIntent.putExtras(getActivity().getIntent());
|
||||
|
||||
@@ -46,8 +46,9 @@ import org.sufficientlysecure.keychain.ui.base.CachingCryptoOperationFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.widget.CertifyKeySpinner;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class CertifyKeyFragment
|
||||
extends CachingCryptoOperationFragment<CertifyActionsParcel, CertifyResult> {
|
||||
@@ -75,7 +76,7 @@ public class CertifyKeyFragment
|
||||
mCertifyKeySpinner.setPreSelectedKeyId(certifyKeyId);
|
||||
}
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "certify certify check failed", e);
|
||||
Timber.e(e, "certify certify check failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ import org.sufficientlysecure.keychain.service.UploadKeyringParcel;
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
@@ -435,7 +435,7 @@ public class CreateKeyFinalFragment extends Fragment {
|
||||
try {
|
||||
builder = SaveKeyringParcel.buildChangeKeyringParcel(key.getMasterKeyId(), key.getFingerprint());
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "Key that should be moved to Security Token not found in database!");
|
||||
Timber.e("Key that should be moved to Security Token not found in database!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
|
||||
import org.sufficientlysecure.keychain.ui.transfer.view.TransferFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class CreateKeyStartFragment extends Fragment {
|
||||
public static final int REQUEST_CODE_IMPORT_KEY = 0x00007012;
|
||||
@@ -149,7 +149,7 @@ public class CreateKeyStartFragment extends Fragment {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.e(Constants.TAG, "No valid request code!");
|
||||
Timber.e("No valid request code!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils.State;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public abstract class DecryptFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
|
||||
@@ -424,7 +426,7 @@ public abstract class DecryptFragment extends Fragment implements LoaderManager.
|
||||
int result = mSignatureResult.getResult();
|
||||
if (result != OpenPgpSignatureResult.RESULT_KEY_MISSING
|
||||
&& result != OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE) {
|
||||
Log.e(Constants.TAG, "got missing status for non-missing key, shouldn't happen!");
|
||||
Timber.e("got missing status for non-missing key, shouldn't happen!");
|
||||
}
|
||||
|
||||
String userId = mSignatureResult.getPrimaryUserId();
|
||||
|
||||
@@ -95,9 +95,9 @@ import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableHashMap;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
@@ -321,7 +321,7 @@ public class DecryptListFragment
|
||||
FileHelper.copyUriData(activity, decryptedFileUri, saveUri);
|
||||
Notify.create(activity, R.string.file_saved, Style.OK).show();
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "error saving file", e);
|
||||
Timber.e(e, "error saving file");
|
||||
Notify.create(activity, R.string.error_saving_file, Style.ERROR).show();
|
||||
}
|
||||
}
|
||||
@@ -631,7 +631,7 @@ public class DecryptListFragment
|
||||
mCurrentInputUri = mPendingInputUris.remove(0);
|
||||
}
|
||||
|
||||
Log.d(Constants.TAG, "mCurrentInputUri=" + mCurrentInputUri);
|
||||
Timber.d("mCurrentInputUri=" + mCurrentInputUri);
|
||||
|
||||
if (!checkAndRequestReadPermission(activity, mCurrentInputUri)) {
|
||||
return null;
|
||||
@@ -825,7 +825,7 @@ public class DecryptListFragment
|
||||
Notify.create(activity, R.string.file_delete_none, Style.WARN).show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(Constants.TAG, "exception deleting file", e);
|
||||
Timber.e(e, "exception deleting file");
|
||||
Notify.create(activity, R.string.file_delete_exception, Style.ERROR).show();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import android.widget.AdapterView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.operations.results.DeleteResult;
|
||||
@@ -47,7 +46,7 @@ import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.CustomAlertDialogBuilder;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -111,9 +110,8 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
|
||||
showRevokeDeleteDialog(name);
|
||||
}
|
||||
} catch (KeyRepository.NotFoundException e) {
|
||||
Log.e(Constants.TAG,
|
||||
"Secret key to delete not found at DeleteKeyDialogActivity for "
|
||||
+ mMasterKeyIds[0], e);
|
||||
Timber.e(e, "Secret key to delete not found at DeleteKeyDialogActivity for "
|
||||
+ mMasterKeyIds[0]);
|
||||
finish();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -20,10 +20,10 @@ package org.sufficientlysecure.keychain.ui;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditIdentitiesActivity extends BaseActivity {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class EditIdentitiesActivity extends BaseActivity {
|
||||
|
||||
Uri dataUri = getIntent().getData();
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Either a key Uri or EXTRA_SAVE_KEYRING_PARCEL is required!");
|
||||
Timber.e("Either a key Uri or EXTRA_SAVE_KEYRING_PARCEL is required!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -62,8 +62,9 @@ import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.AddUserIdDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.EditUserIdDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.SetPassphraseDialogFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditIdentitiesFragment extends Fragment
|
||||
implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -140,7 +141,7 @@ public class EditIdentitiesFragment extends Fragment
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Either a key Uri is required!");
|
||||
Timber.e("Either a key Uri is required!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -164,7 +165,7 @@ public class EditIdentitiesFragment extends Fragment
|
||||
private void loadData(Uri dataUri) {
|
||||
mDataUri = dataUri;
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri);
|
||||
Timber.i("mDataUri: " + mDataUri);
|
||||
|
||||
// load the secret key ring. we do verify here that the passphrase is correct, so cached won't do
|
||||
try {
|
||||
|
||||
@@ -20,11 +20,11 @@ package org.sufficientlysecure.keychain.ui;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.service.SaveKeyringParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditKeyActivity extends BaseActivity {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class EditKeyActivity extends BaseActivity {
|
||||
Uri dataUri = getIntent().getData();
|
||||
SaveKeyringParcel saveKeyringParcel = getIntent().getParcelableExtra(EXTRA_SAVE_KEYRING_PARCEL);
|
||||
if (dataUri == null && saveKeyringParcel == null) {
|
||||
Log.e(Constants.TAG, "Either a key Uri or EXTRA_SAVE_KEYRING_PARCEL is required!");
|
||||
Timber.e("Either a key Uri or EXTRA_SAVE_KEYRING_PARCEL is required!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult;
|
||||
@@ -68,8 +67,9 @@ import org.sufficientlysecure.keychain.ui.dialog.EditSubkeyExpiryDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.EditUserIdDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.SetPassphraseDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditKeyFragment extends QueueingCryptoOperationFragment<SaveKeyringParcel, OperationResult>
|
||||
implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -168,7 +168,7 @@ public class EditKeyFragment extends QueueingCryptoOperationFragment<SaveKeyring
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
SaveKeyringParcel saveKeyringParcel = getArguments().getParcelable(ARG_SAVE_KEYRING_PARCEL);
|
||||
if (dataUri == null && saveKeyringParcel == null) {
|
||||
Log.e(Constants.TAG, "Either a key Uri or ARG_SAVE_KEYRING_PARCEL is required!");
|
||||
Timber.e("Either a key Uri or ARG_SAVE_KEYRING_PARCEL is required!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ public class EditKeyFragment extends QueueingCryptoOperationFragment<SaveKeyring
|
||||
private void loadData(Uri dataUri) {
|
||||
mDataUri = dataUri;
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri);
|
||||
Timber.i("mDataUri: " + mDataUri);
|
||||
|
||||
// load the secret key ring. we do verify here that the passphrase is correct, so cached won't do
|
||||
try {
|
||||
|
||||
@@ -76,9 +76,10 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.ActionListener;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EncryptFilesFragment
|
||||
extends CachingCryptoOperationFragment<SignEncryptParcel, SignEncryptResult> {
|
||||
@@ -901,7 +902,7 @@ public class EncryptFilesFragment
|
||||
for (Uri inputUri : inputUris) {
|
||||
ViewModel newModel = new ViewModel(mActivity, inputUri);
|
||||
if (mDataset.contains(newModel)) {
|
||||
Log.e(Constants.TAG, "Skipped duplicate " + inputUri);
|
||||
Timber.e("Skipped duplicate " + inputUri);
|
||||
} else {
|
||||
mDataset.add(newModel);
|
||||
}
|
||||
|
||||
@@ -44,8 +44,9 @@ import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.widget.EncryptKeyCompletionView;
|
||||
import org.sufficientlysecure.keychain.ui.widget.KeySpinner;
|
||||
import org.sufficientlysecure.keychain.ui.widget.KeySpinner.OnKeyChangedListener;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EncryptModeAsymmetricFragment extends EncryptModeFragment {
|
||||
|
||||
@@ -144,7 +145,7 @@ public class EncryptModeAsymmetricFragment extends EncryptModeFragment {
|
||||
mSignKeySpinner.setPreSelectedKeyId(signatureKeyId);
|
||||
}
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found for signing!", e);
|
||||
Timber.e(e, "key not found for signing!");
|
||||
Notify.create(getActivity(), getString(R.string.error_preselect_sign_key,
|
||||
KeyFormattingUtils.beautifyKeyId(signatureKeyId)),
|
||||
Style.ERROR).show();
|
||||
@@ -158,7 +159,7 @@ public class EncryptModeAsymmetricFragment extends EncryptModeFragment {
|
||||
mKeyRepository.getCanonicalizedPublicKeyRing(preselectedId);
|
||||
mEncryptKeyView.addObject(new KeyItem(ring));
|
||||
} catch (NotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found for encryption!", e);
|
||||
Timber.e(e, "key not found for encryption!");
|
||||
Notify.create(getActivity(), getString(R.string.error_preselect_encrypt_key,
|
||||
KeyFormattingUtils.beautifyKeyId(preselectedId)),
|
||||
Style.ERROR).show();
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.apache.james.mime4j.util.MimeUtil;
|
||||
@@ -33,7 +34,8 @@ import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EncryptTextActivity extends EncryptActivity {
|
||||
|
||||
@@ -63,8 +65,6 @@ public class EncryptTextActivity extends EncryptActivity {
|
||||
|
||||
// When sending to OpenKeychain Encrypt via share menu
|
||||
if (Intent.ACTION_SEND.equals(action) && type != null) {
|
||||
Log.logDebugBundle(extras, "extras");
|
||||
|
||||
// When sending to OpenKeychain Encrypt via share menu
|
||||
if ( ! MimeUtil.isSameMimeType("text/plain", type)) {
|
||||
Toast.makeText(this, R.string.toast_wrong_mimetype, Toast.LENGTH_LONG).show();
|
||||
|
||||
@@ -30,9 +30,8 @@ import android.widget.TextView;
|
||||
import org.markdown4j.Markdown4jProcessor;
|
||||
import org.sufficientlysecure.htmltextview.HtmlResImageGetter;
|
||||
import org.sufficientlysecure.htmltextview.HtmlTextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -54,7 +53,7 @@ public class HelpAboutFragment extends Fragment {
|
||||
getActivity().getResources().openRawResource(R.raw.help_about));
|
||||
aboutTextView.setHtml(html, new HtmlResImageGetter(aboutTextView));
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IOException", e);
|
||||
Timber.e(e, "IOException");
|
||||
}
|
||||
|
||||
return view;
|
||||
@@ -73,7 +72,7 @@ public class HelpAboutFragment extends Fragment {
|
||||
|
||||
result = String.format("%s (%s)", info.versionName, info.versionCode);
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.w(Constants.TAG, "Unable to get application version: " + e.getMessage());
|
||||
Timber.w("Unable to get application version: " + e.getMessage());
|
||||
result = "Unable to get application version.";
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ import android.widget.ScrollView;
|
||||
import org.markdown4j.Markdown4jProcessor;
|
||||
import org.sufficientlysecure.htmltextview.HtmlResImageGetter;
|
||||
import org.sufficientlysecure.htmltextview.HtmlTextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -71,7 +70,7 @@ public class HelpMarkdownFragment extends Fragment {
|
||||
getActivity().getResources().openRawResource(mHtmlFile));
|
||||
text.setHtml(html, new HtmlResImageGetter(text));
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IOException", e);
|
||||
Timber.e(e, "IOException");
|
||||
}
|
||||
|
||||
return scroller;
|
||||
|
||||
@@ -42,9 +42,9 @@ import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableFileCache;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -176,7 +176,7 @@ public class ImportKeysActivity extends BaseActivity implements ImportKeysListen
|
||||
// action: search immediately
|
||||
startListFragment(null, null, query, null);
|
||||
} else {
|
||||
Log.e(Constants.TAG, "Query is empty!");
|
||||
Timber.e("Query is empty!");
|
||||
return;
|
||||
}
|
||||
} else if (extras.containsKey(EXTRA_FINGERPRINT)) {
|
||||
@@ -193,10 +193,8 @@ public class ImportKeysActivity extends BaseActivity implements ImportKeysListen
|
||||
startListFragment(null, null, query, null);
|
||||
}
|
||||
} else {
|
||||
Log.e(Constants.TAG,
|
||||
"IMPORT_KEY_FROM_KEYSERVER action needs to contain the 'query', 'key_id', or " +
|
||||
"'fingerprint' extra!"
|
||||
);
|
||||
Timber.e("IMPORT_KEY_FROM_KEYSERVER action needs to contain the 'query', 'key_id', or " +
|
||||
"'fingerprint' extra!");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -216,7 +214,7 @@ public class ImportKeysActivity extends BaseActivity implements ImportKeysListen
|
||||
dataUri.getScheme() + "://" + dataUri.getAuthority());
|
||||
Preferences.CloudSearchPrefs cloudSearchPrefs = new Preferences.CloudSearchPrefs(
|
||||
true, false, false, keyserver);
|
||||
Log.d(Constants.TAG, "Using keyserver: " + keyserver);
|
||||
Timber.d("Using keyserver: " + keyserver);
|
||||
|
||||
// process URL to get operation and query
|
||||
String operation = dataUri.getQueryParameter("op");
|
||||
@@ -352,7 +350,7 @@ public class ImportKeysActivity extends BaseActivity implements ImportKeysListen
|
||||
new ParcelableFileCache<>(this, ImportOperation.CACHE_FILE_NAME);
|
||||
cache.writeCache(entries.size(), keyRings.iterator());
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Problem writing cache file", e);
|
||||
Timber.e(e, "Problem writing cache file");
|
||||
Notify.create(this, "Problem writing cache file!", Notify.Style.ERROR).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.ClipboardReflection;
|
||||
import org.sufficientlysecure.keychain.keyimport.processing.BytesLoaderState;
|
||||
@@ -42,7 +41,7 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.util.PermissionsUtil;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -151,7 +150,7 @@ public class ImportKeysFileFragment extends Fragment {
|
||||
try {
|
||||
isEncrypted = FileHelper.isEncryptedFile(mActivity, mCurrentUri);
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Error opening file", e);
|
||||
Timber.e(e, "Error opening file");
|
||||
|
||||
Notify.create(mActivity, R.string.error_bad_data, Style.ERROR).show();
|
||||
return;
|
||||
|
||||
@@ -43,9 +43,9 @@ import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.transfer.view.TransferFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.IntentIntegratorSupportV4;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
@@ -94,11 +94,11 @@ public class ImportKeysProxyActivity extends FragmentActivity
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
handleActionNdefDiscovered(getIntent());
|
||||
} else {
|
||||
Log.e(Constants.TAG, "Android Beam not supported by Android < 4.1");
|
||||
Timber.e("Android Beam not supported by Android < 4.1");
|
||||
finish();
|
||||
}
|
||||
} else {
|
||||
Log.e(Constants.TAG, "No valid scheme or action given!");
|
||||
Timber.e("No valid scheme or action given!");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class ImportKeysProxyActivity extends FragmentActivity
|
||||
resultCode, data);
|
||||
|
||||
if (scanResult == null || scanResult.getFormatName() == null) {
|
||||
Log.e(Constants.TAG, "scanResult or formatName null! Should not happen!");
|
||||
Timber.e("scanResult or formatName null! Should not happen!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class ImportKeysProxyActivity extends FragmentActivity
|
||||
private void processScannedContent(Uri uri) {
|
||||
String action = getIntent().getAction();
|
||||
|
||||
Log.d(Constants.TAG, "scanned: " + uri);
|
||||
Timber.d("scanned: " + uri);
|
||||
|
||||
// example: pgp+transfer:
|
||||
if (uri != null && uri.getScheme() != null && uri.getScheme().equalsIgnoreCase(Constants.SKT_SCHEME)) {
|
||||
|
||||
@@ -68,8 +68,9 @@ import org.sufficientlysecure.keychain.ui.base.RecyclerFragment;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.ViewKeyActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.FabContainer;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
||||
implements SearchView.OnQueryTextListener,
|
||||
@@ -381,7 +382,7 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
||||
Notify.create(getActivity(), "Restored debug_backup.db", Notify.Style.OK).show();
|
||||
getActivity().getContentResolver().notifyChange(KeychainContract.KeyRings.CONTENT_URI, null);
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IO Error", e);
|
||||
Timber.e(e, "IO Error");
|
||||
Notify.create(getActivity(), "IO Error " + e.getMessage(), Notify.Style.ERROR).show();
|
||||
}
|
||||
return true;
|
||||
@@ -391,7 +392,7 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
||||
KeychainDatabase.debugBackup(getActivity(), false);
|
||||
Notify.create(getActivity(), "Backup to debug_backup.db completed", Notify.Style.OK).show();
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IO Error", e);
|
||||
Timber.e(e, "IO Error");
|
||||
Notify.create(getActivity(), "IO Error: " + e.getMessage(), Notify.Style.ERROR).show();
|
||||
}
|
||||
return true;
|
||||
@@ -422,7 +423,7 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(String s) {
|
||||
Log.d(Constants.TAG, "onQueryTextChange s:" + s);
|
||||
Timber.d("onQueryTextChange s: %s", s);
|
||||
// Called when the action bar search text has changed. Update the
|
||||
// search filter, and restart the loader to do a new query with this
|
||||
// filter.
|
||||
|
||||
@@ -32,15 +32,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainDatabase;
|
||||
import org.sufficientlysecure.keychain.service.CertifyActionsParcel;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.MultiUserIdsAdapter;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -90,7 +87,7 @@ public class MultiUserIdsFragment extends Fragment implements LoaderManager.Load
|
||||
|
||||
mPubMasterKeyIds = getActivity().getIntent().getLongArrayExtra(EXTRA_KEY_IDS);
|
||||
if (mPubMasterKeyIds == null) {
|
||||
Log.e(Constants.TAG, "List of key ids to certify missing!");
|
||||
Timber.e("List of key ids to certify missing!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -184,7 +181,7 @@ public class MultiUserIdsFragment extends Fragment implements LoaderManager.Load
|
||||
// Remember for next loop
|
||||
lastName = name;
|
||||
|
||||
Log.d(Constants.TAG, Long.toString(masterKeyId, 16) + (grouped ? "grouped" : "not grouped"));
|
||||
Timber.d(Long.toString(masterKeyId, 16) + (grouped ? "grouped" : "not grouped"));
|
||||
|
||||
if (!subGrouped) {
|
||||
// 1. This name should NOT be grouped with the previous, so we flush the buffer
|
||||
|
||||
@@ -27,14 +27,14 @@ import android.os.RemoteException;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.view.ContextThemeWrapper;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableProxy;
|
||||
import org.sufficientlysecure.keychain.network.orbot.OrbotHelper;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
* Simply encapsulates a dialog. If orbot is not installed, it shows an install dialog, else a
|
||||
@@ -165,7 +165,7 @@ public class OrbotRequiredDialogActivity extends FragmentActivity
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(Constants.TAG, "Could not deliver message", e);
|
||||
Timber.e(e, "Could not deliver message");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,9 +68,10 @@ import org.sufficientlysecure.keychain.service.input.RequiredInputParcel.Require
|
||||
import org.sufficientlysecure.keychain.ui.dialog.CustomAlertDialogBuilder;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.ui.widget.CacheTTLSpinner;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
* We can not directly create a dialog on the application context.
|
||||
@@ -124,7 +125,7 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
||||
finish();
|
||||
}
|
||||
} catch (NotFoundException e) {
|
||||
Log.e(Constants.TAG, "Key not found?!", e);
|
||||
Timber.e(e, "Key not found?!");
|
||||
setResult(RESULT_CANCELED);
|
||||
finish();
|
||||
}
|
||||
@@ -523,19 +524,19 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
// cache the new passphrase as specified in CryptoInputParcel
|
||||
Log.d(Constants.TAG, "Everything okay!");
|
||||
Timber.d("Everything okay!");
|
||||
|
||||
if (mRequiredInput.mSkipCaching) {
|
||||
Log.d(Constants.TAG, "Not caching entered passphrase!");
|
||||
Timber.d("Not caching entered passphrase!");
|
||||
} else {
|
||||
Log.d(Constants.TAG, "Caching entered passphrase");
|
||||
Timber.d("Caching entered passphrase");
|
||||
|
||||
try {
|
||||
PassphraseCacheService.addCachedPassphrase(getActivity(),
|
||||
unlockedKey.getRing().getMasterKeyId(), unlockedKey.getKeyId(), passphrase,
|
||||
unlockedKey.getRing().getPrimaryUserIdWithFallback(), timeToLiveSeconds);
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "adding of a passphrase failed", e);
|
||||
Timber.e(e, "adding of a passphrase failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.util.QrCodeUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class QrCodeViewActivity extends BaseActivity {
|
||||
|
||||
@@ -59,7 +60,7 @@ public class QrCodeViewActivity extends BaseActivity {
|
||||
|
||||
Uri dataUri = getIntent().getData();
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
ActivityCompat.finishAfterTransition(QrCodeViewActivity.this);
|
||||
return;
|
||||
}
|
||||
@@ -78,7 +79,7 @@ public class QrCodeViewActivity extends BaseActivity {
|
||||
try {
|
||||
byte[] blob = keyRepository.getCachedPublicKeyRing(dataUri).getFingerprint();
|
||||
if (blob == null) {
|
||||
Log.e(Constants.TAG, "key not found!");
|
||||
Timber.e("key not found!");
|
||||
Notify.create(this, R.string.error_key_not_found, Style.ERROR).show();
|
||||
ActivityCompat.finishAfterTransition(QrCodeViewActivity.this);
|
||||
}
|
||||
@@ -101,7 +102,7 @@ public class QrCodeViewActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
Notify.create(this, R.string.error_key_not_found, Style.ERROR).show();
|
||||
ActivityCompat.finishAfterTransition(QrCodeViewActivity.this);
|
||||
}
|
||||
|
||||
@@ -48,8 +48,9 @@ import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableFileCache;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||
public class SafeSlingerActivity extends BaseActivity
|
||||
@@ -115,7 +116,7 @@ public class SafeSlingerActivity extends BaseActivity
|
||||
slingerIntent.putExtra(ExchangeConfig.extra.HOST_NAME, Constants.SAFESLINGER_SERVER);
|
||||
startActivityForResult(slingerIntent, REQUEST_CODE_SAFE_SLINGER);
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "personal key not found", e);
|
||||
Timber.e(e, "personal key not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ public class SafeSlingerActivity extends BaseActivity
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d(Constants.TAG, "importKeys started");
|
||||
Timber.d("importKeys started");
|
||||
|
||||
// instead of giving the entries by Intent extra, cache them into a
|
||||
// file to prevent Java Binder problems on heavy imports
|
||||
@@ -153,7 +154,7 @@ public class SafeSlingerActivity extends BaseActivity
|
||||
mKeyserver = null;
|
||||
mOperationHelper.cryptoOperation();
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Problem writing cache file", e);
|
||||
Timber.e(e, "Problem writing cache file");
|
||||
Notify.create(this, "Problem writing cache file!", Notify.Style.ERROR).show();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.widget.TextView;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
import nordpol.android.NfcGuideView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.securitytoken.operations.ModifyPinTokenOp;
|
||||
import org.sufficientlysecure.keychain.securitytoken.SecurityTokenConnection;
|
||||
@@ -38,9 +37,9 @@ import org.sufficientlysecure.keychain.securitytoken.SecurityTokenInfo;
|
||||
import org.sufficientlysecure.keychain.service.input.SecurityTokenChangePinParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseSecurityTokenActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.OrientationUtils;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
@@ -74,7 +73,7 @@ public class SecurityTokenChangePinOperationActivity extends BaseSecurityTokenAc
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.d(Constants.TAG, "NfcOperationActivity.onCreate");
|
||||
Timber.d("NfcOperationActivity.onCreate");
|
||||
|
||||
nfcGuideView = (NfcGuideView) findViewById(R.id.nfc_guide_view);
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.widget.TextView;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
import nordpol.android.NfcGuideView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKey;
|
||||
@@ -52,9 +51,10 @@ import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseSecurityTokenActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.OrientationUtils;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
* This class provides a communication interface to OpenPGP applications on ISO SmartCard compliant
|
||||
@@ -92,7 +92,7 @@ public class SecurityTokenOperationActivity extends BaseSecurityTokenActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.d(Constants.TAG, "NfcOperationActivity.onCreate");
|
||||
Timber.d("NfcOperationActivity.onCreate");
|
||||
|
||||
nfcGuideView = (NfcGuideView) findViewById(R.id.nfc_guide_view);
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import org.sufficientlysecure.keychain.network.orbot.OrbotHelper;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
@@ -262,7 +262,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
if ((Boolean) newValue) {
|
||||
boolean installed = OrbotHelper.isOrbotInstalled(activity);
|
||||
if (!installed) {
|
||||
Log.d(Constants.TAG, "Prompting to install Tor");
|
||||
Timber.d("Prompting to install Tor");
|
||||
OrbotHelper.getPreferenceInstallDialogFragment().show(activity.getFragmentManager(),
|
||||
"installDialog");
|
||||
// don't let the user check the box until he's installed orbot
|
||||
|
||||
@@ -28,7 +28,6 @@ import android.view.View.OnClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.UploadResult;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
@@ -36,8 +35,8 @@ import org.sufficientlysecure.keychain.service.UploadKeyringParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -86,7 +85,7 @@ public class UploadKeyActivity extends BaseActivity
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Intent data missing. Should be Uri of key!");
|
||||
Timber.e("Intent data missing. Should be Uri of key!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ import android.hardware.usb.UsbDevice;
|
||||
import android.hardware.usb.UsbManager;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class UsbEventReceiverActivity extends Activity {
|
||||
public static final String ACTION_USB_PERMISSION =
|
||||
@@ -47,7 +47,7 @@ public class UsbEventReceiverActivity extends Activity {
|
||||
if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(intent.getAction())) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
|
||||
Log.d(Constants.TAG, "Requesting permission for " + usbDevice.getDeviceName());
|
||||
Timber.d("Requesting permission for " + usbDevice.getDeviceName());
|
||||
usbManager.requestPermission(usbDevice,
|
||||
PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.WrappedSignature;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
@@ -45,7 +44,8 @@ import org.sufficientlysecure.keychain.provider.KeyRepository;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.ViewKeyActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewCertActivity extends BaseActivity
|
||||
implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -100,7 +100,7 @@ public class ViewCertActivity extends BaseActivity
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Intent data missing. Should be Uri of key!");
|
||||
Timber.e("Intent data missing. Should be Uri of key!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ public class ViewCertActivity extends BaseActivity
|
||||
startActivity(viewIntent);
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
// TODO notify user of this, maybe offer download?
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -40,7 +40,6 @@ import android.view.animation.OvershootInterpolator;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.astuetz.PagerSlidingTabStrip;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult;
|
||||
import org.sufficientlysecure.keychain.provider.KeyRepository;
|
||||
@@ -50,7 +49,8 @@ import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.ViewKeyActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.ContactHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewKeyAdvActivity extends BaseActivity implements
|
||||
LoaderCallbacks<Cursor>, OnPageChangeListener {
|
||||
@@ -95,14 +95,14 @@ public class ViewKeyAdvActivity extends BaseActivity implements
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be uri of key!");
|
||||
Timber.e("Data missing. Should be uri of key!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (mDataUri.getHost().equals(ContactsContract.AUTHORITY)) {
|
||||
mDataUri = new ContactHelper(this).dataUriFromContactUri(mDataUri);
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Contact Data missing. Should be uri of key!");
|
||||
Timber.e("Contact Data missing. Should be uri of key!");
|
||||
Toast.makeText(this, R.string.error_contacts_key_id_missing, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
return;
|
||||
|
||||
@@ -30,12 +30,12 @@ import android.view.LayoutInflater;
|
||||
|
||||
import com.tonicartos.superslim.LayoutManager;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.CertSectionedListAdapter;
|
||||
import org.sufficientlysecure.keychain.ui.base.RecyclerFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewKeyAdvCertsFragment extends RecyclerFragment<CertSectionedListAdapter>
|
||||
implements LoaderManager.LoaderCallbacks<Cursor>, CertSectionedListAdapter.CertListListener {
|
||||
@@ -68,7 +68,7 @@ public class ViewKeyAdvCertsFragment extends RecyclerFragment<CertSectionedListA
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
} else {
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.util.QrCodeUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -202,7 +202,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
.getCachedPublicKeyRing(dataUri)
|
||||
.extractOrGetMasterKeyId();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
Intent safeSlingerIntent = new Intent(getActivity(), SafeSlingerActivity.class);
|
||||
safeSlingerIntent.putExtra(SafeSlingerActivity.EXTRA_MASTER_KEY_ID, keyId);
|
||||
@@ -218,7 +218,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
CachedPublicKeyRing cachedPublicKeyRing = keyRepository.getCachedPublicKeyRing(masterKeyId);
|
||||
authSubKeyId = cachedPublicKeyRing.getSecretAuthenticationId();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
return authSubKeyId != Constants.key.none;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, contentUri);
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.e(Constants.TAG, "Error creating temporary key share file!", e);
|
||||
Timber.e(e, "Error creating temporary key share file!");
|
||||
// no need for a snackbar because one sharing option doesn't work
|
||||
// Notify.create(getActivity(), R.string.error_temp_file, Notify.Style.ERROR).show();
|
||||
}
|
||||
@@ -306,10 +306,10 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
|
||||
startActivity(shareChooser);
|
||||
} catch (PgpGeneralException | IOException | NoSuchAlgorithmException e) {
|
||||
Log.e(Constants.TAG, "error processing key!", e);
|
||||
Timber.e(e, "error processing key!");
|
||||
Notify.create(activity, R.string.error_key_processing, Notify.Style.ERROR).show();
|
||||
} catch (PgpKeyNotFoundException | KeyRepository.NotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
Notify.create(activity, R.string.error_key_not_found, Notify.Style.ERROR).show();
|
||||
}
|
||||
}
|
||||
@@ -375,7 +375,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -493,7 +493,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
||||
.getCachedPublicKeyRing(mDataUri)
|
||||
.extractOrGetMasterKeyId();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
Notify.create(getActivity(), "key not found", Style.ERROR).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,9 +26,8 @@ import android.view.ViewGroup;
|
||||
import org.markdown4j.Markdown4jProcessor;
|
||||
import org.sufficientlysecure.htmltextview.HtmlResImageGetter;
|
||||
import org.sufficientlysecure.htmltextview.HtmlTextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -47,7 +46,7 @@ public class ViewKeyAdvStartFragment extends Fragment {
|
||||
getActivity().getResources().openRawResource(R.raw.advanced));
|
||||
textView.setHtml(html, new HtmlResImageGetter(textView));
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IOException", e);
|
||||
Timber.e(e, "IOException");
|
||||
}
|
||||
|
||||
return view;
|
||||
|
||||
@@ -39,7 +39,6 @@ import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
|
||||
@@ -54,7 +53,8 @@ import org.sufficientlysecure.keychain.ui.base.LoaderFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.AddSubkeyDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.EditSubkeyDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.EditSubkeyExpiryDialogFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewKeyAdvSubkeysFragment extends LoaderFragment implements
|
||||
LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -127,7 +127,7 @@ public class ViewKeyAdvSubkeysFragment extends LoaderFragment implements
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
|
||||
@@ -53,7 +52,8 @@ import org.sufficientlysecure.keychain.ui.dialog.AddUserIdDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.EditUserIdDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.SetPassphraseDialogFragment;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.UserIdInfoDialogFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewKeyAdvUserIdsFragment extends LoaderFragment implements
|
||||
LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -220,7 +220,7 @@ public class ViewKeyAdvUserIdsFragment extends LoaderFragment implements
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public class ViewKeyAdvUserIdsFragment extends LoaderFragment implements
|
||||
private void loadData(Uri dataUri) {
|
||||
mDataUri = dataUri;
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri);
|
||||
Timber.i("mDataUri: " + mDataUri);
|
||||
|
||||
mUserIdsAdapter = new UserIdsAdapter(getActivity(), null, 0);
|
||||
mUserIds.setAdapter(mUserIdsAdapter);
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.textuality.keybase.lib.KeybaseQuery;
|
||||
import com.textuality.keybase.lib.Proof;
|
||||
import com.textuality.keybase.lib.User;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.KeybaseVerificationResult;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
@@ -52,11 +51,11 @@ import org.sufficientlysecure.keychain.service.KeybaseVerificationParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.base.LoaderFragment;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.network.OkHttpKeybaseClient;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableProxy;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import org.sufficientlysecure.keychain.network.orbot.OrbotHelper;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
@@ -124,7 +123,7 @@ public class ViewKeyKeybaseFragment extends LoaderFragment implements
|
||||
|
||||
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
|
||||
if (dataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
|
||||
Timber.e("Data missing. Should be Uri of key!");
|
||||
getActivity().finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.databinding.ImportKeysListItemBinding;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
@@ -53,8 +52,9 @@ import org.sufficientlysecure.keychain.ui.keyview.ViewKeyActivity;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableFileCache;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.ViewHolder>
|
||||
implements ImportKeysResultListener {
|
||||
@@ -230,7 +230,7 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
new ParcelableFileCache<>(mActivity, ImportOperation.CACHE_FILE_NAME);
|
||||
cache.writeCache(keyRing);
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Problem writing cache file", e);
|
||||
Timber.e(e, "Problem writing cache file");
|
||||
Notify.create(mActivity, "Problem writing cache file!", Notify.Style.ERROR).show();
|
||||
}
|
||||
|
||||
@@ -260,12 +260,12 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
}
|
||||
|
||||
boolean resultStatus = result.success();
|
||||
Log.e(Constants.TAG, "getKey result: " + resultStatus);
|
||||
Timber.e("getKey result: " + resultStatus);
|
||||
if (resultStatus) {
|
||||
ArrayList<CanonicalizedKeyRing> canKeyRings = result.mCanonicalizedKeyRings;
|
||||
if (canKeyRings.size() == 1) {
|
||||
CanonicalizedKeyRing keyRing = canKeyRings.get(0);
|
||||
Log.e(Constants.TAG, "Key ID: " + keyRing.getMasterKeyId() +
|
||||
Timber.e("Key ID: " + keyRing.getMasterKeyId() +
|
||||
"| isRev: " + keyRing.isRevoked() + "| isExp: " + keyRing.isExpired()
|
||||
+ "| isSec: " + keyRing.isSecure());
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.futuremind.recyclerviewfastscroll.SectionTitleProvider;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
@@ -46,7 +45,7 @@ import org.sufficientlysecure.keychain.ui.util.Highlighter;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.adapter.CursorAdapter;
|
||||
import org.sufficientlysecure.keychain.ui.util.adapter.SectionCursorAdapter;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -221,7 +220,7 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
||||
return VIEW_ITEM_TYPE_DUMMY;
|
||||
}
|
||||
} else {
|
||||
Log.w(Constants.TAG, "Unable to determine key view type. "
|
||||
Timber.w("Unable to determine key view type. "
|
||||
+ "Reason: Could not move cursor over dataset.");
|
||||
}
|
||||
|
||||
@@ -325,7 +324,7 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.w(Constants.TAG, "Unable to determine section title. "
|
||||
Timber.w("Unable to determine section title. "
|
||||
+ "Reason: Could not move cursor over dataset.");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,7 @@ import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.CheckBox;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.os.Bundle;
|
||||
import nordpol.android.OnDiscoveredTagListener;
|
||||
import nordpol.android.TagDispatcher;
|
||||
import nordpol.android.TagDispatcherBuilder;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.securitytoken.CardException;
|
||||
import org.sufficientlysecure.keychain.securitytoken.NfcTransport;
|
||||
@@ -53,8 +52,8 @@ import org.sufficientlysecure.keychain.ui.dialog.FidesmoInstallDialog;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.FidesmoPgpInstallDialog;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
@@ -83,7 +82,7 @@ public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
*/
|
||||
protected void doSecurityTokenInBackground(SecurityTokenConnection stConnection) throws IOException {
|
||||
tokenInfo = stConnection.readTokenInfo();
|
||||
Log.d(Constants.TAG, "Security Token: " + tokenInfo);
|
||||
Timber.d("Security Token: " + tokenInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,7 +226,7 @@ public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
}
|
||||
|
||||
private void handleSecurityTokenError(SecurityTokenConnection stConnection, IOException e) {
|
||||
Log.d(Constants.TAG, "Exception in handleSecurityTokenError", e);
|
||||
Timber.d(e, "Exception in handleSecurityTokenError");
|
||||
|
||||
if (e instanceof UnsupportedUsbTokenException) {
|
||||
onSecurityTokenError(getString(R.string.security_token_not_supported));
|
||||
@@ -387,7 +386,7 @@ public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
*/
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Log.d(Constants.TAG, "BaseNfcActivity.onPause");
|
||||
Timber.d("BaseNfcActivity.onPause");
|
||||
|
||||
mNfcTagDispatcher.disableExclusiveNfc();
|
||||
}
|
||||
@@ -398,7 +397,7 @@ public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
*/
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Log.d(Constants.TAG, "BaseNfcActivity.onResume");
|
||||
Timber.d("BaseNfcActivity.onResume");
|
||||
mNfcTagDispatcher.enableExclusiveNfc();
|
||||
}
|
||||
|
||||
@@ -474,7 +473,7 @@ public abstract class BaseSecurityTokenActivity extends BaseActivity
|
||||
mPackageManager.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
|
||||
mAppInstalled = true;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(Constants.TAG, "App not installed on Android device");
|
||||
Timber.e("App not installed on Android device");
|
||||
mAppInstalled = false;
|
||||
}
|
||||
return mAppInstalled;
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.operations.results.InputPendingResult;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult;
|
||||
import org.sufficientlysecure.keychain.service.KeychainService;
|
||||
@@ -44,7 +43,8 @@ import org.sufficientlysecure.keychain.ui.OrbotRequiredDialogActivity;
|
||||
import org.sufficientlysecure.keychain.ui.PassphraseDialogActivity;
|
||||
import org.sufficientlysecure.keychain.ui.RetryUploadDialogActivity;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
* Designed to be integrated into activities or fragments used for CryptoOperations.
|
||||
@@ -204,13 +204,13 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||
* @return true if requestCode was recognized, false otherwise
|
||||
*/
|
||||
public boolean handleActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
Log.d(Constants.TAG, "received activity result in OperationHelper");
|
||||
Timber.d("received activity result in OperationHelper");
|
||||
|
||||
if ((requestCode & HELPER_ID_BITMASK) != mHelperId) {
|
||||
// this wasn't meant for us to handle
|
||||
return false;
|
||||
}
|
||||
Log.d(Constants.TAG, "handling activity result in OperationHelper");
|
||||
Timber.d("handling activity result in OperationHelper");
|
||||
// filter out mHelperId from requestCode
|
||||
requestCode ^= mHelperId;
|
||||
|
||||
@@ -348,7 +348,7 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||
}
|
||||
|
||||
private void onHandleResult(final OperationResult result) {
|
||||
Log.d(Constants.TAG, "Handling result in OperationHelper success: " + result.success());
|
||||
Timber.d("Handling result in OperationHelper success: " + result.success());
|
||||
|
||||
if (result instanceof InputPendingResult) {
|
||||
InputPendingResult pendingResult = (InputPendingResult) result;
|
||||
|
||||
@@ -31,9 +31,9 @@ import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/*
|
||||
* Implementation of taken from the sourcecode of
|
||||
@@ -262,7 +262,7 @@ public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
private void checkDataSet() {
|
||||
boolean empty = treatAsEmpty(getItemCount());
|
||||
|
||||
Log.d("RecyclerFragment", "Dataset change detected! Count: "
|
||||
Timber.d("Dataset change detected! Count: "
|
||||
+ getItemCount() + ", Empty: " + empty);
|
||||
|
||||
if (emptyView != null) {
|
||||
@@ -302,7 +302,7 @@ public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
if (emptyView instanceof TextView) {
|
||||
((TextView) emptyView).setText(text);
|
||||
} else {
|
||||
Log.e(Constants.TAG, "Cannot set empty text on a view that is null" +
|
||||
Timber.e("Cannot set empty text on a view that is null" +
|
||||
"or not an instance of android.view.View!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,15 +51,15 @@ import android.widget.TextView.OnEditorActionListener;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
|
||||
import org.sufficientlysecure.keychain.network.OkHttpClientFactory;
|
||||
import org.sufficientlysecure.keychain.network.TlsCertificatePinning;
|
||||
import org.sufficientlysecure.keychain.network.orbot.OrbotHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableProxy;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class AddEditKeyserverDialogFragment extends DialogFragment implements OnEditorActionListener {
|
||||
private static final String ARG_MESSENGER = "arg_messenger";
|
||||
@@ -369,7 +369,7 @@ public class AddEditKeyserverDialogFragment extends DialogFragment implements On
|
||||
TlsCertificatePinning tlsCertificatePinning = new TlsCertificatePinning(keyserverUriHttp.toURL());
|
||||
boolean isPinAvailable = tlsCertificatePinning.isPinAvailable();
|
||||
if (onlyTrustedKeyserver && !isPinAvailable) {
|
||||
Log.w(Constants.TAG, "No pinned certificate for this host in OpenKeychain's assets.");
|
||||
Timber.w("No pinned certificate for this host in OpenKeychain's assets.");
|
||||
reason = VerifyReturn.NO_PINNED_CERTIFICATE;
|
||||
return reason;
|
||||
}
|
||||
@@ -387,10 +387,10 @@ public class AddEditKeyserverDialogFragment extends DialogFragment implements On
|
||||
clientTor.newCall(new Request.Builder().url(keyserverUriOnion.toURL()).build()).execute();
|
||||
}
|
||||
} catch (MalformedURLException | URISyntaxException e) {
|
||||
Log.w(Constants.TAG, "Invalid keyserver URL entered by user.");
|
||||
Timber.w("Invalid keyserver URL entered by user.");
|
||||
reason = VerifyReturn.INVALID_URL;
|
||||
} catch (IOException e) {
|
||||
Log.w(Constants.TAG, "Could not connect to entered keyserver url");
|
||||
Timber.w("Could not connect to entered keyserver url");
|
||||
reason = VerifyReturn.CONNECTION_FAILED;
|
||||
}
|
||||
|
||||
@@ -450,9 +450,9 @@ public class AddEditKeyserverDialogFragment extends DialogFragment implements On
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,10 @@ import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.EncryptFilesFragment;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class AddEditSmartPGPAuthorityDialogFragment extends DialogFragment implements OnEditorActionListener {
|
||||
@@ -305,9 +304,9 @@ public class AddEditSmartPGPAuthorityDialogFragment extends DialogFragment imple
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.widget.EmailEditText;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class AddEmailDialogFragment extends DialogFragment implements OnEditorActionListener {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -187,9 +187,9 @@ public class AddEmailDialogFragment extends DialogFragment implements OnEditorAc
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,9 +208,9 @@ public class AddEmailDialogFragment extends DialogFragment implements OnEditorAc
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,12 +38,12 @@ import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.ui.widget.EmailEditText;
|
||||
import org.sufficientlysecure.keychain.ui.widget.NameEditText;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class AddUserIdDialogFragment extends DialogFragment implements OnEditorActionListener {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -193,9 +193,9 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,9 +214,9 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,9 @@ import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.FileHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -107,7 +106,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d(Constants.TAG, "Catched Exception, can happen when delete is not supported!", e);
|
||||
Timber.d(e, "Catched Exception, can happen when delete is not supported!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +115,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d(Constants.TAG, "Catched Exception, can happen when delete is not supported!", e);
|
||||
Timber.d(e, "Catched Exception, can happen when delete is not supported!");
|
||||
}
|
||||
|
||||
// some Uri's a ContentResolver fails to delete is handled by the java.io.File's delete
|
||||
|
||||
@@ -25,9 +25,9 @@ import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditSubkeyDialogFragment extends DialogFragment {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -128,9 +128,9 @@ public class EditSubkeyDialogFragment extends DialogFragment {
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,14 +35,12 @@ import android.widget.DatePicker;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class EditSubkeyExpiryDialogFragment extends DialogFragment {
|
||||
@@ -227,9 +225,9 @@ public class EditSubkeyExpiryDialogFragment extends DialogFragment {
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EditUserIdDialogFragment extends DialogFragment {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -130,9 +130,9 @@ public class EditUserIdDialogFragment extends DialogFragment {
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class FidesmoPgpInstallDialog extends DialogFragment {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class FidesmoPgpInstallDialog extends DialogFragment {
|
||||
Uri.parse(mPgpInstallServiceUrl));
|
||||
startActivity(mPgpServiceIntent);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(Constants.TAG, "Error when parsing URI");
|
||||
Timber.e("Error when parsing URI");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ import android.view.ContextThemeWrapper;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.network.orbot.OrbotHelper;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
* displays a dialog asking the user to enable Tor
|
||||
@@ -89,9 +89,9 @@ public class OrbotStartDialogFragment extends DialogFragment {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -105,9 +105,9 @@ public class OrbotStartDialogFragment extends DialogFragment {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -153,9 +153,9 @@ public class OrbotStartDialogFragment extends DialogFragment {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -41,11 +40,11 @@ import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.widget.PassphraseEditText;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class SetPassphraseDialogFragment extends DialogFragment implements OnEditorActionListener {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -236,9 +235,9 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
|
||||
try {
|
||||
mMessenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ import android.widget.TextSwitcher;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.Constants.key;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.linked.LinkedAttribute;
|
||||
@@ -75,7 +74,8 @@ import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.util.SubtleAttentionSeeker;
|
||||
import org.sufficientlysecure.keychain.ui.widget.CertListWidget;
|
||||
import org.sufficientlysecure.keychain.ui.widget.CertifyKeySpinner;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class LinkedIdViewFragment extends CryptoOperationFragment implements
|
||||
LoaderManager.LoaderCallbacks<Cursor>, OnBackStackChangedListener {
|
||||
@@ -170,7 +170,7 @@ public class LinkedIdViewFragment extends CryptoOperationFragment implements
|
||||
loadIdentity(linkedId, certStatus);
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "error parsing identity", e);
|
||||
Timber.e(e, "error parsing identity");
|
||||
Notify.create(getActivity(), "Error parsing identity!",
|
||||
Notify.LENGTH_LONG, Style.ERROR).show();
|
||||
finishFragment();
|
||||
|
||||
@@ -106,9 +106,9 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.util.QrCodeUtils;
|
||||
import org.sufficientlysecure.keychain.util.ContactHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
||||
@@ -248,21 +248,21 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Data missing. Should be uri of key!");
|
||||
Timber.e("Data missing. Should be uri of key!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (mDataUri.getHost().equals(ContactsContract.AUTHORITY)) {
|
||||
mDataUri = new ContactHelper(this).dataUriFromContactUri(mDataUri);
|
||||
if (mDataUri == null) {
|
||||
Log.e(Constants.TAG, "Contact Data missing. Should be uri of key!");
|
||||
Timber.e("Contact Data missing. Should be uri of key!");
|
||||
Toast.makeText(this, R.string.error_contacts_key_id_missing, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Log.i(Constants.TAG, "mDataUri: " + mDataUri);
|
||||
Timber.i("mDataUri: " + mDataUri);
|
||||
|
||||
mActionEncryptFile.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -665,7 +665,7 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
||||
// used instead of startActivity set actionbar based on callingPackage
|
||||
startActivityForResult(intent, 0);
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
||||
.getCachedPublicKeyRing(dataUri)
|
||||
.extractOrGetMasterKeyId();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
Timber.e(e, "key not found!");
|
||||
}
|
||||
Intent safeSlingerIntent = new Intent(this, SafeSlingerActivity.class);
|
||||
safeSlingerIntent.putExtra(SafeSlingerActivity.EXTRA_MASTER_KEY_ID, keyId);
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.UserPackets;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.IdentityLoader.IdentityInfo;
|
||||
import org.sufficientlysecure.keychain.ui.util.PackageIconGetter;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class IdentityLoader extends AsyncTaskLoader<List<IdentityInfo>> {
|
||||
@@ -122,7 +123,7 @@ public class IdentityLoader extends AsyncTaskLoader<List<IdentityInfo>> {
|
||||
Cursor cursor = contentResolver.query(ApiAutocryptPeer.buildByMasterKeyId(masterKeyId),
|
||||
TRUST_IDS_PROJECTION, null, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading trust ids!");
|
||||
Timber.e("Error loading trust ids!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -180,7 +181,7 @@ public class IdentityLoader extends AsyncTaskLoader<List<IdentityInfo>> {
|
||||
Cursor cursor = contentResolver.query(UserPackets.buildLinkedIdsUri(masterKeyId),
|
||||
USER_PACKETS_PROJECTION, USER_IDS_WHERE, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,7 +199,7 @@ public class IdentityLoader extends AsyncTaskLoader<List<IdentityInfo>> {
|
||||
identities.add(identityInfo);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "Failed parsing uri attribute", e);
|
||||
Timber.e(e, "Failed parsing uri attribute");
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
@@ -210,7 +211,7 @@ public class IdentityLoader extends AsyncTaskLoader<List<IdentityInfo>> {
|
||||
Cursor cursor = contentResolver.query(UserPackets.buildUserIdsUri(masterKeyId),
|
||||
USER_PACKETS_PROJECTION, USER_IDS_WHERE, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.UpdatedKeys;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.KeyserverStatusLoader.KeyserverStatus;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class KeyserverStatusLoader extends AsyncTaskLoader<KeyserverStatus> {
|
||||
@@ -62,7 +63,7 @@ public class KeyserverStatusLoader extends AsyncTaskLoader<KeyserverStatus> {
|
||||
Cursor cursor = contentResolver.query(UpdatedKeys.CONTENT_URI, PROJECTION,
|
||||
UpdatedKeys.MASTER_KEY_ID + " = ?", new String[] { Long.toString(masterKeyId) }, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.sufficientlysecure.keychain.pgp.PgpSecurityConstants;
|
||||
import org.sufficientlysecure.keychain.pgp.SecurityProblem.KeySecurityProblem;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.Keys;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.SubkeyStatusLoader.KeySubkeyStatus;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class SubkeyStatusLoader extends AsyncTaskLoader<KeySubkeyStatus> {
|
||||
@@ -86,7 +87,7 @@ public class SubkeyStatusLoader extends AsyncTaskLoader<KeySubkeyStatus> {
|
||||
public KeySubkeyStatus loadInBackground() {
|
||||
Cursor cursor = contentResolver.query(Keys.buildKeysUri(masterKeyId), PROJECTION, null, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import android.util.Log;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.SystemContactInfoLoader.SystemContactInfo;
|
||||
import org.sufficientlysecure.keychain.util.ContactHelper;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class SystemContactInfoLoader extends AsyncTaskLoader<SystemContactInfo> {
|
||||
@@ -72,7 +73,7 @@ public class SystemContactInfoLoader extends AsyncTaskLoader<SystemContactInfo>
|
||||
}, null);
|
||||
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||
import android.support.v4.content.Loader;
|
||||
import android.view.View;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.provider.AutocryptPeerDataAccessObject;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
@@ -46,8 +45,8 @@ import org.sufficientlysecure.keychain.ui.keyview.loader.IdentityLoader.LinkedId
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.IdentityLoader.TrustIdInfo;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.IdentityLoader.UserIdInfo;
|
||||
import org.sufficientlysecure.keychain.ui.linked.LinkedIdWizard;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class IdentitiesPresenter implements LoaderCallbacks<List<IdentityInfo>> {
|
||||
@@ -148,7 +147,7 @@ public class IdentitiesPresenter implements LoaderCallbacks<List<IdentityInfo>>
|
||||
Uri dataUri = UserPackets.buildLinkedIdsUri(KeyRings.buildGenericKeyRingUri(masterKeyId));
|
||||
frag = LinkedIdViewFragment.newInstance(dataUri, info.getRank(), isSecret, masterKeyId);
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "IOException", e);
|
||||
Timber.e(e, "IOException");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -179,7 +178,7 @@ public class IdentitiesPresenter implements LoaderCallbacks<List<IdentityInfo>>
|
||||
public void onClickForgetIdentity(int position) {
|
||||
TrustIdInfo info = (TrustIdInfo) identitiesAdapter.getInfo(position);
|
||||
if (info == null) {
|
||||
Log.e(Constants.TAG, "got a 'forget' click on a bad trust id");
|
||||
Timber.e("got a 'forget' click on a bad trust id");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,9 @@ import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.content.Loader;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.SystemContactInfoLoader;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.loader.SystemContactInfoLoader.SystemContactInfo;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class SystemContactPresenter implements LoaderCallbacks<SystemContactInfo> {
|
||||
@@ -67,7 +66,7 @@ public class SystemContactPresenter implements LoaderCallbacks<SystemContactInfo
|
||||
public void startLoader(LoaderManager loaderManager) {
|
||||
if (ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS)
|
||||
== PackageManager.PERMISSION_DENIED) {
|
||||
Log.w(Constants.TAG, "loading linked system contact not possible READ_CONTACTS permission denied!");
|
||||
Timber.w("loading linked system contact not possible READ_CONTACTS permission denied!");
|
||||
view.hideLinkedSystemContact();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.bouncycastle.util.encoders.Hex;
|
||||
import org.sufficientlysecure.keychain.BuildConfig;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.linked.LinkedAttribute;
|
||||
import org.sufficientlysecure.keychain.linked.resources.GithubResource;
|
||||
@@ -79,7 +78,8 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify.Style;
|
||||
import org.sufficientlysecure.keychain.ui.widget.StatusIndicator;
|
||||
import org.sufficientlysecure.keychain.ui.widget.StatusIndicator.Status;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKeyringParcel,EditKeyResult> {
|
||||
|
||||
@@ -234,7 +234,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d(Constants.TAG, "response: " + result);
|
||||
Timber.d("response: " + result);
|
||||
|
||||
if (result == null || result.optString("access_token", null) == null) {
|
||||
setState(State.AUTH_ERROR);
|
||||
@@ -314,7 +314,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe
|
||||
protected void onPostExecute(JSONObject result) {
|
||||
super.onPostExecute(result);
|
||||
|
||||
Log.d(Constants.TAG, "response: " + result);
|
||||
Timber.d("response: " + result);
|
||||
|
||||
Activity activity = getActivity();
|
||||
if (activity == null) {
|
||||
@@ -551,7 +551,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe
|
||||
}
|
||||
|
||||
if (uri.getQueryParameter("error") != null) {
|
||||
Log.i(Constants.TAG, "got oauth error: " + uri.getQueryParameter("error"));
|
||||
Timber.i("got oauth error: " + uri.getQueryParameter("error"));
|
||||
auth_dialog.dismiss();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
|
||||
@@ -38,7 +37,8 @@ import org.sufficientlysecure.keychain.provider.KeyRepository;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class LinkedIdWizard extends BaseActivity {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class LinkedIdWizard extends BaseActivity {
|
||||
uri = KeychainContract.KeyRings.buildUnifiedKeyRingUri(uri);
|
||||
CachedPublicKeyRing ring = KeyRepository.create(this).getCachedPublicKeyRing(uri);
|
||||
if (!ring.hasAnySecret()) {
|
||||
Log.e(Constants.TAG, "Linked Identities can only be added to secret keys!");
|
||||
Timber.e("Linked Identities can only be added to secret keys!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class LinkedIdWizard extends BaseActivity {
|
||||
mMasterKeyId = ring.extractOrGetMasterKeyId();
|
||||
mFingerprint = ring.getFingerprint();
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "Invalid uri given, key does not exist!");
|
||||
Timber.e("Invalid uri given, key does not exist!");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ import org.sufficientlysecure.keychain.ui.token.PublicKeyRetrievalLoader.KeyRetr
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableProxy;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrievalResult> {
|
||||
@@ -204,7 +205,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
|
||||
log.add(LogType.MSG_RET_URI_ERROR_NO_MATCH, 1);
|
||||
} catch (IOException e) {
|
||||
log.add(LogType.MSG_RET_URI_ERROR_FETCH, 1);
|
||||
Log.e(Constants.TAG, "error retrieving key from uri", e);
|
||||
Timber.e(e, "error retrieving key from uri");
|
||||
}
|
||||
|
||||
return KeyRetrievalResult.createWithError(log);
|
||||
@@ -245,7 +246,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
|
||||
log.add(LogType.MSG_RET_KS_ERROR_NOT_FOUND, 1);
|
||||
} catch (QueryFailedException | IOException | PgpGeneralException e) {
|
||||
log.add(LogType.MSG_RET_KS_ERROR, 1);
|
||||
Log.e(Constants.TAG, "error retrieving key from keyserver", e);
|
||||
Timber.e(e, "error retrieving key from keyserver");
|
||||
}
|
||||
|
||||
return KeyRetrievalResult.createWithError(log);
|
||||
@@ -290,7 +291,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
|
||||
}
|
||||
log.add(LogType.MSG_RET_CURI_ERROR_NO_MATCH, 1);
|
||||
} catch (IOException e) {
|
||||
Log.e(Constants.TAG, "error reading keyring from file", e);
|
||||
Timber.e(e, "error reading keyring from file");
|
||||
log.add(LogType.MSG_RET_CURI_ERROR_IO, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.util.Log;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.ui.transfer.loader.SecretKeyLoader.SecretKeyItem;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class SecretKeyLoader extends AsyncTaskLoader<List<SecretKeyItem>> {
|
||||
@@ -63,7 +64,7 @@ public class SecretKeyLoader extends AsyncTaskLoader<List<SecretKeyItem>> {
|
||||
String where = KeyRings.HAS_ANY_SECRET + " = 1";
|
||||
Cursor cursor = contentResolver.query(KeyRings.buildUnifiedKeyRingsUri(), PROJECTION, where, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(Constants.TAG, "Error loading key items!");
|
||||
Timber.e("Error loading key items!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ import android.view.LayoutInflater;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
import org.openintents.openpgp.util.OpenPgpUtils.UserId;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.keyimport.ParcelableKeyRing;
|
||||
import org.sufficientlysecure.keychain.network.KeyTransferInteractor;
|
||||
import org.sufficientlysecure.keychain.network.KeyTransferInteractor.KeyTransferCallback;
|
||||
@@ -62,7 +61,7 @@ import org.sufficientlysecure.keychain.ui.transfer.view.ReceivedSecretKeyList.Re
|
||||
import org.sufficientlysecure.keychain.ui.transfer.view.TransferSecretKeyList.OnClickTransferKeyListener;
|
||||
import org.sufficientlysecure.keychain.ui.transfer.view.TransferSecretKeyList.TransferKeyAdapter;
|
||||
import org.sufficientlysecure.keychain.ui.util.QrCodeUtils;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
@RequiresApi(api = VERSION_CODES.LOLLIPOP)
|
||||
@@ -260,16 +259,16 @@ public class TransferPresenter implements KeyTransferCallback, LoaderCallbacks<L
|
||||
@Override
|
||||
public void onDataReceivedOk(String receivedData) {
|
||||
if (sentData) {
|
||||
Log.d(Constants.TAG, "received data, but we already sent a key! race condition, or other side misbehaving?");
|
||||
Timber.d("received data, but we already sent a key! race condition, or other side misbehaving?");
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d(Constants.TAG, "received data");
|
||||
Timber.d("received data");
|
||||
UncachedKeyRing uncachedKeyRing;
|
||||
try {
|
||||
uncachedKeyRing = UncachedKeyRing.decodeFromData(receivedData.getBytes());
|
||||
} catch (PgpGeneralException | IOException | RuntimeException e) {
|
||||
Log.e(Constants.TAG, "error parsing incoming key", e);
|
||||
Timber.e(e, "error parsing incoming key");
|
||||
view.showErrorBadKey();
|
||||
return;
|
||||
}
|
||||
@@ -286,7 +285,7 @@ public class TransferPresenter implements KeyTransferCallback, LoaderCallbacks<L
|
||||
|
||||
@Override
|
||||
public void onDataSentOk(String passthrough) {
|
||||
Log.d(Constants.TAG, "data sent ok!");
|
||||
Timber.d("data sent ok!");
|
||||
final long masterKeyId = Long.parseLong(passthrough);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
|
||||
@@ -28,11 +28,10 @@ import android.os.RemoteException;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.ContextThemeWrapper;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.ui.dialog.CustomAlertDialogBuilder;
|
||||
import org.sufficientlysecure.keychain.ui.util.ThemeChanger;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class InstallDialogFragmentHelper {
|
||||
private static final String ARG_MESSENGER = "messenger";
|
||||
@@ -80,9 +79,9 @@ public class InstallDialogFragmentHelper {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -100,9 +99,9 @@ public class InstallDialogFragmentHelper {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,9 +117,9 @@ public class InstallDialogFragmentHelper {
|
||||
try {
|
||||
messenger.send(msg);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(Constants.TAG, "Exception sending message, Is handler present?", e);
|
||||
Timber.w(e, "Exception sending message, Is handler present?");
|
||||
} catch (NullPointerException e) {
|
||||
Log.w(Constants.TAG, "Messenger is null!", e);
|
||||
Timber.w(e, "Messenger is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,8 @@ import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.KeychainApplication;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Locale;
|
||||
@@ -87,7 +86,7 @@ public class QrCodeUtils {
|
||||
|
||||
return bitmap;
|
||||
} catch (WriterException e) {
|
||||
Log.e(Constants.TAG, "QrCodeUtils", e);
|
||||
Timber.e(e, "QrCodeUtils");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,9 @@ import android.database.DataSetObserver;
|
||||
import android.os.Handler;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.ui.util.adapter.CursorAdapter.SimpleCursor;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
@@ -198,12 +197,12 @@ public abstract class CursorAdapter<C extends SimpleCursor, VH extends RecyclerV
|
||||
|
||||
public boolean moveCursor(int position) {
|
||||
if (position >= getItemCount() || position < -1) {
|
||||
Log.w(TAG, "Position: %d is invalid for this data set!");
|
||||
Timber.w("Position: %d is invalid for this data set!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mDataValid) {
|
||||
Log.d(TAG, "Attempt to move cursor over invalid data set!");
|
||||
Timber.d("Attempt to move cursor over invalid data set!");
|
||||
}
|
||||
|
||||
return mCursor.moveToPosition(position);
|
||||
@@ -322,7 +321,7 @@ public abstract class CursorAdapter<C extends SimpleCursor, VH extends RecyclerV
|
||||
Constructor<T> constructor = type.getConstructor(Cursor.class);
|
||||
return constructor.newInstance(cursor);
|
||||
} catch (Exception e) {
|
||||
Log.e(Constants.TAG, "Could not create instance of cursor wrapper!", e);
|
||||
Timber.e(e, "Could not create instance of cursor wrapper!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import android.view.ViewGroup;
|
||||
import com.tonicartos.superslim.LayoutManager;
|
||||
|
||||
import org.sufficientlysecure.keychain.ui.util.adapter.CursorAdapter.SimpleCursor;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
/**
|
||||
@@ -92,8 +92,8 @@ public abstract class SectionCursorAdapter<C extends SimpleCursor, T, VH extends
|
||||
mSectionMap.clear();
|
||||
appendSections(getCursor());
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e(TAG, "Couldn't build sections. Perhaps you're moving the cursor" +
|
||||
"in #getSectionFromCursor(Cursor)?", e);
|
||||
Timber.e(e, "Couldn't build sections. Perhaps you're moving the cursor" +
|
||||
"in #getSectionFromCursor(Cursor)?");
|
||||
swapCursor(null);
|
||||
|
||||
mSectionMap.clear();
|
||||
|
||||
@@ -38,14 +38,13 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tokenautocomplete.TokenCompleteTextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainDatabase.Tables;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.KeyAdapter;
|
||||
import org.sufficientlysecure.keychain.ui.adapter.KeyAdapter.KeyItem;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class EncryptKeyCompletionView extends TokenCompleteTextView<KeyItem>
|
||||
@@ -103,7 +102,8 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView<KeyItem>
|
||||
if (getContext() instanceof FragmentActivity) {
|
||||
mLoaderManager = ((FragmentActivity) getContext()).getSupportLoaderManager();
|
||||
} else {
|
||||
Log.e(Constants.TAG, "EncryptKeyCompletionView must be attached to a FragmentActivity, this is " + getContext().getClass());
|
||||
Timber.e("EncryptKeyCompletionView must be attached to a FragmentActivity, this is " +
|
||||
getContext().getClass());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Matt Allen
|
||||
|
||||
Reference in New Issue
Block a user