Fix a bunch of trivial code warnings
This commit is contained in:
parent
583b427336
commit
5c2e4f889f
|
@ -261,7 +261,7 @@ android {
|
|||
|
||||
variantFilter { variant ->
|
||||
if(variant.buildType.name.equals('debug') && variant.getFlavors().get(0).name.equals('google')) {
|
||||
variant.setIgnore(true);
|
||||
variant.setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public class FlingNestedScrollView extends FrameLayout implements NestedScrollin
|
|||
private float mVerticalScrollFactor;
|
||||
|
||||
public FlingNestedScrollView(Context context) {
|
||||
this(context, (AttributeSet)null);
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public FlingNestedScrollView(Context context, AttributeSet attrs) {
|
||||
|
@ -176,7 +176,7 @@ public class FlingNestedScrollView extends FrameLayout implements NestedScrollin
|
|||
this.scrollBy(0, dyUnconsumed);
|
||||
int myConsumed = this.getScrollY() - oldScrollY;
|
||||
int myUnconsumed = dyUnconsumed - myConsumed;
|
||||
this.dispatchNestedScroll(0, myConsumed, 0, myUnconsumed, (int[])null);
|
||||
this.dispatchNestedScroll(0, myConsumed, 0, myUnconsumed, null);
|
||||
}
|
||||
|
||||
public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) {
|
||||
|
@ -1061,8 +1061,9 @@ public class FlingNestedScrollView extends FrameLayout implements NestedScrollin
|
|||
direction = 33;
|
||||
}
|
||||
|
||||
View nextFocus = previouslyFocusedRect == null?FocusFinder.getInstance().findNextFocus(this, (View)null, direction):FocusFinder.getInstance().findNextFocusFromRect(this, previouslyFocusedRect, direction);
|
||||
return nextFocus == null?false:(this.isOffScreen(nextFocus)?false:nextFocus.requestFocus(direction, previouslyFocusedRect));
|
||||
View nextFocus = previouslyFocusedRect == null?FocusFinder.getInstance().findNextFocus(this, null, direction):FocusFinder.getInstance().findNextFocusFromRect(this, previouslyFocusedRect, direction);
|
||||
return nextFocus != null && (!this.isOffScreen(nextFocus) &&
|
||||
nextFocus.requestFocus(direction, previouslyFocusedRect));
|
||||
}
|
||||
|
||||
public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate) {
|
||||
|
|
|
@ -450,7 +450,7 @@ public class NoScrollableSwipeRefreshLayout extends ViewGroup {
|
|||
* triggers a refresh should implement this interface.
|
||||
*/
|
||||
public interface OnRefreshListener {
|
||||
public void onRefresh();
|
||||
void onRefresh();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -926,7 +926,6 @@ public abstract class OperationResult implements Parcelable {
|
|||
MSG_TRUST_INITIALIZE (LogLevel.INFO, R.string.msg_trust_initialize),
|
||||
MSG_TRUST_COUNT_NONE (LogLevel.DEBUG, R.string.msg_trust_count_none),
|
||||
MSG_TRUST_COUNT (LogLevel.DEBUG, R.plurals.msg_trust_count);
|
||||
;
|
||||
|
||||
public final int mMsgId;
|
||||
public final LogLevel mLevel;
|
||||
|
|
|
@ -20,13 +20,13 @@ package org.sufficientlysecure.keychain.pgp;
|
|||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
|
||||
public interface PassphraseCacheInterface {
|
||||
public static class NoSecretKeyException extends Exception {
|
||||
class NoSecretKeyException extends Exception {
|
||||
public NoSecretKeyException() {
|
||||
}
|
||||
}
|
||||
|
||||
public Passphrase getCachedPassphrase(long subKeyId) throws NoSecretKeyException;
|
||||
Passphrase getCachedPassphrase(long subKeyId) throws NoSecretKeyException;
|
||||
|
||||
public Passphrase getCachedPassphrase(long masterKeyId, long subKeyId) throws NoSecretKeyException;
|
||||
Passphrase getCachedPassphrase(long masterKeyId, long subKeyId) throws NoSecretKeyException;
|
||||
|
||||
}
|
||||
|
|
|
@ -579,7 +579,6 @@ public class PgpDecryptVerifyOperation extends BaseOperation<PgpDecryptVerifyInp
|
|||
CanonicalizedSecretKey decryptionKey = null;
|
||||
CachingDataDecryptorFactory cachedKeyDecryptorFactory = new CachingDataDecryptorFactory(
|
||||
Constants.BOUNCY_CASTLE_PROVIDER_NAME, cryptoInput.getCryptoData());
|
||||
;
|
||||
|
||||
Passphrase passphrase = null;
|
||||
|
||||
|
|
|
@ -255,8 +255,8 @@ public class UncachedKeyRing {
|
|||
}
|
||||
|
||||
public interface IteratorWithIOThrow<E> {
|
||||
public boolean hasNext() throws IOException;
|
||||
public E next() throws IOException;
|
||||
boolean hasNext() throws IOException;
|
||||
E next() throws IOException;
|
||||
}
|
||||
public void encodeArmored(OutputStream out, String version) throws IOException {
|
||||
ArmoredOutputStream aos = new ArmoredOutputStream(out);
|
||||
|
|
|
@ -61,8 +61,8 @@ public class AppSettingsActivity extends BaseActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mAppNameView = (TextView) findViewById(R.id.api_app_settings_app_name);
|
||||
mAppIconView = (ImageView) findViewById(R.id.api_app_settings_app_icon);
|
||||
mAppNameView = findViewById(R.id.api_app_settings_app_name);
|
||||
mAppIconView = findViewById(R.id.api_app_settings_app_icon);
|
||||
|
||||
findViewById(R.id.fab).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -76,7 +76,7 @@ public class AppSettingsAllowedKeysListFragment extends ListFragmentWorkaround i
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View layout = super.onCreateView(inflater, container, savedInstanceState);
|
||||
ListView lv = (ListView) layout.findViewById(android.R.id.list);
|
||||
ListView lv = layout.findViewById(android.R.id.list);
|
||||
ViewGroup parent = (ViewGroup) lv.getParent();
|
||||
|
||||
/*
|
||||
|
|
|
@ -63,10 +63,10 @@ public class AppSettingsHeaderFragment extends Fragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.api_app_settings_fragment, container, false);
|
||||
mAppNameView = (TextView) view.findViewById(R.id.api_app_settings_app_name);
|
||||
mAppIconView = (ImageView) view.findViewById(R.id.api_app_settings_app_icon);
|
||||
mPackageName = (TextView) view.findViewById(R.id.api_app_settings_package_name);
|
||||
mPackageCertificate = (TextView) view.findViewById(R.id.api_app_settings_package_certificate);
|
||||
mAppNameView = view.findViewById(R.id.api_app_settings_app_name);
|
||||
mAppIconView = view.findViewById(R.id.api_app_settings_app_icon);
|
||||
mPackageName = view.findViewById(R.id.api_app_settings_package_name);
|
||||
mPackageCertificate = view.findViewById(R.id.api_app_settings_package_certificate);
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
|
@ -321,9 +321,9 @@ public class AppsListFragment extends ListFragment implements
|
|||
|
||||
@Override
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
TextView text = (TextView) view.findViewById(R.id.api_apps_adapter_item_name);
|
||||
ImageView icon = (ImageView) view.findViewById(R.id.api_apps_adapter_item_icon);
|
||||
ImageView installIcon = (ImageView) view.findViewById(R.id.api_apps_adapter_install_icon);
|
||||
TextView text = view.findViewById(R.id.api_apps_adapter_item_name);
|
||||
ImageView icon = view.findViewById(R.id.api_apps_adapter_item_icon);
|
||||
ImageView installIcon = view.findViewById(R.id.api_apps_adapter_install_icon);
|
||||
|
||||
String packageName = cursor.getString(INDEX_PACKAGE_NAME);
|
||||
Timber.d("packageName: " + packageName);
|
||||
|
|
|
@ -63,7 +63,7 @@ public class RemoteErrorActivity extends BaseActivity {
|
|||
);
|
||||
|
||||
// set text on view
|
||||
TextView textView = (TextView) findViewById(R.id.api_app_error_message_text);
|
||||
TextView textView = findViewById(R.id.api_app_error_message_text);
|
||||
textView.setText(redErrorMessage);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,8 +94,8 @@ public class RemoteRegisterActivity extends FragmentActivity {
|
|||
View view = LayoutInflater.from(theme).inflate(R.layout.api_remote_register_app, null, false);
|
||||
alert.setView(view);
|
||||
|
||||
buttonAllow = (Button) view.findViewById(R.id.button_allow);
|
||||
buttonCancel = (Button) view.findViewById(R.id.button_cancel);
|
||||
buttonAllow = view.findViewById(R.id.button_allow);
|
||||
buttonCancel = view.findViewById(R.id.button_cancel);
|
||||
|
||||
setupListenersForPresenter();
|
||||
mvpView = createMvpView(view);
|
||||
|
@ -132,8 +132,8 @@ public class RemoteRegisterActivity extends FragmentActivity {
|
|||
|
||||
@NonNull
|
||||
private RemoteRegisterView createMvpView(View view) {
|
||||
final TextView titleText = (TextView) view.findViewById(R.id.api_register_text);
|
||||
final ImageView iconClientApp = (ImageView) view.findViewById(R.id.icon_client_app);
|
||||
final TextView titleText = view.findViewById(R.id.api_register_text);
|
||||
final ImageView iconClientApp = view.findViewById(R.id.icon_client_app);
|
||||
|
||||
return new RemoteRegisterView() {
|
||||
@Override
|
||||
|
|
|
@ -110,12 +110,12 @@ public class RemoteSecurityProblemDialogActivity extends FragmentActivity {
|
|||
View view = LayoutInflater.from(theme).inflate(R.layout.remote_security_issue_dialog, null, false);
|
||||
alert.setView(view);
|
||||
|
||||
buttonGotIt = (Button) view.findViewById(R.id.button_allow);
|
||||
buttonViewKey = (Button) view.findViewById(R.id.button_view_key);
|
||||
buttonOverride = (Button) view.findViewById(R.id.button_override);
|
||||
buttonOverrideUndo = (Button) view.findViewById(R.id.button_override_undo);
|
||||
buttonOverrideBack = (Button) view.findViewById(R.id.button_override_back);
|
||||
buttonOverrideConfirm = (Button) view.findViewById(R.id.button_override_confirm);
|
||||
buttonGotIt = view.findViewById(R.id.button_allow);
|
||||
buttonViewKey = view.findViewById(R.id.button_view_key);
|
||||
buttonOverride = view.findViewById(R.id.button_override);
|
||||
buttonOverrideUndo = view.findViewById(R.id.button_override_undo);
|
||||
buttonOverrideBack = view.findViewById(R.id.button_override_back);
|
||||
buttonOverrideConfirm = view.findViewById(R.id.button_override_confirm);
|
||||
|
||||
setupListenersForPresenter();
|
||||
mvpView = createMvpView(view);
|
||||
|
@ -152,17 +152,17 @@ public class RemoteSecurityProblemDialogActivity extends FragmentActivity {
|
|||
|
||||
@NonNull
|
||||
private RemoteSecurityProblemView createMvpView(View view) {
|
||||
final LinearLayout insecureWarningLayout = (LinearLayout) view.findViewById(R.id.insecure_warning_layout);
|
||||
final ImageView iconClientApp = (ImageView) view.findViewById(R.id.icon_client_app);
|
||||
final TextView explanationText = (TextView) insecureWarningLayout.findViewById(R.id.dialog_insecure_text);
|
||||
final LinearLayout insecureWarningLayout = view.findViewById(R.id.insecure_warning_layout);
|
||||
final ImageView iconClientApp = view.findViewById(R.id.icon_client_app);
|
||||
final TextView explanationText = insecureWarningLayout.findViewById(R.id.dialog_insecure_text);
|
||||
final TextView recommendText =
|
||||
(TextView) insecureWarningLayout.findViewById(R.id.dialog_insecure_recommend_text);
|
||||
insecureWarningLayout.findViewById(R.id.dialog_insecure_recommend_text);
|
||||
final TextView overrideText =
|
||||
(TextView) insecureWarningLayout.findViewById(R.id.dialog_insecure_override_text);
|
||||
insecureWarningLayout.findViewById(R.id.dialog_insecure_override_text);
|
||||
final ToolableViewAnimator secondaryLayoutAnimator =
|
||||
(ToolableViewAnimator) insecureWarningLayout.findViewById(R.id.dialog_insecure_secondary_layout);
|
||||
insecureWarningLayout.findViewById(R.id.dialog_insecure_secondary_layout);
|
||||
final ToolableViewAnimator buttonBarAnimator =
|
||||
(ToolableViewAnimator) view.findViewById(R.id.dialog_insecure_button_bar);
|
||||
view.findViewById(R.id.dialog_insecure_button_bar);
|
||||
|
||||
return new RemoteSecurityProblemView() {
|
||||
private boolean layoutInitialized = false;
|
||||
|
|
|
@ -120,7 +120,7 @@ public class RemoteSelectPubKeyActivity extends BaseActivity {
|
|||
});
|
||||
|
||||
// set text on view
|
||||
TextView textView = (TextView) findViewById(R.id.api_select_pub_keys_text);
|
||||
TextView textView = findViewById(R.id.api_select_pub_keys_text);
|
||||
textView.setText(ssb, TextView.BufferType.SPANNABLE);
|
||||
|
||||
// Load select pub keys fragment
|
||||
|
|
|
@ -92,8 +92,8 @@ public class RequestKeyPermissionActivity extends FragmentActivity {
|
|||
View view = LayoutInflater.from(theme).inflate(R.layout.api_remote_request_key_permission, null, false);
|
||||
alert.setView(view);
|
||||
|
||||
buttonAllow = (Button) view.findViewById(R.id.button_allow);
|
||||
buttonCancel = (Button) view.findViewById(R.id.button_cancel);
|
||||
buttonAllow = view.findViewById(R.id.button_allow);
|
||||
buttonCancel = view.findViewById(R.id.button_cancel);
|
||||
|
||||
setupListenersForPresenter();
|
||||
mvpView = createMvpView(view);
|
||||
|
@ -130,9 +130,9 @@ public class RequestKeyPermissionActivity extends FragmentActivity {
|
|||
|
||||
@NonNull
|
||||
private RequestKeyPermissionMvpView createMvpView(View view) {
|
||||
final TextView titleText = (TextView) view.findViewById(R.id.select_identity_key_title);
|
||||
final TextView keyUserIdView = (TextView) view.findViewById(R.id.select_key_item_name);
|
||||
final ImageView iconClientApp = (ImageView) view.findViewById(R.id.icon_client_app);
|
||||
final TextView titleText = view.findViewById(R.id.select_identity_key_title);
|
||||
final TextView keyUserIdView = view.findViewById(R.id.select_key_item_name);
|
||||
final ImageView iconClientApp = view.findViewById(R.id.icon_client_app);
|
||||
final View keyUnavailableWarning = view.findViewById(R.id.requested_key_unavailable_warning);
|
||||
final View keyInfoLayout = view.findViewById(R.id.key_info_layout);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SelectSignKeyIdActivity extends BaseActivity {
|
|||
}
|
||||
});
|
||||
|
||||
TextView noneButton = (TextView) findViewById(R.id.api_select_sign_key_none);
|
||||
TextView noneButton = findViewById(R.id.api_select_sign_key_none);
|
||||
noneButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -139,11 +139,11 @@ public class SelectEncryptKeyAdapter extends KeyCursorAdapter<SelectEncryptKeyAd
|
|||
super(itemView);
|
||||
itemView.setOnClickListener(this);
|
||||
|
||||
mUserIdText = (TextView) itemView.findViewById(R.id.select_key_item_name);
|
||||
mUserIdRestText = (TextView) itemView.findViewById(R.id.select_key_item_email);
|
||||
mCreationText = (TextView) itemView.findViewById(R.id.select_key_item_creation);
|
||||
mStatusIcon = (ImageView) itemView.findViewById(R.id.select_key_item_status_icon);
|
||||
mChecked = (CheckBox) itemView.findViewById(R.id.selected);
|
||||
mUserIdText = itemView.findViewById(R.id.select_key_item_name);
|
||||
mUserIdRestText = itemView.findViewById(R.id.select_key_item_email);
|
||||
mCreationText = itemView.findViewById(R.id.select_key_item_creation);
|
||||
mStatusIcon = itemView.findViewById(R.id.select_key_item_status_icon);
|
||||
mChecked = itemView.findViewById(R.id.selected);
|
||||
}
|
||||
|
||||
public void bind(PublicKeyCursor cursor, String query, boolean selected) {
|
||||
|
|
|
@ -129,10 +129,10 @@ public class SelectSignKeyAdapter extends KeyCursorAdapter<CursorAdapter.KeyCurs
|
|||
itemView.setClickable(true);
|
||||
itemView.setOnClickListener(this);
|
||||
|
||||
mUserIdText = (TextView) itemView.findViewById(R.id.select_key_item_name);
|
||||
mUserIdRestText = (TextView) itemView.findViewById(R.id.select_key_item_email);
|
||||
mCreationText = (TextView) itemView.findViewById(R.id.select_key_item_creation);
|
||||
mStatusIcon = (ImageView) itemView.findViewById(R.id.select_key_item_status_icon);
|
||||
mUserIdText = itemView.findViewById(R.id.select_key_item_name);
|
||||
mUserIdRestText = itemView.findViewById(R.id.select_key_item_email);
|
||||
mCreationText = itemView.findViewById(R.id.select_key_item_creation);
|
||||
mStatusIcon = itemView.findViewById(R.id.select_key_item_status_icon);
|
||||
}
|
||||
|
||||
public void bind(KeyCursor cursor, String query) {
|
||||
|
|
|
@ -117,10 +117,10 @@ public class RemoteDeduplicateActivity extends FragmentActivity {
|
|||
View view = layoutInflater.inflate(R.layout.api_remote_deduplicate, null, false);
|
||||
alert.setView(view);
|
||||
|
||||
buttonSelect = (Button) view.findViewById(R.id.button_select);
|
||||
buttonCancel = (Button) view.findViewById(R.id.button_cancel);
|
||||
buttonSelect = view.findViewById(R.id.button_select);
|
||||
buttonCancel = view.findViewById(R.id.button_cancel);
|
||||
|
||||
keyChoiceList = (RecyclerView) view.findViewById(R.id.duplicate_key_list);
|
||||
keyChoiceList = view.findViewById(R.id.duplicate_key_list);
|
||||
keyChoiceList.setLayoutManager(new LinearLayoutManager(activity));
|
||||
keyChoiceList.addItemDecoration(
|
||||
new DividerItemDecoration(activity, DividerItemDecoration.VERTICAL_LIST, true));
|
||||
|
@ -160,9 +160,9 @@ public class RemoteDeduplicateActivity extends FragmentActivity {
|
|||
|
||||
@NonNull
|
||||
private RemoteDeduplicateView createMvpView(View view, LayoutInflater layoutInflater) {
|
||||
final ImageView iconClientApp = (ImageView) view.findViewById(R.id.icon_client_app);
|
||||
final ImageView iconClientApp = view.findViewById(R.id.icon_client_app);
|
||||
final KeyChoiceAdapter keyChoiceAdapter = new KeyChoiceAdapter(layoutInflater, getResources());
|
||||
final TextView addressText = (TextView) view.findViewById(R.id.select_key_item_name);
|
||||
final TextView addressText = view.findViewById(R.id.select_key_item_name);
|
||||
keyChoiceList.setAdapter(keyChoiceAdapter);
|
||||
|
||||
return new RemoteDeduplicateView() {
|
||||
|
@ -314,9 +314,9 @@ public class RemoteDeduplicateActivity extends FragmentActivity {
|
|||
KeyChoiceViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
vName = (TextView) itemView.findViewById(R.id.key_list_item_name);
|
||||
vCreation = (TextView) itemView.findViewById(R.id.key_list_item_creation);
|
||||
vIcon = (ImageView) itemView.findViewById(R.id.key_list_item_icon);
|
||||
vName = itemView.findViewById(R.id.key_list_item_name);
|
||||
vCreation = itemView.findViewById(R.id.key_list_item_creation);
|
||||
vIcon = itemView.findViewById(R.id.key_list_item_icon);
|
||||
}
|
||||
|
||||
void bind(KeyInfo keyInfo, Drawable selectionIcon) {
|
||||
|
|
|
@ -140,10 +140,10 @@ public class RemoteSelectAuthenticationKeyActivity extends FragmentActivity {
|
|||
View view = layoutInflater.inflate(R.layout.api_remote_select_authentication_key, null, false);
|
||||
alert.setView(view);
|
||||
|
||||
buttonSelect = (Button) view.findViewById(R.id.button_select);
|
||||
buttonCancel = (Button) view.findViewById(R.id.button_cancel);
|
||||
buttonSelect = view.findViewById(R.id.button_select);
|
||||
buttonCancel = view.findViewById(R.id.button_cancel);
|
||||
|
||||
keyChoiceList = (RecyclerView) view.findViewById(R.id.authentication_key_list);
|
||||
keyChoiceList = view.findViewById(R.id.authentication_key_list);
|
||||
keyChoiceList.setLayoutManager(new LinearLayoutManager(activity));
|
||||
keyChoiceList.addItemDecoration(
|
||||
new DividerItemDecoration(activity, DividerItemDecoration.VERTICAL_LIST, true));
|
||||
|
@ -183,7 +183,7 @@ public class RemoteSelectAuthenticationKeyActivity extends FragmentActivity {
|
|||
|
||||
@NonNull
|
||||
private RemoteSelectAuthenticationKeyView createMvpView(View view, LayoutInflater layoutInflater) {
|
||||
final ImageView iconClientApp = (ImageView) view.findViewById(R.id.icon_client_app);
|
||||
final ImageView iconClientApp = view.findViewById(R.id.icon_client_app);
|
||||
final KeyChoiceAdapter keyChoiceAdapter = new KeyChoiceAdapter(layoutInflater, getResources());
|
||||
keyChoiceList.setAdapter(keyChoiceAdapter);
|
||||
|
||||
|
@ -328,9 +328,9 @@ public class RemoteSelectAuthenticationKeyActivity extends FragmentActivity {
|
|||
KeyChoiceViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
vName = (TextView) itemView.findViewById(R.id.key_list_item_name);
|
||||
vCreation = (TextView) itemView.findViewById(R.id.key_list_item_creation);
|
||||
vIcon = (ImageView) itemView.findViewById(R.id.key_list_item_icon);
|
||||
vName = itemView.findViewById(R.id.key_list_item_name);
|
||||
vCreation = itemView.findViewById(R.id.key_list_item_creation);
|
||||
vIcon = itemView.findViewById(R.id.key_list_item_icon);
|
||||
}
|
||||
|
||||
void bind(KeyInfo keyInfo, Drawable selectionIcon) {
|
||||
|
|
|
@ -99,7 +99,7 @@ public class KeychainService extends Service implements Progressable {
|
|||
Bundle extras = intent.getExtras();
|
||||
|
||||
// Set messenger for communication (for this particular thread)
|
||||
mMessenger.set(extras.<Messenger>getParcelable(EXTRA_MESSENGER));
|
||||
mMessenger.set(extras.getParcelable(EXTRA_MESSENGER));
|
||||
|
||||
// Input
|
||||
Parcelable inputParcel = extras.getParcelable(EXTRA_OPERATION_INPUT);
|
||||
|
|
|
@ -65,7 +65,7 @@ public abstract class CryptoInputParcel implements Parcelable {
|
|||
|
||||
|
||||
public static CryptoInputParcel createCryptoInputParcel() {
|
||||
return new AutoValue_CryptoInputParcel(null, null, null, true, null, Collections.<ByteBuffer,byte[]>emptyMap());
|
||||
return new AutoValue_CryptoInputParcel(null, null, null, true, null, Collections.emptyMap());
|
||||
}
|
||||
|
||||
public static CryptoInputParcel createCryptoInputParcel(Date signatureTime, Passphrase passphrase) {
|
||||
|
@ -73,11 +73,11 @@ public abstract class CryptoInputParcel implements Parcelable {
|
|||
signatureTime = new Date();
|
||||
}
|
||||
return new AutoValue_CryptoInputParcel(signatureTime, passphrase, null, true, null,
|
||||
Collections.<ByteBuffer,byte[]>emptyMap());
|
||||
Collections.emptyMap());
|
||||
}
|
||||
|
||||
public static CryptoInputParcel createCryptoInputParcel(Passphrase passphrase) {
|
||||
return new AutoValue_CryptoInputParcel(null, passphrase, null, true, null, Collections.<ByteBuffer,byte[]>emptyMap());
|
||||
return new AutoValue_CryptoInputParcel(null, passphrase, null, true, null, Collections.emptyMap());
|
||||
}
|
||||
|
||||
public static CryptoInputParcel createCryptoInputParcel(Date signatureTime) {
|
||||
|
@ -85,7 +85,7 @@ public abstract class CryptoInputParcel implements Parcelable {
|
|||
signatureTime = new Date();
|
||||
}
|
||||
return new AutoValue_CryptoInputParcel(signatureTime, null, null, true, null,
|
||||
Collections.<ByteBuffer,byte[]>emptyMap());
|
||||
Collections.emptyMap());
|
||||
}
|
||||
|
||||
public static CryptoInputParcel createCryptoInputParcel(ParcelableProxy parcelableProxy) {
|
||||
|
|
|
@ -261,21 +261,21 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar
|
|||
mExecuteBackupOperation = args.getBoolean(ARG_EXECUTE_BACKUP_OPERATION, true);
|
||||
|
||||
mCodeEditText = new EditText[6];
|
||||
mCodeEditText[0] = (EditText) view.findViewById(R.id.backup_code_1);
|
||||
mCodeEditText[1] = (EditText) view.findViewById(R.id.backup_code_2);
|
||||
mCodeEditText[2] = (EditText) view.findViewById(R.id.backup_code_3);
|
||||
mCodeEditText[3] = (EditText) view.findViewById(R.id.backup_code_4);
|
||||
mCodeEditText[4] = (EditText) view.findViewById(R.id.backup_code_5);
|
||||
mCodeEditText[5] = (EditText) view.findViewById(R.id.backup_code_6);
|
||||
mCodeEditText[0] = view.findViewById(R.id.backup_code_1);
|
||||
mCodeEditText[1] = view.findViewById(R.id.backup_code_2);
|
||||
mCodeEditText[2] = view.findViewById(R.id.backup_code_3);
|
||||
mCodeEditText[3] = view.findViewById(R.id.backup_code_4);
|
||||
mCodeEditText[4] = view.findViewById(R.id.backup_code_5);
|
||||
mCodeEditText[5] = view.findViewById(R.id.backup_code_6);
|
||||
|
||||
{
|
||||
TextView[] codeDisplayText = new TextView[6];
|
||||
codeDisplayText[0] = (TextView) view.findViewById(R.id.backup_code_display_1);
|
||||
codeDisplayText[1] = (TextView) view.findViewById(R.id.backup_code_display_2);
|
||||
codeDisplayText[2] = (TextView) view.findViewById(R.id.backup_code_display_3);
|
||||
codeDisplayText[3] = (TextView) view.findViewById(R.id.backup_code_display_4);
|
||||
codeDisplayText[4] = (TextView) view.findViewById(R.id.backup_code_display_5);
|
||||
codeDisplayText[5] = (TextView) view.findViewById(R.id.backup_code_display_6);
|
||||
codeDisplayText[0] = view.findViewById(R.id.backup_code_display_1);
|
||||
codeDisplayText[1] = view.findViewById(R.id.backup_code_display_2);
|
||||
codeDisplayText[2] = view.findViewById(R.id.backup_code_display_3);
|
||||
codeDisplayText[3] = view.findViewById(R.id.backup_code_display_4);
|
||||
codeDisplayText[4] = view.findViewById(R.id.backup_code_display_5);
|
||||
codeDisplayText[5] = view.findViewById(R.id.backup_code_display_6);
|
||||
|
||||
// set backup code in code TextViews
|
||||
char[] backupCode = mBackupCode.toCharArray();
|
||||
|
@ -293,9 +293,9 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar
|
|||
setupEditTextFocusNext(mCodeEditText);
|
||||
setupEditTextSuccessListener(mCodeEditText);
|
||||
|
||||
mStatusAnimator = (ToolableViewAnimator) view.findViewById(R.id.button_bar_animator);
|
||||
mTitleAnimator = (ToolableViewAnimator) view.findViewById(R.id.title_animator);
|
||||
mCodeFieldsAnimator = (ToolableViewAnimator) view.findViewById(R.id.code_animator);
|
||||
mStatusAnimator = view.findViewById(R.id.button_bar_animator);
|
||||
mTitleAnimator = view.findViewById(R.id.title_animator);
|
||||
mCodeFieldsAnimator = view.findViewById(R.id.code_animator);
|
||||
|
||||
View backupInput = view.findViewById(R.id.button_backup_input);
|
||||
backupInput.setOnClickListener(new OnClickListener() {
|
||||
|
|
|
@ -73,12 +73,12 @@ public class CertifyFingerprintFragment extends LoaderFragment implements
|
|||
View root = super.onCreateView(inflater, superContainer, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.certify_fingerprint_fragment, getContainer());
|
||||
|
||||
TextView actionNo = (TextView) view.findViewById(R.id.certify_fingerprint_button_no);
|
||||
mActionYes = (TextView) view.findViewById(R.id.certify_fingerprint_button_yes);
|
||||
TextView actionNo = view.findViewById(R.id.certify_fingerprint_button_no);
|
||||
mActionYes = view.findViewById(R.id.certify_fingerprint_button_yes);
|
||||
|
||||
mFingerprint = (TextView) view.findViewById(R.id.certify_fingerprint_fingerprint);
|
||||
mIntro = (TextView) view.findViewById(R.id.certify_fingerprint_intro);
|
||||
mHeader = (TextView) view.findViewById(R.id.certify_fingerprint_fingerprint_header);
|
||||
mFingerprint = view.findViewById(R.id.certify_fingerprint_fingerprint);
|
||||
mIntro = view.findViewById(R.id.certify_fingerprint_intro);
|
||||
mHeader = view.findViewById(R.id.certify_fingerprint_fingerprint_header);
|
||||
|
||||
actionNo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -92,14 +92,14 @@ public class CertifyKeyFragment
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup superContainer, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.certify_key_fragment, null);
|
||||
|
||||
mCertifyKeySpinner = (CertifyKeySpinner) view.findViewById(R.id.certify_key_spinner);
|
||||
mUploadKeyCheckbox = (CheckBox) view.findViewById(R.id.sign_key_upload_checkbox);
|
||||
mCertifyKeySpinner = view.findViewById(R.id.certify_key_spinner);
|
||||
mUploadKeyCheckbox = view.findViewById(R.id.sign_key_upload_checkbox);
|
||||
mMultiUserIdsFragment = (MultiUserIdsFragment)
|
||||
getChildFragmentManager().findFragmentById(R.id.multi_user_ids_fragment);
|
||||
|
||||
// make certify image gray, like action icons
|
||||
ImageView vActionCertifyImage =
|
||||
(ImageView) view.findViewById(R.id.certify_key_action_certify_image);
|
||||
view.findViewById(R.id.certify_key_action_certify_image);
|
||||
vActionCertifyImage.setColorFilter(FormattingUtils.getColorFromAttr(getActivity(), R.attr.colorTertiaryText),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
|
||||
|
|
|
@ -86,10 +86,10 @@ public class CreateKeyEmailFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.create_key_email_fragment, container, false);
|
||||
|
||||
mEmailEdit = (EmailEditText) view.findViewById(R.id.create_key_email);
|
||||
mEmailEdit = view.findViewById(R.id.create_key_email);
|
||||
View backButton = view.findViewById(R.id.create_key_back_button);
|
||||
View nextButton = view.findViewById(R.id.create_key_next_button);
|
||||
RecyclerView emailsRecyclerView = (RecyclerView) view.findViewById(R.id.create_key_emails);
|
||||
RecyclerView emailsRecyclerView = view.findViewById(R.id.create_key_emails);
|
||||
|
||||
// initial values
|
||||
mEmailEdit.setText(mCreateKeyActivity.mEmail);
|
||||
|
@ -286,8 +286,8 @@ public class CreateKeyEmailFragment extends Fragment {
|
|||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
mTextView = (TextView) itemView.findViewById(R.id.create_key_email_item_email);
|
||||
mDeleteButton = (ImageButton) itemView.findViewById(R.id.create_key_email_item_delete_button);
|
||||
mTextView = itemView.findViewById(R.id.create_key_email_item_email);
|
||||
mDeleteButton = itemView.findViewById(R.id.create_key_email_item_delete_button);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ public class CreateKeyEmailFragment extends Fragment {
|
|||
|
||||
public FooterHolder(View itemView) {
|
||||
super(itemView);
|
||||
mAddButton = (Button) itemView.findViewById(R.id.create_key_add_email);
|
||||
mAddButton = itemView.findViewById(R.id.create_key_add_email);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,13 +104,13 @@ public class CreateKeyFinalFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.create_key_final_fragment, container, false);
|
||||
|
||||
mNameEdit = (TextView) view.findViewById(R.id.name);
|
||||
mEmailEdit = (TextView) view.findViewById(R.id.email);
|
||||
mUploadCheckbox = (CheckBox) view.findViewById(R.id.create_key_upload);
|
||||
mNameEdit = view.findViewById(R.id.name);
|
||||
mEmailEdit = view.findViewById(R.id.email);
|
||||
mUploadCheckbox = view.findViewById(R.id.create_key_upload);
|
||||
mBackButton = view.findViewById(R.id.create_key_back_button);
|
||||
mCreateButton = view.findViewById(R.id.create_key_next_button);
|
||||
mCustomKeyLayout = view.findViewById(R.id.custom_key_layout);
|
||||
mCustomKeyRevertButton = (Button) view.findViewById(R.id.revert_key_configuration);
|
||||
mCustomKeyRevertButton = view.findViewById(R.id.revert_key_configuration);
|
||||
|
||||
CreateKeyActivity createKeyActivity = (CreateKeyActivity) getActivity();
|
||||
|
||||
|
@ -261,7 +261,7 @@ public class CreateKeyFinalFragment extends Fragment {
|
|||
setHasOptionsMenu(true);
|
||||
|
||||
if (savedInstanceState != null && savedInstanceState.containsKey(STATE_CUSTOM_CONFIGURATION)) {
|
||||
keyConfigUseCustom(savedInstanceState.<SaveKeyringParcel>getParcelable(STATE_CUSTOM_CONFIGURATION));
|
||||
keyConfigUseCustom(savedInstanceState.getParcelable(STATE_CUSTOM_CONFIGURATION));
|
||||
} else {
|
||||
keyConfigRevertToDefault();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class CreateKeyNameFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.create_key_name_fragment, container, false);
|
||||
|
||||
mNameEdit = (NameEditText) view.findViewById(R.id.create_key_name);
|
||||
mNameEdit = view.findViewById(R.id.create_key_name);
|
||||
mBackButton = view.findViewById(R.id.create_key_back_button);
|
||||
mNextButton = view.findViewById(R.id.create_key_next_button);
|
||||
|
||||
|
|
|
@ -91,9 +91,9 @@ public class CreateKeyPassphraseFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.create_key_passphrase_fragment, container, false);
|
||||
|
||||
mPassphraseEdit = (PassphraseEditText) view.findViewById(R.id.create_key_passphrase);
|
||||
mPassphraseEditAgain = (EditText) view.findViewById(R.id.create_key_passphrase_again);
|
||||
mShowPassphrase = (CheckBox) view.findViewById(R.id.create_key_show_passphrase);
|
||||
mPassphraseEdit = view.findViewById(R.id.create_key_passphrase);
|
||||
mPassphraseEditAgain = view.findViewById(R.id.create_key_passphrase_again);
|
||||
mShowPassphrase = view.findViewById(R.id.create_key_show_passphrase);
|
||||
mBackButton = view.findViewById(R.id.create_key_back_button);
|
||||
mNextButton = view.findViewById(R.id.create_key_next_button);
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public class CreateKeyStartFragment extends Fragment {
|
|||
mCreateKey = view.findViewById(R.id.create_key_create_key_button);
|
||||
mImportKey = view.findViewById(R.id.create_key_import_button);
|
||||
mSecurityToken = view.findViewById(R.id.create_key_security_token_button);
|
||||
mSkipOrCancel = (TextView) view.findViewById(R.id.create_key_cancel);
|
||||
mSkipOrCancel = view.findViewById(R.id.create_key_cancel);
|
||||
mSecureDeviceSetup = view.findViewById(R.id.create_key_secure_device_setup);
|
||||
|
||||
if (mCreateKeyActivity.mFirstTime) {
|
||||
|
|
|
@ -87,9 +87,9 @@ public class CreateSecurityTokenAlgorithmFragment extends Fragment {
|
|||
}
|
||||
});
|
||||
|
||||
mSignKeySpinner = (Spinner) view.findViewById(R.id.create_key_yubi_key_algorithm_sign);
|
||||
mDecKeySpinner = (Spinner) view.findViewById(R.id.create_key_yubi_key_algorithm_dec);
|
||||
mAuthKeySpinner = (Spinner) view.findViewById(R.id.create_key_yubi_key_algorithm_auth);
|
||||
mSignKeySpinner = view.findViewById(R.id.create_key_yubi_key_algorithm_sign);
|
||||
mDecKeySpinner = view.findViewById(R.id.create_key_yubi_key_algorithm_dec);
|
||||
mAuthKeySpinner = view.findViewById(R.id.create_key_yubi_key_algorithm_auth);
|
||||
|
||||
ArrayList<Choice<SupportedKeyType>> choices = new ArrayList<>();
|
||||
|
||||
|
@ -175,8 +175,8 @@ public class CreateSecurityTokenAlgorithmFragment extends Fragment {
|
|||
|
||||
Choice c = this.getItem(position);
|
||||
|
||||
TextView text1 = (TextView) convertView.findViewById(android.R.id.text1);
|
||||
TextView text2 = (TextView) convertView.findViewById(android.R.id.text2);
|
||||
TextView text1 = convertView.findViewById(android.R.id.text1);
|
||||
TextView text2 = convertView.findViewById(android.R.id.text2);
|
||||
|
||||
text1.setText(c.getName());
|
||||
text2.setText(Html.fromHtml(c.getDescription()));
|
||||
|
|
|
@ -115,9 +115,9 @@ public class CreateSecurityTokenPinFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.create_yubi_key_pin_fragment, container, false);
|
||||
|
||||
mPin = (EditText) view.findViewById(R.id.create_yubi_key_pin);
|
||||
mPinRepeat = (EditText) view.findViewById(R.id.create_yubi_key_pin_repeat);
|
||||
mAdminPin = (TextView) view.findViewById(R.id.create_yubi_key_admin_pin);
|
||||
mPin = view.findViewById(R.id.create_yubi_key_pin);
|
||||
mPinRepeat = view.findViewById(R.id.create_yubi_key_pin_repeat);
|
||||
mAdminPin = view.findViewById(R.id.create_yubi_key_admin_pin);
|
||||
mBackButton = view.findViewById(R.id.create_key_back_button);
|
||||
mNextButton = view.findViewById(R.id.create_key_next_button);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ public class DecryptActivity extends BaseActivity {
|
|||
// Binary via content provider (could also be files)
|
||||
// override uri to get stream from send
|
||||
if (intent.hasExtra(Intent.EXTRA_STREAM)) {
|
||||
uris.add(intent.<Uri>getParcelableExtra(Intent.EXTRA_STREAM));
|
||||
uris.add(intent.getParcelableExtra(Intent.EXTRA_STREAM));
|
||||
} else if (intent.hasExtra(Intent.EXTRA_TEXT)) {
|
||||
String text = intent.getStringExtra(Intent.EXTRA_TEXT);
|
||||
Uri uri = readToTempFile(text);
|
||||
|
|
|
@ -89,20 +89,20 @@ public abstract class DecryptFragment extends Fragment implements LoaderManager.
|
|||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
// NOTE: These views are inside the activity!
|
||||
mResultLayout = (LinearLayout) getActivity().findViewById(R.id.result_main_layout);
|
||||
mResultLayout = getActivity().findViewById(R.id.result_main_layout);
|
||||
mResultLayout.setVisibility(View.GONE);
|
||||
mEncryptionIcon = (ImageView) getActivity().findViewById(R.id.result_encryption_icon);
|
||||
mEncryptionText = (TextView) getActivity().findViewById(R.id.result_encryption_text);
|
||||
mSignatureIcon = (ImageView) getActivity().findViewById(R.id.result_signature_icon);
|
||||
mSignatureText = (TextView) getActivity().findViewById(R.id.result_signature_text);
|
||||
mEncryptionIcon = getActivity().findViewById(R.id.result_encryption_icon);
|
||||
mEncryptionText = getActivity().findViewById(R.id.result_encryption_text);
|
||||
mSignatureIcon = getActivity().findViewById(R.id.result_signature_icon);
|
||||
mSignatureText = getActivity().findViewById(R.id.result_signature_text);
|
||||
mSignatureLayout = getActivity().findViewById(R.id.result_signature_layout);
|
||||
mSignatureName = (TextView) getActivity().findViewById(R.id.result_signature_name);
|
||||
mSignatureEmail = (TextView) getActivity().findViewById(R.id.result_signature_email);
|
||||
mSignatureAction = (TextView) getActivity().findViewById(R.id.result_signature_action);
|
||||
mSignatureName = getActivity().findViewById(R.id.result_signature_name);
|
||||
mSignatureEmail = getActivity().findViewById(R.id.result_signature_email);
|
||||
mSignatureAction = getActivity().findViewById(R.id.result_signature_action);
|
||||
|
||||
// Overlay
|
||||
mOverlayAnimator = (ViewAnimator) view;
|
||||
Button vErrorOverlayButton = (Button) view.findViewById(R.id.decrypt_error_overlay_button);
|
||||
Button vErrorOverlayButton = view.findViewById(R.id.decrypt_error_overlay_button);
|
||||
vErrorOverlayButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -165,7 +165,7 @@ public class DecryptListFragment
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.decrypt_files_list_fragment, container, false);
|
||||
|
||||
RecyclerView vFilesList = (RecyclerView) view.findViewById(R.id.decrypted_files_list);
|
||||
RecyclerView vFilesList = view.findViewById(R.id.decrypted_files_list);
|
||||
|
||||
vFilesList.addItemDecoration(new SpacesItemDecoration(
|
||||
FormattingUtils.dpToPx(getActivity(), 4)));
|
||||
|
@ -1203,9 +1203,9 @@ public class DecryptListFragment
|
|||
|
||||
public SubViewHolder(View itemView) {
|
||||
vFile = itemView.findViewById(R.id.file);
|
||||
vFilename = (TextView) itemView.findViewById(R.id.filename);
|
||||
vFilesize = (TextView) itemView.findViewById(R.id.filesize);
|
||||
vThumbnail = (ImageView) itemView.findViewById(R.id.thumbnail);
|
||||
vFilename = itemView.findViewById(R.id.filename);
|
||||
vFilesize = itemView.findViewById(R.id.filesize);
|
||||
vThumbnail = itemView.findViewById(R.id.thumbnail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1215,22 +1215,22 @@ public class DecryptListFragment
|
|||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
vAnimator = (ViewAnimator) itemView.findViewById(R.id.view_animator);
|
||||
vAnimator = itemView.findViewById(R.id.view_animator);
|
||||
|
||||
vProgress = (ProgressBar) itemView.findViewById(R.id.progress);
|
||||
vProgressMsg = (TextView) itemView.findViewById(R.id.progress_msg);
|
||||
vProgress = itemView.findViewById(R.id.progress);
|
||||
vProgressMsg = itemView.findViewById(R.id.progress_msg);
|
||||
|
||||
vEncStatusIcon = (ImageView) itemView.findViewById(R.id.result_encryption_icon);
|
||||
vEncStatusText = (TextView) itemView.findViewById(R.id.result_encryption_text);
|
||||
vEncStatusIcon = itemView.findViewById(R.id.result_encryption_icon);
|
||||
vEncStatusText = itemView.findViewById(R.id.result_encryption_text);
|
||||
|
||||
vSigStatusIcon = (ImageView) itemView.findViewById(R.id.result_signature_icon);
|
||||
vSigStatusText = (TextView) itemView.findViewById(R.id.result_signature_text);
|
||||
vSigStatusIcon = itemView.findViewById(R.id.result_signature_icon);
|
||||
vSigStatusText = itemView.findViewById(R.id.result_signature_text);
|
||||
vSignatureLayout = itemView.findViewById(R.id.result_signature_layout);
|
||||
vSignatureName = (TextView) itemView.findViewById(R.id.result_signature_name);
|
||||
vSignatureMail = (TextView) itemView.findViewById(R.id.result_signature_email);
|
||||
vSignatureAction = (ViewAnimator) itemView.findViewById(R.id.result_signature_action);
|
||||
vSignatureName = itemView.findViewById(R.id.result_signature_name);
|
||||
vSignatureMail = itemView.findViewById(R.id.result_signature_email);
|
||||
vSignatureAction = itemView.findViewById(R.id.result_signature_action);
|
||||
|
||||
vFileList = (LinearLayout) itemView.findViewById(R.id.file_list);
|
||||
vFileList = itemView.findViewById(R.id.file_list);
|
||||
for (int i = 0; i < vFileList.getChildCount(); i++) {
|
||||
mFileHolderList.add(new SubViewHolder(vFileList.getChildAt(i)));
|
||||
mCurrentFileListSize += 1;
|
||||
|
@ -1238,10 +1238,10 @@ public class DecryptListFragment
|
|||
|
||||
vContextMenu = itemView.findViewById(R.id.context_menu);
|
||||
|
||||
vErrorMsg = (TextView) itemView.findViewById(R.id.result_error_msg);
|
||||
vErrorViewLog = (ImageView) itemView.findViewById(R.id.result_error_log);
|
||||
vErrorMsg = itemView.findViewById(R.id.result_error_msg);
|
||||
vErrorViewLog = itemView.findViewById(R.id.result_error_log);
|
||||
|
||||
vCancelledRetry = (ImageView) itemView.findViewById(R.id.cancel_retry);
|
||||
vCancelledRetry = itemView.findViewById(R.id.cancel_retry);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
|
|||
@Override
|
||||
public RevokeKeyringParcel createOperationInput() {
|
||||
return RevokeKeyringParcel.createRevokeKeyringParcel(mMasterKeyIds[0], true,
|
||||
(HkpKeyserverAddress) getIntent().getParcelableExtra(EXTRA_KEYSERVER));
|
||||
getIntent().getParcelableExtra(EXTRA_KEYSERVER));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -261,7 +261,7 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
|
|||
mInflateView = inflater.inflate(R.layout.view_key_delete_fragment, null);
|
||||
builder.setView(mInflateView);
|
||||
|
||||
mMainMessage = (TextView) mInflateView.findViewById(R.id.mainMessage);
|
||||
mMainMessage = mInflateView.findViewById(R.id.mainMessage);
|
||||
|
||||
// If only a single key has been selected
|
||||
if (masterKeyIds.length == 1) {
|
||||
|
@ -358,7 +358,7 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
|
|||
View view = inflater.inflate(R.layout.del_rev_dialog, null);
|
||||
builder.setView(view);
|
||||
|
||||
final Spinner spinner = (Spinner) view.findViewById(R.id.spinner);
|
||||
final Spinner spinner = view.findViewById(R.id.spinner);
|
||||
|
||||
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public class DisplayTextFragment extends DecryptFragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.decrypt_text_fragment, container, false);
|
||||
mText = (TextView) view.findViewById(R.id.decrypt_text_plaintext);
|
||||
mText = view.findViewById(R.id.decrypt_text_plaintext);
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,9 +108,9 @@ public class EditIdentitiesFragment extends Fragment
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup superContainer, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.edit_identities_fragment, null);
|
||||
|
||||
mUploadKeyCheckbox = (CheckBox) view.findViewById(R.id.edit_identities_upload_checkbox);
|
||||
mUserIdsList = (ListView) view.findViewById(R.id.edit_identities_user_ids);
|
||||
mUserIdsAddedList = (ListView) view.findViewById(R.id.edit_identities_user_ids_added);
|
||||
mUploadKeyCheckbox = view.findViewById(R.id.edit_identities_upload_checkbox);
|
||||
mUserIdsList = view.findViewById(R.id.edit_identities_user_ids);
|
||||
mUserIdsAddedList = view.findViewById(R.id.edit_identities_user_ids_added);
|
||||
mAddUserId = view.findViewById(R.id.edit_identities_add_user_id);
|
||||
|
||||
// If this is a debug build, don't upload by default
|
||||
|
|
|
@ -131,10 +131,10 @@ public class EditKeyFragment extends QueueingCryptoOperationFragment<SaveKeyring
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup superContainer, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.edit_key_fragment, superContainer, false);
|
||||
|
||||
mUserIdsList = (ListView) view.findViewById(R.id.edit_key_user_ids);
|
||||
mSubkeysList = (ListView) view.findViewById(R.id.edit_key_keys);
|
||||
mUserIdsAddedList = (ListView) view.findViewById(R.id.edit_key_user_ids_added);
|
||||
mSubkeysAddedList = (ListView) view.findViewById(R.id.edit_key_subkeys_added);
|
||||
mUserIdsList = view.findViewById(R.id.edit_key_user_ids);
|
||||
mSubkeysList = view.findViewById(R.id.edit_key_keys);
|
||||
mUserIdsAddedList = view.findViewById(R.id.edit_key_user_ids_added);
|
||||
mSubkeysAddedList = view.findViewById(R.id.edit_key_subkeys_added);
|
||||
mChangePassphrase = view.findViewById(R.id.edit_key_action_change_passphrase);
|
||||
mAddUserId = view.findViewById(R.id.edit_key_action_add_user_id);
|
||||
mAddSubkey = view.findViewById(R.id.edit_key_action_add_key);
|
||||
|
@ -341,7 +341,7 @@ public class EditKeyFragment extends QueueingCryptoOperationFragment<SaveKeyring
|
|||
// cache new returned passphrase!
|
||||
mSkpBuilder.setNewUnlock(ChangeUnlockParcel.createChangeUnlockParcel(
|
||||
mSkpBuilder.getMasterKeyId(), mSkpBuilder.getFingerprint(),
|
||||
(Passphrase) data.getParcelable(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE)));
|
||||
data.getParcelable(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE)));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@ public class EncryptFilesActivity extends EncryptActivity {
|
|||
if (Intent.ACTION_SEND.equals(action) && type != null) {
|
||||
// Files via content provider, override uri and action
|
||||
uris.clear();
|
||||
uris.add(intent.<Uri>getParcelableExtra(Intent.EXTRA_STREAM));
|
||||
uris.add(intent.getParcelableExtra(Intent.EXTRA_STREAM));
|
||||
}
|
||||
|
||||
if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type != null) {
|
||||
|
|
|
@ -103,7 +103,7 @@ public class EncryptFilesFragment
|
|||
|
||||
private AfterEncryptAction mAfterEncryptAction;
|
||||
private enum AfterEncryptAction {
|
||||
SAVE, SHARE, COPY;
|
||||
SAVE, SHARE, COPY
|
||||
}
|
||||
|
||||
private ArrayList<Uri> mOutputUris;
|
||||
|
@ -140,7 +140,7 @@ public class EncryptFilesFragment
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.encrypt_files_fragment, container, false);
|
||||
mSelectedFiles = (RecyclerView) view.findViewById(R.id.selected_files_list);
|
||||
mSelectedFiles = view.findViewById(R.id.selected_files_list);
|
||||
|
||||
mSelectedFiles.addItemDecoration(new SpacesItemDecoration(
|
||||
FormattingUtils.dpToPx(getActivity(), 4)));
|
||||
|
@ -797,10 +797,10 @@ public class EncryptFilesFragment
|
|||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
filename = (TextView) itemView.findViewById(R.id.filename);
|
||||
fileSize = (TextView) itemView.findViewById(R.id.filesize);
|
||||
filename = itemView.findViewById(R.id.filename);
|
||||
fileSize = itemView.findViewById(R.id.filesize);
|
||||
removeButton = itemView.findViewById(R.id.action_remove_file_from_list);
|
||||
thumbnail = (ImageView) itemView.findViewById(R.id.thumbnail);
|
||||
thumbnail = itemView.findViewById(R.id.thumbnail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -809,7 +809,7 @@ public class EncryptFilesFragment
|
|||
|
||||
public FooterHolder(View itemView) {
|
||||
super(itemView);
|
||||
mAddButton = (Button) itemView.findViewById(R.id.file_list_entry_add);
|
||||
mAddButton = itemView.findViewById(R.id.file_list_entry_add);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,11 +80,11 @@ public class EncryptModeAsymmetricFragment extends EncryptModeFragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.encrypt_asymmetric_fragment, container, false);
|
||||
|
||||
mSignKeySpinner = (KeySpinner) view.findViewById(R.id.sign);
|
||||
mEncryptKeyView = (EncryptKeyCompletionView) view.findViewById(R.id.recipient_list);
|
||||
mSignKeySpinner = view.findViewById(R.id.sign);
|
||||
mEncryptKeyView = view.findViewById(R.id.recipient_list);
|
||||
mEncryptKeyView.setThreshold(1); // Start working from first character
|
||||
|
||||
final ViewAnimator vSignatureIcon = (ViewAnimator) view.findViewById(R.id.result_signature_icon);
|
||||
final ViewAnimator vSignatureIcon = view.findViewById(R.id.result_signature_icon);
|
||||
mSignKeySpinner.setOnKeyChangedListener(new OnKeyChangedListener() {
|
||||
@Override
|
||||
public void onKeyChanged(long masterKeyId) {
|
||||
|
@ -95,7 +95,7 @@ public class EncryptModeAsymmetricFragment extends EncryptModeFragment {
|
|||
}
|
||||
});
|
||||
|
||||
final ViewAnimator vEncryptionIcon = (ViewAnimator) view.findViewById(R.id.result_encryption_icon);
|
||||
final ViewAnimator vEncryptionIcon = view.findViewById(R.id.result_encryption_icon);
|
||||
mEncryptKeyView.setTokenListener(new TokenListener<KeyItem>() {
|
||||
@Override
|
||||
public void onTokenAdded(KeyItem o) {
|
||||
|
|
|
@ -47,8 +47,8 @@ public class EncryptModeSymmetricFragment extends EncryptModeFragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.encrypt_symmetric_fragment, container, false);
|
||||
|
||||
mPassphrase = (EditText) view.findViewById(R.id.passphrase);
|
||||
mPassphraseAgain = (EditText) view.findViewById(R.id.passphraseAgain);
|
||||
mPassphrase = view.findViewById(R.id.passphrase);
|
||||
mPassphraseAgain = view.findViewById(R.id.passphraseAgain);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class EncryptTextActivity extends EncryptActivity {
|
|||
sharedText = extras.getString(Intent.EXTRA_TEXT);
|
||||
} else if (extras.containsKey(Intent.EXTRA_STREAM)) {
|
||||
try {
|
||||
sharedText = FileHelper.readTextFromUri(this, extras.<Uri>getParcelable(Intent.EXTRA_STREAM), null);
|
||||
sharedText = FileHelper.readTextFromUri(this, extras.getParcelable(Intent.EXTRA_STREAM), null);
|
||||
} catch (IOException e) {
|
||||
Toast.makeText(this, R.string.error_preparing_data, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
|
|
|
@ -98,7 +98,7 @@ public class EncryptTextFragment
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.encrypt_text_fragment, container, false);
|
||||
|
||||
TextView textView = (TextView) view.findViewById(R.id.encrypt_text_text);
|
||||
TextView textView = view.findViewById(R.id.encrypt_text_text);
|
||||
textView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
|
|
@ -42,10 +42,10 @@ public class HelpAboutFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.help_about_fragment, container, false);
|
||||
|
||||
TextView versionText = (TextView) view.findViewById(R.id.help_about_version);
|
||||
TextView versionText = view.findViewById(R.id.help_about_version);
|
||||
versionText.setText(getString(R.string.help_about_version) + " " + getVersion());
|
||||
|
||||
HtmlTextView aboutTextView = (HtmlTextView) view.findViewById(R.id.help_about_text);
|
||||
HtmlTextView aboutTextView = view.findViewById(R.id.help_about_text);
|
||||
|
||||
// load markdown from raw resource
|
||||
try {
|
||||
|
|
|
@ -63,9 +63,9 @@ public class HelpActivity extends BaseActivity {
|
|||
}
|
||||
});
|
||||
|
||||
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
|
||||
ViewPager viewPager = findViewById(R.id.pager);
|
||||
PagerSlidingTabStrip slidingTabLayout =
|
||||
(PagerSlidingTabStrip) findViewById(R.id.sliding_tab_layout);
|
||||
findViewById(R.id.sliding_tab_layout);
|
||||
|
||||
mTabsAdapter = new PagerTabStripAdapter(this);
|
||||
viewPager.setAdapter(mTabsAdapter);
|
||||
|
|
|
@ -301,7 +301,7 @@ public class ImportKeysActivity extends BaseActivity implements ImportKeysListen
|
|||
private boolean isFingerprintValid(String fingerprint) {
|
||||
if (fingerprint == null || fingerprint.length() < 40) {
|
||||
Notify.create(this, R.string.import_qr_code_too_short_fingerprint, Notify.Style.ERROR)
|
||||
.show((ViewGroup) findViewById(R.id.import_snackbar));
|
||||
.show(findViewById(R.id.import_snackbar));
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -196,11 +196,11 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.key_list_fragment, container, false);
|
||||
|
||||
mFab = (FloatingActionsMenu) view.findViewById(R.id.fab_main);
|
||||
mFab = view.findViewById(R.id.fab_main);
|
||||
|
||||
FloatingActionButton fabQrCode = (FloatingActionButton) view.findViewById(R.id.fab_add_qr_code);
|
||||
FloatingActionButton fabCloud = (FloatingActionButton) view.findViewById(R.id.fab_add_cloud);
|
||||
FloatingActionButton fabFile = (FloatingActionButton) view.findViewById(R.id.fab_add_file);
|
||||
FloatingActionButton fabQrCode = view.findViewById(R.id.fab_add_qr_code);
|
||||
FloatingActionButton fabCloud = view.findViewById(R.id.fab_add_cloud);
|
||||
FloatingActionButton fabFile = view.findViewById(R.id.fab_add_file);
|
||||
|
||||
fabQrCode.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
@ -246,8 +246,8 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
|||
hideList(false);
|
||||
|
||||
// click on search button (in empty view) starts query for search string
|
||||
vSearchContainer = (ViewAnimator) activity.findViewById(R.id.search_container);
|
||||
vSearchButton = (Button) activity.findViewById(R.id.search_button);
|
||||
vSearchContainer = activity.findViewById(R.id.search_container);
|
||||
vSearchButton = activity.findViewById(R.id.search_button);
|
||||
vSearchButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -261,7 +261,7 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
|||
setAdapter(adapter);
|
||||
setLayoutManager(new LayoutManager(getActivity()));
|
||||
|
||||
FastScroller fastScroller = (FastScroller) getActivity().findViewById(R.id.fastscroll);
|
||||
FastScroller fastScroller = getActivity().findViewById(R.id.fastscroll);
|
||||
fastScroller.setRecyclerView(getRecyclerView());
|
||||
|
||||
// Prepare the loader. Either re-connect with an existing one,
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MainActivity extends BaseSecurityTokenActivity implements FabContai
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.main_activity);
|
||||
|
||||
mToolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
mToolbar.setTitle(R.string.app_name);
|
||||
setSupportActionBar(mToolbar);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public class MultiUserIdsFragment extends Fragment implements LoaderManager.Load
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.multi_user_ids_fragment, null);
|
||||
|
||||
mUserIds = (ListView) view.findViewById(R.id.view_key_user_ids);
|
||||
mUserIds = view.findViewById(R.id.view_key_user_ids);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
|
|
@ -186,12 +186,12 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
|||
alert.setView(view);
|
||||
|
||||
mBackupCodeEditText = new EditText[6];
|
||||
mBackupCodeEditText[0] = (EditText) view.findViewById(R.id.backup_code_1);
|
||||
mBackupCodeEditText[1] = (EditText) view.findViewById(R.id.backup_code_2);
|
||||
mBackupCodeEditText[2] = (EditText) view.findViewById(R.id.backup_code_3);
|
||||
mBackupCodeEditText[3] = (EditText) view.findViewById(R.id.backup_code_4);
|
||||
mBackupCodeEditText[4] = (EditText) view.findViewById(R.id.backup_code_5);
|
||||
mBackupCodeEditText[5] = (EditText) view.findViewById(R.id.backup_code_6);
|
||||
mBackupCodeEditText[0] = view.findViewById(R.id.backup_code_1);
|
||||
mBackupCodeEditText[1] = view.findViewById(R.id.backup_code_2);
|
||||
mBackupCodeEditText[2] = view.findViewById(R.id.backup_code_3);
|
||||
mBackupCodeEditText[3] = view.findViewById(R.id.backup_code_4);
|
||||
mBackupCodeEditText[4] = view.findViewById(R.id.backup_code_5);
|
||||
mBackupCodeEditText[5] = view.findViewById(R.id.backup_code_6);
|
||||
|
||||
setupEditTextFocusNext(mBackupCodeEditText);
|
||||
|
||||
|
@ -205,13 +205,13 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
|||
mLayout = (ViewAnimator) inflater.inflate(R.layout.passphrase_dialog, null);
|
||||
alert.setView(mLayout);
|
||||
|
||||
mPassphraseText = (TextView) mLayout.findViewById(R.id.passphrase_text);
|
||||
mPassphraseEditText = (EditText) mLayout.findViewById(R.id.passphrase_passphrase);
|
||||
mPassphraseText = mLayout.findViewById(R.id.passphrase_text);
|
||||
mPassphraseEditText = mLayout.findViewById(R.id.passphrase_passphrase);
|
||||
|
||||
View vTimeToLiveLayout = mLayout.findViewById(R.id.remember_layout);
|
||||
vTimeToLiveLayout.setVisibility(mRequiredInput.mSkipCaching ? View.GONE : View.VISIBLE);
|
||||
|
||||
mTimeToLiveSpinner = (CacheTTLSpinner) mLayout.findViewById(R.id.ttl_spinner);
|
||||
mTimeToLiveSpinner = mLayout.findViewById(R.id.ttl_spinner);
|
||||
int ttlSeconds = Preferences.getPreferences(getContext()).getCacheTtlSeconds();
|
||||
mTimeToLiveSpinner.setSelectedTimeToLive(ttlSeconds);
|
||||
|
||||
|
@ -293,7 +293,7 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
|||
mPassphraseEditText.setImeActionLabel(getString(android.R.string.ok), EditorInfo.IME_ACTION_DONE);
|
||||
mPassphraseEditText.setOnEditorActionListener(this);
|
||||
|
||||
final ImageButton keyboard = (ImageButton) mLayout.findViewById(R.id.passphrase_keyboard);
|
||||
final ImageButton keyboard = mLayout.findViewById(R.id.passphrase_keyboard);
|
||||
|
||||
if (keyType == CanonicalizedSecretKey.SecretKeyType.DIVERT_TO_CARD) {
|
||||
if (Preferences.getPreferences(activity).useNumKeypadForSecurityTokenPin()) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class QrCodeCaptureActivity extends FragmentActivity {
|
|||
|
||||
setContentView(R.layout.qr_code_capture_activity);
|
||||
|
||||
barcodeScannerView = (CompoundBarcodeView) findViewById(R.id.zxing_barcode_scanner);
|
||||
barcodeScannerView = findViewById(R.id.zxing_barcode_scanner);
|
||||
barcodeScannerView.setStatusText(getString(R.string.import_qr_code_text));
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
|
|
@ -65,8 +65,8 @@ public class QrCodeViewActivity extends BaseActivity {
|
|||
return;
|
||||
}
|
||||
|
||||
mQrCode = (ImageView) findViewById(R.id.qr_code_image);
|
||||
mQrCodeLayout = (CardView) findViewById(R.id.qr_code_image_layout);
|
||||
mQrCode = findViewById(R.id.qr_code_image);
|
||||
mQrCodeLayout = findViewById(R.id.qr_code_image_layout);
|
||||
|
||||
mQrCodeLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SafeSlingerActivity extends BaseActivity
|
|||
|
||||
mMasterKeyId = getIntent().getLongExtra(EXTRA_MASTER_KEY_ID, 0);
|
||||
|
||||
NumberPicker picker = (NumberPicker) findViewById(R.id.safe_slinger_picker);
|
||||
NumberPicker picker = findViewById(R.id.safe_slinger_picker);
|
||||
picker.setMinValue(2);
|
||||
picker.setMaxValue(10);
|
||||
picker.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
|
||||
|
@ -85,7 +85,7 @@ public class SafeSlingerActivity extends BaseActivity
|
|||
}
|
||||
});
|
||||
|
||||
ImageView buttonIcon = (ImageView) findViewById(R.id.safe_slinger_button_image);
|
||||
ImageView buttonIcon = findViewById(R.id.safe_slinger_button_image);
|
||||
buttonIcon.setColorFilter(FormattingUtils.getColorFromAttr(this, R.attr.colorTertiaryText),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SecurityTokenChangePinOperationActivity extends BaseSecurityTokenAc
|
|||
super.onCreate(savedInstanceState);
|
||||
Timber.d("NfcOperationActivity.onCreate");
|
||||
|
||||
nfcGuideView = (NfcGuideView) findViewById(R.id.nfc_guide_view);
|
||||
nfcGuideView = findViewById(R.id.nfc_guide_view);
|
||||
|
||||
// prevent annoying orientation changes while fumbling with the device
|
||||
OrientationUtils.lockOrientation(this);
|
||||
|
@ -86,14 +86,14 @@ public class SecurityTokenChangePinOperationActivity extends BaseSecurityTokenAc
|
|||
|
||||
setTitle(R.string.security_token_nfc_text);
|
||||
|
||||
vAnimator = (ViewAnimator) findViewById(R.id.view_animator);
|
||||
vAnimator = findViewById(R.id.view_animator);
|
||||
vAnimator.setDisplayedChild(0);
|
||||
|
||||
nfcGuideView.setCurrentStatus(NfcGuideView.NfcGuideViewStatus.STARTING_POSITION);
|
||||
|
||||
vErrorText = (TextView) findViewById(R.id.security_token_activity_3_error_text);
|
||||
vErrorTextPin = (TextView) findViewById(R.id.security_token_activity_4_error_text);
|
||||
vErrorTryAgainButton = (Button) findViewById(R.id.security_token_activity_3_error_try_again);
|
||||
vErrorText = findViewById(R.id.security_token_activity_3_error_text);
|
||||
vErrorTextPin = findViewById(R.id.security_token_activity_4_error_text);
|
||||
vErrorTryAgainButton = findViewById(R.id.security_token_activity_3_error_try_again);
|
||||
vErrorTryAgainButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -105,7 +105,7 @@ public class SecurityTokenChangePinOperationActivity extends BaseSecurityTokenAc
|
|||
nfcGuideView.setCurrentStatus(NfcGuideView.NfcGuideViewStatus.STARTING_POSITION);
|
||||
}
|
||||
});
|
||||
Button vCancel = (Button) findViewById(R.id.security_token_activity_0_cancel);
|
||||
Button vCancel = findViewById(R.id.security_token_activity_0_cancel);
|
||||
vCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -94,7 +94,7 @@ public class SecurityTokenOperationActivity extends BaseSecurityTokenActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
Timber.d("NfcOperationActivity.onCreate");
|
||||
|
||||
nfcGuideView = (NfcGuideView) findViewById(R.id.nfc_guide_view);
|
||||
nfcGuideView = findViewById(R.id.nfc_guide_view);
|
||||
|
||||
// prevent annoying orientation changes while fumbling with the device
|
||||
OrientationUtils.lockOrientation(this);
|
||||
|
@ -107,13 +107,13 @@ public class SecurityTokenOperationActivity extends BaseSecurityTokenActivity {
|
|||
|
||||
setTitle(R.string.security_token_nfc_text);
|
||||
|
||||
vAnimator = (ViewAnimator) findViewById(R.id.view_animator);
|
||||
vAnimator = findViewById(R.id.view_animator);
|
||||
vAnimator.setDisplayedChild(0);
|
||||
|
||||
nfcGuideView.setCurrentStatus(NfcGuideView.NfcGuideViewStatus.STARTING_POSITION);
|
||||
|
||||
vErrorText = (TextView) findViewById(R.id.security_token_activity_3_error_text);
|
||||
vErrorTryAgainButton = (Button) findViewById(R.id.security_token_activity_3_error_try_again);
|
||||
vErrorText = findViewById(R.id.security_token_activity_3_error_text);
|
||||
vErrorTryAgainButton = findViewById(R.id.security_token_activity_3_error_try_again);
|
||||
vErrorTryAgainButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -126,7 +126,7 @@ public class SecurityTokenOperationActivity extends BaseSecurityTokenActivity {
|
|||
nfcGuideView.setCurrentStatus(NfcGuideView.NfcGuideViewStatus.STARTING_POSITION);
|
||||
}
|
||||
});
|
||||
Button vCancel = (Button) findViewById(R.id.security_token_activity_0_cancel);
|
||||
Button vCancel = findViewById(R.id.security_token_activity_0_cancel);
|
||||
vCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -100,7 +100,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||
* Hack to get Toolbar in PreferenceActivity. See http://stackoverflow.com/a/26614696
|
||||
*/
|
||||
private void setupToolbar() {
|
||||
ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
|
||||
ViewGroup root = findViewById(android.R.id.content);
|
||||
LinearLayout content = (LinearLayout) root.getChildAt(0);
|
||||
LinearLayout toolbarContainer = (LinearLayout) View.inflate(this, R.layout.preference_toolbar, null);
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||
toolbarContainer.addView(content);
|
||||
root.addView(toolbarContainer);
|
||||
|
||||
Toolbar toolbar = (Toolbar) toolbarContainer.findViewById(R.id.toolbar);
|
||||
Toolbar toolbar = toolbarContainer.findViewById(R.id.toolbar);
|
||||
|
||||
toolbar.setTitle(R.string.title_preferences);
|
||||
// noinspection deprecation, TODO use alternative in API level 21
|
||||
|
|
|
@ -92,7 +92,7 @@ public class SettingsKeyserverFragment extends Fragment implements RecyclerItemC
|
|||
|
||||
mAdapter = new KeyserverListAdapter(mKeyserversMutable);
|
||||
|
||||
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.keyserver_recycler_view);
|
||||
RecyclerView recyclerView = view.findViewById(R.id.keyserver_recycler_view);
|
||||
// recyclerView.setHasFixedSize(true); // the size of the first item changes
|
||||
recyclerView.setAdapter(mAdapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
@ -312,11 +312,11 @@ public class SettingsKeyserverFragment extends Fragment implements RecyclerItemC
|
|||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
outerLayout = (ViewGroup) itemView.findViewById(R.id.outer_layout);
|
||||
selectedServerLabel = (TextView) itemView.findViewById(
|
||||
outerLayout = itemView.findViewById(R.id.outer_layout);
|
||||
selectedServerLabel = itemView.findViewById(
|
||||
R.id.selected_keyserver_title);
|
||||
keyserverUrl = (TextView) itemView.findViewById(R.id.keyserver_tv);
|
||||
dragHandleView = (ImageView) itemView.findViewById(R.id.drag_handle);
|
||||
keyserverUrl = itemView.findViewById(R.id.keyserver_tv);
|
||||
dragHandleView = itemView.findViewById(R.id.drag_handle);
|
||||
|
||||
itemView.setClickable(true);
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public class SettingsSmartPGPAuthorityFragment extends Fragment implements Recyc
|
|||
mAuthorities = new ArrayList<>(authorities);
|
||||
mAdapter = new AuthorityListAdapter(mAuthorities);
|
||||
|
||||
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.smartpgp_authority_recycler_view);
|
||||
RecyclerView recyclerView = view.findViewById(R.id.smartpgp_authority_recycler_view);
|
||||
recyclerView.setAdapter(mAdapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
||||
|
@ -316,8 +316,8 @@ public class SettingsSmartPGPAuthorityFragment extends Fragment implements Recyc
|
|||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
outerLayout = (ViewGroup) itemView.findViewById(R.id.outer_layout);
|
||||
authorityName = (TextView) itemView.findViewById(R.id.smartpgp_authority_tv);
|
||||
outerLayout = itemView.findViewById(R.id.outer_layout);
|
||||
authorityName = itemView.findViewById(R.id.smartpgp_authority_tv);
|
||||
itemView.setClickable(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class UploadKeyActivity extends BaseActivity
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
mUploadButton = findViewById(R.id.upload_key_action_upload);
|
||||
mKeyServerSpinner = (Spinner) findViewById(R.id.upload_key_keyserver);
|
||||
mKeyServerSpinner = findViewById(R.id.upload_key_keyserver);
|
||||
|
||||
MultiUserIdsFragment mMultiUserIdsFragment = (MultiUserIdsFragment)
|
||||
getSupportFragmentManager().findFragmentById(R.id.multi_user_ids_fragment);
|
||||
|
|
|
@ -84,15 +84,15 @@ public class ViewCertActivity extends BaseActivity
|
|||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mSigneeKey = (TextView) findViewById(R.id.signee_key);
|
||||
mSigneeUid = (TextView) findViewById(R.id.signee_uid);
|
||||
mAlgorithm = (TextView) findViewById(R.id.algorithm);
|
||||
mType = (TextView) findViewById(R.id.signature_type);
|
||||
mReason = (TextView) findViewById(R.id.reason);
|
||||
mCreation = (TextView) findViewById(R.id.creation);
|
||||
mSigneeKey = findViewById(R.id.signee_key);
|
||||
mSigneeUid = findViewById(R.id.signee_uid);
|
||||
mAlgorithm = findViewById(R.id.algorithm);
|
||||
mType = findViewById(R.id.signature_type);
|
||||
mReason = findViewById(R.id.reason);
|
||||
mCreation = findViewById(R.id.creation);
|
||||
|
||||
mCertifierKey = (TextView) findViewById(R.id.signer_key_id);
|
||||
mCertifierUid = (TextView) findViewById(R.id.signer_uid);
|
||||
mCertifierKey = findViewById(R.id.signer_key_id);
|
||||
mCertifierUid = findViewById(R.id.signer_uid);
|
||||
|
||||
mRowReason = findViewById(R.id.row_reason);
|
||||
|
||||
|
|
|
@ -90,8 +90,8 @@ public class ViewKeyAdvActivity extends BaseActivity implements
|
|||
|
||||
mKeyRepository = KeyRepository.create(this);
|
||||
|
||||
mViewPager = (ViewPager) findViewById(R.id.pager);
|
||||
mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.sliding_tab_layout);
|
||||
mViewPager = findViewById(R.id.pager);
|
||||
mSlidingTabLayout = findViewById(R.id.sliding_tab_layout);
|
||||
|
||||
mDataUri = getIntent().getData();
|
||||
if (mDataUri == null) {
|
||||
|
|
|
@ -93,8 +93,8 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
|||
View root = super.onCreateView(inflater, superContainer, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.view_key_adv_share_fragment, getContainer());
|
||||
|
||||
mFingerprintView = (TextView) view.findViewById(R.id.view_key_fingerprint);
|
||||
mQrCode = (ImageView) view.findViewById(R.id.view_key_qr_code);
|
||||
mFingerprintView = view.findViewById(R.id.view_key_fingerprint);
|
||||
mQrCode = view.findViewById(R.id.view_key_qr_code);
|
||||
|
||||
// We cache the QR code bitmap in its smallest possible size, then scale
|
||||
// it manually for the correct size whenever the layout of the ImageView
|
||||
|
@ -123,7 +123,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
|||
}
|
||||
}
|
||||
});
|
||||
mQrCodeLayout = (CardView) view.findViewById(R.id.view_key_qr_code_layout);
|
||||
mQrCodeLayout = view.findViewById(R.id.view_key_qr_code_layout);
|
||||
mQrCodeLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -135,7 +135,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
|
|||
View vFingerprintClipboardButton = view.findViewById(R.id.view_key_action_fingerprint_clipboard);
|
||||
View vKeyShareButton = view.findViewById(R.id.view_key_action_key_share);
|
||||
View vKeyClipboardButton = view.findViewById(R.id.view_key_action_key_clipboard);
|
||||
ImageButton vKeySafeSlingerButton = (ImageButton) view.findViewById(R.id.view_key_action_key_safeslinger);
|
||||
ImageButton vKeySafeSlingerButton = view.findViewById(R.id.view_key_action_key_safeslinger);
|
||||
View vKeySshShareButton = view.findViewById(R.id.view_key_action_key_ssh_share);
|
||||
View vKeySshClipboardButton = view.findViewById(R.id.view_key_action_key_ssh_clipboard);
|
||||
View vKeyUploadButton = view.findViewById(R.id.view_key_action_upload);
|
||||
|
|
|
@ -37,8 +37,7 @@ public class ViewKeyAdvStartFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.view_key_adv_start_fragment, container, false);
|
||||
|
||||
HtmlTextView textView = (HtmlTextView)
|
||||
view.findViewById(R.id.view_key_adv_start_text);
|
||||
HtmlTextView textView = view.findViewById(R.id.view_key_adv_start_text);
|
||||
|
||||
// load markdown from raw resource
|
||||
try {
|
||||
|
|
|
@ -86,8 +86,8 @@ public class ViewKeyAdvSubkeysFragment extends LoaderFragment implements
|
|||
View root = super.onCreateView(inflater, superContainer, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.view_key_adv_subkeys_fragment, getContainer());
|
||||
|
||||
mSubkeysList = (ListView) view.findViewById(R.id.view_key_subkeys);
|
||||
mSubkeysAddedList = (ListView) view.findViewById(R.id.view_key_subkeys_added);
|
||||
mSubkeysList = view.findViewById(R.id.view_key_subkeys);
|
||||
mSubkeysAddedList = view.findViewById(R.id.view_key_subkeys_added);
|
||||
mSubkeysAddedLayout = view.findViewById(R.id.view_key_subkeys_add_layout);
|
||||
|
||||
mSubkeysList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
@ -108,7 +108,7 @@ public class ViewKeyAdvSubkeysFragment extends LoaderFragment implements
|
|||
footer.setLayoutParams(params);
|
||||
mSubkeysAddedList.addFooterView(footer, null, false);
|
||||
|
||||
mSubkeyAddFabLayout = (ViewAnimator) view.findViewById(R.id.view_key_subkey_fab_layout);
|
||||
mSubkeyAddFabLayout = view.findViewById(R.id.view_key_subkey_fab_layout);
|
||||
view.findViewById(R.id.view_key_subkey_fab).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -85,8 +85,8 @@ public class ViewKeyAdvUserIdsFragment extends LoaderFragment implements
|
|||
View root = super.onCreateView(inflater, superContainer, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.view_key_adv_user_ids_fragment, getContainer());
|
||||
|
||||
mUserIds = (ListView) view.findViewById(R.id.view_key_user_ids);
|
||||
mUserIdsAddedList = (ListView) view.findViewById(R.id.view_key_user_ids_added);
|
||||
mUserIds = view.findViewById(R.id.view_key_user_ids);
|
||||
mUserIdsAddedList = view.findViewById(R.id.view_key_user_ids_added);
|
||||
mUserIdsAddedLayout = view.findViewById(R.id.view_key_user_ids_add_layout);
|
||||
|
||||
mUserIds.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
@ -107,7 +107,7 @@ public class ViewKeyAdvUserIdsFragment extends LoaderFragment implements
|
|||
footer.setLayoutParams(params);
|
||||
mUserIdsAddedList.addFooterView(footer, null, false);
|
||||
|
||||
mUserIdAddFabLayout = (ViewAnimator) view.findViewById(R.id.view_key_subkey_fab_layout);
|
||||
mUserIdAddFabLayout = view.findViewById(R.id.view_key_subkey_fab_layout);
|
||||
view.findViewById(R.id.view_key_subkey_fab).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -105,10 +105,10 @@ public class ViewKeyKeybaseFragment extends LoaderFragment implements
|
|||
View view = inflater.inflate(R.layout.view_key_adv_keybase_fragment, getContainer());
|
||||
mInflater = inflater;
|
||||
|
||||
mReportHeader = (TextView) view.findViewById(R.id.view_key_trust_cloud_narrative);
|
||||
mProofListing = (TableLayout) view.findViewById(R.id.view_key_proof_list);
|
||||
mReportHeader = view.findViewById(R.id.view_key_trust_cloud_narrative);
|
||||
mProofListing = view.findViewById(R.id.view_key_proof_list);
|
||||
mProofVerifyHeader = view.findViewById(R.id.view_key_proof_verify_header);
|
||||
mProofVerifyDetail = (TextView) view.findViewById(R.id.view_key_proof_verify_detail);
|
||||
mProofVerifyDetail = view.findViewById(R.id.view_key_proof_verify_detail);
|
||||
mReportHeader.setVisibility(View.GONE);
|
||||
mProofListing.setVisibility(View.GONE);
|
||||
mProofVerifyHeader.setVisibility(View.GONE);
|
||||
|
@ -337,8 +337,8 @@ public class ViewKeyKeybaseFragment extends LoaderFragment implements
|
|||
int rowNumber = 1;
|
||||
for (CharSequence s : result.mProofs) {
|
||||
TableRow row = (TableRow) mInflater.inflate(R.layout.view_key_adv_keybase_proof, null);
|
||||
TextView number = (TextView) row.findViewById(R.id.proof_number);
|
||||
TextView text = (TextView) row.findViewById(R.id.proof_text);
|
||||
TextView number = row.findViewById(R.id.proof_number);
|
||||
TextView text = row.findViewById(R.id.proof_text);
|
||||
number.setText(Integer.toString(rowNumber++) + ". ");
|
||||
text.setText(s);
|
||||
text.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
|
|
@ -97,9 +97,9 @@ public class CertSectionedListAdapter extends SectionCursorAdapter<CertCursor, S
|
|||
itemView.setClickable(true);
|
||||
itemView.setOnClickListener(this);
|
||||
|
||||
mSignerName = (TextView) itemView.findViewById(R.id.signerName);
|
||||
mSignStatus = (TextView) itemView.findViewById(R.id.signStatus);
|
||||
mSignerKeyId = (TextView) itemView.findViewById(R.id.signerKeyId);
|
||||
mSignerName = itemView.findViewById(R.id.signerName);
|
||||
mSignStatus = itemView.findViewById(R.id.signStatus);
|
||||
mSignerKeyId = itemView.findViewById(R.id.signerKeyId);
|
||||
}
|
||||
|
||||
public void bind(CertCursor cursor) {
|
||||
|
@ -154,7 +154,7 @@ public class CertSectionedListAdapter extends SectionCursorAdapter<CertCursor, S
|
|||
|
||||
public CertSectionViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
mHeaderText = (TextView) itemView.findViewById(R.id.stickylist_header_text);
|
||||
mHeaderText = itemView.findViewById(R.id.stickylist_header_text);
|
||||
}
|
||||
|
||||
public void bind(String text) {
|
||||
|
|
|
@ -140,10 +140,10 @@ public class IdentityAdapter extends RecyclerView.Adapter<ViewHolder> {
|
|||
public LinkedIdViewHolder(View view, final IdentityClickListener identityClickListener) {
|
||||
super(view);
|
||||
|
||||
vVerified = (ImageView) view.findViewById(R.id.linked_id_certified_icon);
|
||||
vIcon = (ImageView) view.findViewById(R.id.linked_id_type_icon);
|
||||
vTitle = (TextView) view.findViewById(R.id.linked_id_title);
|
||||
vComment = (TextView) view.findViewById(R.id.linked_id_comment);
|
||||
vVerified = view.findViewById(R.id.linked_id_certified_icon);
|
||||
vIcon = view.findViewById(R.id.linked_id_type_icon);
|
||||
vTitle = view.findViewById(R.id.linked_id_title);
|
||||
vComment = view.findViewById(R.id.linked_id_comment);
|
||||
|
||||
view.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
@ -214,12 +214,12 @@ public class IdentityAdapter extends RecyclerView.Adapter<ViewHolder> {
|
|||
private UserIdViewHolder(View view, final IdentityClickListener identityClickListener) {
|
||||
super(view);
|
||||
|
||||
vName = (TextView) view.findViewById(R.id.user_id_item_name);
|
||||
vAddress = (TextView) view.findViewById(R.id.user_id_item_address);
|
||||
vComment = (TextView) view.findViewById(R.id.user_id_item_comment);
|
||||
vName = view.findViewById(R.id.user_id_item_name);
|
||||
vAddress = view.findViewById(R.id.user_id_item_address);
|
||||
vComment = view.findViewById(R.id.user_id_item_comment);
|
||||
|
||||
vIcon = (ImageView) view.findViewById(R.id.trust_id_app_icon);
|
||||
vMore = (ImageView) view.findViewById(R.id.user_id_item_more);
|
||||
vIcon = view.findViewById(R.id.trust_id_app_icon);
|
||||
vMore = view.findViewById(R.id.user_id_item_more);
|
||||
|
||||
view.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -113,12 +113,12 @@ public class KeyAdapter extends CursorAdapter {
|
|||
public KeyItemViewHolder(View view) {
|
||||
mView = view;
|
||||
mLayoutData = view.findViewById(R.id.key_list_item_data);
|
||||
mMainUserId = (TextView) view.findViewById(R.id.key_list_item_name);
|
||||
mMainUserIdRest = (TextView) view.findViewById(R.id.key_list_item_email);
|
||||
mStatus = (ImageView) view.findViewById(R.id.key_list_item_status_icon);
|
||||
mMainUserId = view.findViewById(R.id.key_list_item_name);
|
||||
mMainUserIdRest = view.findViewById(R.id.key_list_item_email);
|
||||
mStatus = view.findViewById(R.id.key_list_item_status_icon);
|
||||
mSlinger = view.findViewById(R.id.key_list_item_slinger_view);
|
||||
mSlingerButton = (ImageButton) view.findViewById(R.id.key_list_item_slinger_button);
|
||||
mCreationDate = (TextView) view.findViewById(R.id.key_list_item_creation);
|
||||
mSlingerButton = view.findViewById(R.id.key_list_item_slinger_button);
|
||||
mCreationDate = view.findViewById(R.id.key_list_item_creation);
|
||||
}
|
||||
|
||||
public void setData(Context context, KeyItem item, Highlighter highlighter, boolean enabled) {
|
||||
|
|
|
@ -363,13 +363,13 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
|||
KeyItemViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
mMainUserId = (TextView) itemView.findViewById(R.id.key_list_item_name);
|
||||
mMainUserIdRest = (TextView) itemView.findViewById(R.id.key_list_item_email);
|
||||
mStatus = (ImageView) itemView.findViewById(R.id.key_list_item_status_icon);
|
||||
mMainUserId = itemView.findViewById(R.id.key_list_item_name);
|
||||
mMainUserIdRest = itemView.findViewById(R.id.key_list_item_email);
|
||||
mStatus = itemView.findViewById(R.id.key_list_item_status_icon);
|
||||
mSlinger = itemView.findViewById(R.id.key_list_item_slinger_view);
|
||||
mSlingerButton = (ImageButton) itemView.findViewById(R.id.key_list_item_slinger_button);
|
||||
mCreationDate = (TextView) itemView.findViewById(R.id.key_list_item_creation);
|
||||
mTrustIdIcon = (ImageView) itemView.findViewById(R.id.key_list_item_tid_icon);
|
||||
mSlingerButton = itemView.findViewById(R.id.key_list_item_slinger_button);
|
||||
mCreationDate = itemView.findViewById(R.id.key_list_item_creation);
|
||||
mTrustIdIcon = itemView.findViewById(R.id.key_list_item_tid_icon);
|
||||
|
||||
itemView.setClickable(true);
|
||||
itemView.setLongClickable(true);
|
||||
|
@ -563,7 +563,7 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
|||
|
||||
public KeyHeaderViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
mText1 = (TextView) itemView.findViewById(android.R.id.text1);
|
||||
mText1 = itemView.findViewById(android.R.id.text1);
|
||||
}
|
||||
|
||||
public void bind(String title) {
|
||||
|
|
|
@ -48,7 +48,7 @@ public class KeySelectableAdapter extends KeyAdapter implements OnItemClickListe
|
|||
|
||||
public KeySelectableItemViewHolder(View view) {
|
||||
super(view);
|
||||
mCheckbox = (CheckBox) view.findViewById(R.id.selected);
|
||||
mCheckbox = view.findViewById(R.id.selected);
|
||||
}
|
||||
|
||||
public void setCheckedState(boolean checked) {
|
||||
|
|
|
@ -75,9 +75,9 @@ public class MultiUserIdsAdapter extends CursorAdapter {
|
|||
|
||||
@Override
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
TextView vHeaderId = (TextView) view.findViewById(R.id.user_id_header);
|
||||
TextView vName = (TextView) view.findViewById(R.id.user_id_item_name);
|
||||
TextView vAddresses = (TextView) view.findViewById(R.id.user_id_item_addresses);
|
||||
TextView vHeaderId = view.findViewById(R.id.user_id_header);
|
||||
TextView vName = view.findViewById(R.id.user_id_item_name);
|
||||
TextView vAddresses = view.findViewById(R.id.user_id_item_addresses);
|
||||
|
||||
byte[] data = cursor.getBlob(1);
|
||||
int isHeader = cursor.getInt(2);
|
||||
|
@ -135,7 +135,7 @@ public class MultiUserIdsAdapter extends CursorAdapter {
|
|||
vAddresses.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
final CheckBox vCheckBox = (CheckBox) view.findViewById(R.id.user_id_item_check_box);
|
||||
final CheckBox vCheckBox = view.findViewById(R.id.user_id_item_check_box);
|
||||
final int position = cursor.getPosition();
|
||||
vCheckBox.setOnCheckedChangeListener(null);
|
||||
vCheckBox.setChecked(mCheckStates.get(position));
|
||||
|
|
|
@ -152,8 +152,8 @@ public class NestedLogAdapter extends RecyclerView.Adapter<NestedLogAdapter.LogE
|
|||
public LogEntryViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
mLogText = (TextView) itemView.findViewById(R.id.log_text);
|
||||
mLogImg = (ImageView) itemView.findViewById(R.id.log_img);
|
||||
mLogText = itemView.findViewById(R.id.log_text);
|
||||
mLogImg = itemView.findViewById(R.id.log_img);
|
||||
}
|
||||
|
||||
public void bind(OperationResult.LogEntryParcel entry, int indentFactor) {
|
||||
|
@ -213,8 +213,8 @@ public class NestedLogAdapter extends RecyclerView.Adapter<NestedLogAdapter.LogE
|
|||
itemView.setClickable(true);
|
||||
itemView.setOnClickListener(this);
|
||||
|
||||
mSublogText = (TextView) itemView.findViewById(R.id.log_second_text);
|
||||
mSublogImg = (ImageView) itemView.findViewById(R.id.log_second_img);
|
||||
mSublogText = itemView.findViewById(R.id.log_second_text);
|
||||
mSublogImg = itemView.findViewById(R.id.log_second_img);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -152,18 +152,18 @@ public class SubkeysAdapter extends CursorAdapter {
|
|||
|
||||
@Override
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
TextView vKeyId = (TextView) view.findViewById(R.id.subkey_item_key_id);
|
||||
TextView vKeyDetails = (TextView) view.findViewById(R.id.subkey_item_details);
|
||||
TextView vKeyExpiry = (TextView) view.findViewById(R.id.subkey_item_expiry);
|
||||
ImageView vCertifyIcon = (ImageView) view.findViewById(R.id.subkey_item_ic_certify);
|
||||
ImageView vSignIcon = (ImageView) view.findViewById(R.id.subkey_item_ic_sign);
|
||||
ImageView vEncryptIcon = (ImageView) view.findViewById(R.id.subkey_item_ic_encrypt);
|
||||
ImageView vAuthenticateIcon = (ImageView) view.findViewById(R.id.subkey_item_ic_authenticate);
|
||||
ImageView vEditImage = (ImageView) view.findViewById(R.id.subkey_item_edit_image);
|
||||
ImageView vStatus = (ImageView) view.findViewById(R.id.subkey_item_status);
|
||||
TextView vKeyId = view.findViewById(R.id.subkey_item_key_id);
|
||||
TextView vKeyDetails = view.findViewById(R.id.subkey_item_details);
|
||||
TextView vKeyExpiry = view.findViewById(R.id.subkey_item_expiry);
|
||||
ImageView vCertifyIcon = view.findViewById(R.id.subkey_item_ic_certify);
|
||||
ImageView vSignIcon = view.findViewById(R.id.subkey_item_ic_sign);
|
||||
ImageView vEncryptIcon = view.findViewById(R.id.subkey_item_ic_encrypt);
|
||||
ImageView vAuthenticateIcon = view.findViewById(R.id.subkey_item_ic_authenticate);
|
||||
ImageView vEditImage = view.findViewById(R.id.subkey_item_edit_image);
|
||||
ImageView vStatus = view.findViewById(R.id.subkey_item_status);
|
||||
|
||||
// not used:
|
||||
ImageView deleteImage = (ImageView) view.findViewById(R.id.subkey_item_delete_button);
|
||||
ImageView deleteImage = view.findViewById(R.id.subkey_item_delete_button);
|
||||
deleteImage.setVisibility(View.GONE);
|
||||
|
||||
long keyId = cursor.getLong(INDEX_KEY_ID);
|
||||
|
@ -334,7 +334,7 @@ public class SubkeysAdapter extends CursorAdapter {
|
|||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
View view = mInflater.inflate(R.layout.view_key_adv_subkey_item, null);
|
||||
if (mDefaultTextColor == null) {
|
||||
TextView keyId = (TextView) view.findViewById(R.id.subkey_item_key_id);
|
||||
TextView keyId = view.findViewById(R.id.subkey_item_key_id);
|
||||
mDefaultTextColor = keyId.getTextColors();
|
||||
}
|
||||
return view;
|
||||
|
|
|
@ -73,21 +73,21 @@ public class SubkeysAddedAdapter extends ArrayAdapter<SaveKeyringParcel.SubkeyAd
|
|||
// Not recycled, inflate a new view
|
||||
convertView = mInflater.inflate(R.layout.view_key_adv_subkey_item, parent, false);
|
||||
final ViewHolder holder = new ViewHolder();
|
||||
holder.vKeyId = (TextView) convertView.findViewById(R.id.subkey_item_key_id);
|
||||
holder.vKeyDetails = (TextView) convertView.findViewById(R.id.subkey_item_details);
|
||||
holder.vKeyExpiry = (TextView) convertView.findViewById(R.id.subkey_item_expiry);
|
||||
holder.vCertifyIcon = (ImageView) convertView.findViewById(R.id.subkey_item_ic_certify);
|
||||
holder.vSignIcon = (ImageView) convertView.findViewById(R.id.subkey_item_ic_sign);
|
||||
holder.vEncryptIcon = (ImageView) convertView.findViewById(R.id.subkey_item_ic_encrypt);
|
||||
holder.vAuthenticateIcon = (ImageView) convertView.findViewById(R.id.subkey_item_ic_authenticate);
|
||||
holder.vKeyId = convertView.findViewById(R.id.subkey_item_key_id);
|
||||
holder.vKeyDetails = convertView.findViewById(R.id.subkey_item_details);
|
||||
holder.vKeyExpiry = convertView.findViewById(R.id.subkey_item_expiry);
|
||||
holder.vCertifyIcon = convertView.findViewById(R.id.subkey_item_ic_certify);
|
||||
holder.vSignIcon = convertView.findViewById(R.id.subkey_item_ic_sign);
|
||||
holder.vEncryptIcon = convertView.findViewById(R.id.subkey_item_ic_encrypt);
|
||||
holder.vAuthenticateIcon = convertView.findViewById(R.id.subkey_item_ic_authenticate);
|
||||
|
||||
holder.vDelete = (ImageButton) convertView.findViewById(R.id.subkey_item_delete_button);
|
||||
holder.vDelete = convertView.findViewById(R.id.subkey_item_delete_button);
|
||||
holder.vDelete.setVisibility(View.VISIBLE); // always visible
|
||||
|
||||
// not used:
|
||||
ImageView vEdit = (ImageView) convertView.findViewById(R.id.subkey_item_edit_image);
|
||||
ImageView vEdit = convertView.findViewById(R.id.subkey_item_edit_image);
|
||||
vEdit.setVisibility(View.GONE);
|
||||
ImageView vStatus = (ImageView) convertView.findViewById(R.id.subkey_item_status);
|
||||
ImageView vStatus = convertView.findViewById(R.id.subkey_item_status);
|
||||
vStatus.setVisibility(View.GONE);
|
||||
|
||||
convertView.setTag(holder);
|
||||
|
|
|
@ -56,13 +56,13 @@ public class UserIdsAdapter extends UserAttributesAdapter {
|
|||
|
||||
@Override
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
TextView vName = (TextView) view.findViewById(R.id.user_id_item_name);
|
||||
TextView vAddress = (TextView) view.findViewById(R.id.user_id_item_address);
|
||||
TextView vComment = (TextView) view.findViewById(R.id.user_id_item_comment);
|
||||
ImageView vVerified = (ImageView) view.findViewById(R.id.user_id_item_certified);
|
||||
ViewAnimator vVerifiedLayout = (ViewAnimator) view.findViewById(R.id.user_id_icon_animator);
|
||||
TextView vName = view.findViewById(R.id.user_id_item_name);
|
||||
TextView vAddress = view.findViewById(R.id.user_id_item_address);
|
||||
TextView vComment = view.findViewById(R.id.user_id_item_comment);
|
||||
ImageView vVerified = view.findViewById(R.id.user_id_item_certified);
|
||||
ViewAnimator vVerifiedLayout = view.findViewById(R.id.user_id_icon_animator);
|
||||
|
||||
ImageView vDeleteButton = (ImageView) view.findViewById(R.id.user_id_item_delete_button);
|
||||
ImageView vDeleteButton = view.findViewById(R.id.user_id_item_delete_button);
|
||||
vDeleteButton.setVisibility(View.GONE); // not used
|
||||
|
||||
String userId = cursor.getString(INDEX_USER_ID);
|
||||
|
|
|
@ -66,15 +66,15 @@ public class UserIdsAddedAdapter extends ArrayAdapter<String> {
|
|||
// Not recycled, inflate a new view
|
||||
convertView = mInflater.inflate(R.layout.view_key_adv_user_id_item, null);
|
||||
final ViewHolder holder = new ViewHolder();
|
||||
holder.vAddress = (TextView) convertView.findViewById(R.id.user_id_item_address);
|
||||
holder.vName = (TextView) convertView.findViewById(R.id.user_id_item_name);
|
||||
holder.vComment = (TextView) convertView.findViewById(R.id.user_id_item_comment);
|
||||
holder.vDelete = (ImageButton) convertView.findViewById(R.id.user_id_item_delete_button);
|
||||
holder.vAddress = convertView.findViewById(R.id.user_id_item_address);
|
||||
holder.vName = convertView.findViewById(R.id.user_id_item_name);
|
||||
holder.vComment = convertView.findViewById(R.id.user_id_item_comment);
|
||||
holder.vDelete = convertView.findViewById(R.id.user_id_item_delete_button);
|
||||
holder.vDelete.setVisibility(View.VISIBLE); // always visible
|
||||
|
||||
// not used:
|
||||
View certifiedLayout = convertView.findViewById(R.id.user_id_icon_animator);
|
||||
ImageView editImage = (ImageView) convertView.findViewById(R.id.user_id_item_edit_image);
|
||||
ImageView editImage = convertView.findViewById(R.id.user_id_item_edit_image);
|
||||
certifiedLayout.setVisibility(View.GONE);
|
||||
editImage.setVisibility(View.GONE);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
protected void initToolbar() {
|
||||
mToolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
if (mToolbar != null) {
|
||||
setSupportActionBar(mToolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
@ -121,7 +121,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
|
||||
final View customActionBarView = inflater.inflate(R.layout.full_screen_dialog, null);
|
||||
|
||||
TextView firstTextView = ((TextView) customActionBarView.findViewById(R.id.full_screen_dialog_done_text));
|
||||
TextView firstTextView = customActionBarView.findViewById(R.id.full_screen_dialog_done_text);
|
||||
firstTextView.setText(doneText);
|
||||
customActionBarView.findViewById(R.id.full_screen_dialog_done).setOnClickListener(
|
||||
doneOnClickListener);
|
||||
|
@ -174,12 +174,12 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
final View customActionBarView = inflater.inflate(
|
||||
R.layout.full_screen_dialog_2, null);
|
||||
|
||||
TextView firstTextView = ((TextView) customActionBarView.findViewById(R.id.actionbar_done_text));
|
||||
TextView firstTextView = customActionBarView.findViewById(R.id.actionbar_done_text);
|
||||
firstTextView.setText(firstText);
|
||||
firstTextView.setCompoundDrawablesWithIntrinsicBounds(firstDrawableId, 0, 0, 0);
|
||||
customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
|
||||
firstOnClickListener);
|
||||
TextView secondTextView = ((TextView) customActionBarView.findViewById(R.id.actionbar_cancel_text));
|
||||
TextView secondTextView = customActionBarView.findViewById(R.id.actionbar_cancel_text);
|
||||
secondTextView.setText(secondText);
|
||||
secondTextView.setCompoundDrawablesWithIntrinsicBounds(secondDrawableId, 0, 0, 0);
|
||||
customActionBarView.findViewById(R.id.actionbar_cancel).setOnClickListener(
|
||||
|
|
|
@ -45,7 +45,7 @@ public abstract class LoaderFragment extends Fragment {
|
|||
View root = inflater.inflate(R.layout.loader_layout, container, false);
|
||||
|
||||
mContentShown = true;
|
||||
mContainer = (ViewGroup) root.findViewById(R.id.loader_container);
|
||||
mContainer = root.findViewById(R.id.loader_container);
|
||||
mProgressContainer = root.findViewById(R.id.loader_progress);
|
||||
|
||||
// content is not shown (by visibility statuses in the layout files)
|
||||
|
|
|
@ -129,12 +129,12 @@ public class AddEditKeyserverDialogFragment extends DialogFragment implements On
|
|||
View view = inflater.inflate(R.layout.add_keyserver_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
mKeyserverEditText = (EditText) view.findViewById(R.id.keyserver_url_edit_text);
|
||||
mKeyserverEditTextLayout = (TextInputLayout) view.findViewById(R.id.keyserver_url_edit_text_layout);
|
||||
mKeyserverEditOnionText = (EditText) view.findViewById(R.id.keyserver_onion_edit_text);
|
||||
mKeyserverEditOnionTextLayout = (TextInputLayout) view.findViewById(R.id.keyserver_onion_edit_text_layout);
|
||||
mVerifyKeyserverCheckBox = (CheckBox) view.findViewById(R.id.verify_connection_checkbox);
|
||||
mOnlyTrustedKeyserverCheckBox = (CheckBox) view.findViewById(R.id.only_trusted_keyserver_checkbox);
|
||||
mKeyserverEditText = view.findViewById(R.id.keyserver_url_edit_text);
|
||||
mKeyserverEditTextLayout = view.findViewById(R.id.keyserver_url_edit_text_layout);
|
||||
mKeyserverEditOnionText = view.findViewById(R.id.keyserver_onion_edit_text);
|
||||
mKeyserverEditOnionTextLayout = view.findViewById(R.id.keyserver_onion_edit_text_layout);
|
||||
mVerifyKeyserverCheckBox = view.findViewById(R.id.verify_connection_checkbox);
|
||||
mOnlyTrustedKeyserverCheckBox = view.findViewById(R.id.only_trusted_keyserver_checkbox);
|
||||
mVerifyKeyserverCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
|
|
|
@ -114,9 +114,9 @@ public class AddEditSmartPGPAuthorityDialogFragment extends DialogFragment imple
|
|||
View view = inflater.inflate(R.layout.add_smartpgp_authority_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
mAuthorityAliasText = (EditText) view.findViewById(R.id.smartpgp_authority_alias_edit_text);
|
||||
mAuthorityAliasTextLayout = (TextInputLayout) view.findViewById(R.id.smartpgp_authority_alias_edit_text_layout);
|
||||
mAuthorityAdd = (Button) view.findViewById(R.id.smartpgp_authority_filename);
|
||||
mAuthorityAliasText = view.findViewById(R.id.smartpgp_authority_alias_edit_text);
|
||||
mAuthorityAliasTextLayout = view.findViewById(R.id.smartpgp_authority_alias_edit_text_layout);
|
||||
mAuthorityAdd = view.findViewById(R.id.smartpgp_authority_filename);
|
||||
|
||||
mAuthorityAdd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -79,7 +79,7 @@ public class AddEmailDialogFragment extends DialogFragment implements OnEditorAc
|
|||
View view = inflater.inflate(R.layout.add_email_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
mEmail = (EmailEditText) view.findViewById(R.id.add_email_address);
|
||||
mEmail = view.findViewById(R.id.add_email_address);
|
||||
|
||||
alert.setPositiveButton(android.R.string.ok, new OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -113,16 +113,16 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
|||
View view = mInflater.inflate(R.layout.add_subkey_dialog, null);
|
||||
dialog.setView(view);
|
||||
|
||||
mNoExpiryCheckBox = (CheckBox) view.findViewById(R.id.add_subkey_no_expiry);
|
||||
mExpiryRow = (TableRow) view.findViewById(R.id.add_subkey_expiry_row);
|
||||
mExpiryDatePicker = (DatePicker) view.findViewById(R.id.add_subkey_expiry_date_picker);
|
||||
mKeyTypeSpinner = (Spinner) view.findViewById(R.id.add_subkey_type);
|
||||
mUsageRadioGroup = (RadioGroup) view.findViewById(R.id.add_subkey_usage_group);
|
||||
mUsageNone = (RadioButton) view.findViewById(R.id.add_subkey_usage_none);
|
||||
mUsageSign = (RadioButton) view.findViewById(R.id.add_subkey_usage_sign);
|
||||
mUsageEncrypt = (RadioButton) view.findViewById(R.id.add_subkey_usage_encrypt);
|
||||
mUsageSignAndEncrypt = (RadioButton) view.findViewById(R.id.add_subkey_usage_sign_and_encrypt);
|
||||
mUsageAuthentication = (RadioButton) view.findViewById(R.id.add_subkey_usage_authentication);
|
||||
mNoExpiryCheckBox = view.findViewById(R.id.add_subkey_no_expiry);
|
||||
mExpiryRow = view.findViewById(R.id.add_subkey_expiry_row);
|
||||
mExpiryDatePicker = view.findViewById(R.id.add_subkey_expiry_date_picker);
|
||||
mKeyTypeSpinner = view.findViewById(R.id.add_subkey_type);
|
||||
mUsageRadioGroup = view.findViewById(R.id.add_subkey_usage_group);
|
||||
mUsageNone = view.findViewById(R.id.add_subkey_usage_none);
|
||||
mUsageSign = view.findViewById(R.id.add_subkey_usage_sign);
|
||||
mUsageEncrypt = view.findViewById(R.id.add_subkey_usage_encrypt);
|
||||
mUsageSignAndEncrypt = view.findViewById(R.id.add_subkey_usage_sign_and_encrypt);
|
||||
mUsageAuthentication = view.findViewById(R.id.add_subkey_usage_authentication);
|
||||
|
||||
if(mWillBeMasterKey) {
|
||||
dialog.setTitle(R.string.title_change_master_key);
|
||||
|
@ -351,8 +351,8 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
|||
|
||||
Choice c = this.getItem(position);
|
||||
|
||||
TextView text1 = (TextView) convertView.findViewById(android.R.id.text1);
|
||||
TextView text2 = (TextView) convertView.findViewById(android.R.id.text2);
|
||||
TextView text1 = convertView.findViewById(android.R.id.text1);
|
||||
TextView text2 = convertView.findViewById(android.R.id.text2);
|
||||
|
||||
text1.setText(c.getName());
|
||||
text2.setText(Html.fromHtml(c.getDescription()));
|
||||
|
|
|
@ -86,8 +86,8 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
|
|||
View view = inflater.inflate(R.layout.add_user_id_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
mName = (NameEditText) view.findViewById(R.id.add_user_id_name);
|
||||
mEmail = (EmailEditText) view.findViewById(R.id.add_user_id_address);
|
||||
mName = view.findViewById(R.id.add_user_id_name);
|
||||
mEmail = view.findViewById(R.id.add_user_id_address);
|
||||
|
||||
mName.setText(predefinedName);
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
|||
*/
|
||||
public interface OnDeletedListener {
|
||||
|
||||
public void onDeleted();
|
||||
void onDeleted();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -101,10 +101,10 @@ public class EditSubkeyExpiryDialogFragment extends DialogFragment {
|
|||
View view = inflater.inflate(R.layout.edit_subkey_expiry_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
final CheckBox noExpiry = (CheckBox) view.findViewById(R.id.edit_subkey_expiry_no_expiry);
|
||||
final DatePicker datePicker = (DatePicker) view.findViewById(R.id.edit_subkey_expiry_date_picker);
|
||||
final TextView currentExpiry = (TextView) view.findViewById(R.id.edit_subkey_expiry_current_expiry);
|
||||
final LinearLayout expiryLayout = (LinearLayout) view.findViewById(R.id.edit_subkey_expiry_layout);
|
||||
final CheckBox noExpiry = view.findViewById(R.id.edit_subkey_expiry_no_expiry);
|
||||
final DatePicker datePicker = view.findViewById(R.id.edit_subkey_expiry_date_picker);
|
||||
final TextView currentExpiry = view.findViewById(R.id.edit_subkey_expiry_current_expiry);
|
||||
final LinearLayout expiryLayout = view.findViewById(R.id.edit_subkey_expiry_layout);
|
||||
|
||||
noExpiry.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
|
|
@ -95,9 +95,9 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
|
|||
View view = inflater.inflate(R.layout.passphrase_repeat_dialog, null);
|
||||
alert.setView(view);
|
||||
|
||||
mPassphraseEditText = (PassphraseEditText) view.findViewById(R.id.passphrase_passphrase);
|
||||
mPassphraseAgainEditText = (EditText) view.findViewById(R.id.passphrase_passphrase_again);
|
||||
mNoPassphraseCheckBox = (CheckBox) view.findViewById(R.id.passphrase_no_passphrase);
|
||||
mPassphraseEditText = view.findViewById(R.id.passphrase_passphrase);
|
||||
mPassphraseAgainEditText = view.findViewById(R.id.passphrase_passphrase_again);
|
||||
mNoPassphraseCheckBox = view.findViewById(R.id.passphrase_no_passphrase);
|
||||
|
||||
mNoPassphraseCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
|
|
@ -270,10 +270,10 @@ public class LinkedIdViewFragment extends CryptoOperationFragment implements
|
|||
private final TextSwitcher vText;
|
||||
|
||||
ViewHolder(View root) {
|
||||
vLinkedCerts = (CertListWidget) root.findViewById(R.id.linked_id_certs);
|
||||
vKeySpinner = (CertifyKeySpinner) root.findViewById(R.id.cert_key_spinner);
|
||||
vLinkedCerts = root.findViewById(R.id.linked_id_certs);
|
||||
vKeySpinner = root.findViewById(R.id.cert_key_spinner);
|
||||
vKeySpinnerContainer = root.findViewById(R.id.cert_key_spincontainer);
|
||||
vButtonSwitcher = (ViewAnimator) root.findViewById(R.id.button_animator);
|
||||
vButtonSwitcher = root.findViewById(R.id.button_animator);
|
||||
|
||||
mLinkedIdHolder = new IdentityAdapter.LinkedIdViewHolder(root, null);
|
||||
|
||||
|
@ -282,11 +282,11 @@ public class LinkedIdViewFragment extends CryptoOperationFragment implements
|
|||
vButtonConfirm = root.findViewById(R.id.button_confirm);
|
||||
vButtonView = root.findViewById(R.id.button_view);
|
||||
|
||||
vVerifyingContainer = (ViewAnimator) root.findViewById(R.id.linked_verify_container);
|
||||
vItemCertified = (ViewAnimator) root.findViewById(R.id.linked_id_certified);
|
||||
vVerifyingContainer = root.findViewById(R.id.linked_verify_container);
|
||||
vItemCertified = root.findViewById(R.id.linked_id_certified);
|
||||
|
||||
vProgress = (ViewAnimator) root.findViewById(R.id.linked_cert_progress);
|
||||
vText = (TextSwitcher) root.findViewById(R.id.linked_cert_text);
|
||||
vProgress = root.findViewById(R.id.linked_cert_progress);
|
||||
vText = root.findViewById(R.id.linked_cert_text);
|
||||
}
|
||||
|
||||
enum VerifyState {
|
||||
|
|
|
@ -180,18 +180,18 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
|||
|
||||
setTitle(null);
|
||||
|
||||
mStatusText = (TextView) findViewById(R.id.view_key_status);
|
||||
mStatusImage = (ImageView) findViewById(R.id.view_key_status_image);
|
||||
mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar_layout);
|
||||
mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
|
||||
mStatusText = findViewById(R.id.view_key_status);
|
||||
mStatusImage = findViewById(R.id.view_key_status_image);
|
||||
mAppBarLayout = findViewById(R.id.app_bar_layout);
|
||||
mCollapsingToolbarLayout = findViewById(R.id.collapsing_toolbar);
|
||||
|
||||
mActionEncryptFile = (ImageButton) findViewById(R.id.view_key_action_encrypt_files);
|
||||
mActionEncryptText = (ImageButton) findViewById(R.id.view_key_action_encrypt_text);
|
||||
mFab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
mPhoto = (ImageView) findViewById(R.id.view_key_photo);
|
||||
mPhotoLayout = (FrameLayout) findViewById(R.id.view_key_photo_layout);
|
||||
mQrCode = (ImageView) findViewById(R.id.view_key_qr_code);
|
||||
mQrCodeLayout = (CardView) findViewById(R.id.view_key_qr_code_layout);
|
||||
mActionEncryptFile = findViewById(R.id.view_key_action_encrypt_files);
|
||||
mActionEncryptText = findViewById(R.id.view_key_action_encrypt_text);
|
||||
mFab = findViewById(R.id.fab);
|
||||
mPhoto = findViewById(R.id.view_key_photo);
|
||||
mPhotoLayout = findViewById(R.id.view_key_photo_layout);
|
||||
mQrCode = findViewById(R.id.view_key_qr_code);
|
||||
mQrCodeLayout = findViewById(R.id.view_key_qr_code_layout);
|
||||
|
||||
mRotateSpin = AnimationUtils.loadAnimation(this, R.anim.rotate_spin);
|
||||
|
||||
|
@ -436,7 +436,7 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
|
|||
// use new passphrase!
|
||||
mChangeUnlockParcel = ChangeUnlockParcel.createChangeUnlockParcel(
|
||||
mMasterKeyId, mFingerprint,
|
||||
(Passphrase) data.getParcelable(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE)
|
||||
data.getParcelable(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE)
|
||||
);
|
||||
|
||||
mEditOpHelper.cryptoOperation();
|
||||
|
|
|
@ -91,11 +91,11 @@ public class ViewKeyFragment extends LoaderFragment implements ViewKeyMvpView, O
|
|||
View root = super.onCreateView(inflater, superContainer, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.view_key_fragment, getContainer());
|
||||
|
||||
mIdentitiesCardView = (IdentitiesCardView) view.findViewById(R.id.card_identities);
|
||||
mIdentitiesCardView = view.findViewById(R.id.card_identities);
|
||||
|
||||
mSystemContactCard = (SystemContactCardView) view.findViewById(R.id.linked_system_contact_card);
|
||||
mKeyStatusHealth = (KeyHealthView) view.findViewById(R.id.key_status_health);
|
||||
mKeyStatusKeyserver = (KeyserverStatusView) view.findViewById(R.id.key_status_keyserver);
|
||||
mSystemContactCard = view.findViewById(R.id.linked_system_contact_card);
|
||||
mKeyStatusHealth = view.findViewById(R.id.key_status_health);
|
||||
mKeyStatusKeyserver = view.findViewById(R.id.key_status_keyserver);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
|
|
@ -46,11 +46,11 @@ public class IdentitiesCardView extends CardView implements IdentitiesMvpView {
|
|||
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.identities_card, this, true);
|
||||
|
||||
vIdentities = (RecyclerView) view.findViewById(R.id.view_key_user_ids);
|
||||
vIdentities = view.findViewById(R.id.view_key_user_ids);
|
||||
vIdentities.setLayoutManager(new LinearLayoutManager(context));
|
||||
vIdentities.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST, false));
|
||||
|
||||
userIdsEditButton = (Button) view.findViewById(R.id.view_key_card_user_ids_edit);
|
||||
userIdsEditButton = view.findViewById(R.id.view_key_card_user_ids_edit);
|
||||
userIdsEditButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -60,7 +60,7 @@ public class IdentitiesCardView extends CardView implements IdentitiesMvpView {
|
|||
}
|
||||
});
|
||||
|
||||
linkedIdsAddButton = (Button) view.findViewById(R.id.view_key_card_linked_ids_add);
|
||||
linkedIdsAddButton = view.findViewById(R.id.view_key_card_linked_ids_add);
|
||||
linkedIdsAddButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -69,22 +69,22 @@ public class KeyHealthView extends LinearLayout implements KeyHealthMvpView, OnC
|
|||
View view = LayoutInflater.from(context).inflate(R.layout.key_health_card_content, this, true);
|
||||
|
||||
vLayout = view.findViewById(R.id.key_health_layout);
|
||||
vTitle = (TextView) view.findViewById(R.id.key_health_title);
|
||||
vSubtitle = (TextView) view.findViewById(R.id.key_health_subtitle);
|
||||
vIcon = (ImageView) view.findViewById(R.id.key_health_icon);
|
||||
vExpander = (ImageView) view.findViewById(R.id.key_health_expander);
|
||||
vTitle = view.findViewById(R.id.key_health_title);
|
||||
vSubtitle = view.findViewById(R.id.key_health_subtitle);
|
||||
vIcon = view.findViewById(R.id.key_health_icon);
|
||||
vExpander = view.findViewById(R.id.key_health_expander);
|
||||
|
||||
vLayout.setOnClickListener(this);
|
||||
|
||||
vKeyStatusDivider = view.findViewById(R.id.key_health_divider);
|
||||
vKeyStatusList = (KeyStatusList) view.findViewById(R.id.key_health_status_list);
|
||||
vKeyStatusList = view.findViewById(R.id.key_health_status_list);
|
||||
|
||||
vInsecureLayout = view.findViewById(R.id.key_insecure_layout);
|
||||
vInsecureProblem = (TextView) view.findViewById(R.id.key_insecure_problem);
|
||||
vInsecureSolution = (TextView) view.findViewById(R.id.key_insecure_solution);
|
||||
vInsecureProblem = view.findViewById(R.id.key_insecure_problem);
|
||||
vInsecureSolution = view.findViewById(R.id.key_insecure_solution);
|
||||
|
||||
vExpiryLayout = view.findViewById(R.id.key_expiry_layout);
|
||||
vExpiryText = (TextView) view.findViewById(R.id.key_expiry_text);
|
||||
vExpiryText = view.findViewById(R.id.key_expiry_text);
|
||||
}
|
||||
|
||||
private enum KeyHealthDisplayStatus {
|
||||
|
|
|
@ -50,13 +50,13 @@ public class KeyStatusList extends LinearLayout implements KeyStatusMvpView {
|
|||
vSignLayout = view.findViewById(R.id.cap_sign);
|
||||
vDecryptLayout = view.findViewById(R.id.cap_decrypt);
|
||||
|
||||
vCertText = (TextView) view.findViewById(R.id.cap_cert_text);
|
||||
vSignText = (TextView) view.findViewById(R.id.cap_sign_text);
|
||||
vDecryptText = (TextView) view.findViewById(R.id.cap_decrypt_text);
|
||||
vCertText = view.findViewById(R.id.cap_cert_text);
|
||||
vSignText = view.findViewById(R.id.cap_sign_text);
|
||||
vDecryptText = view.findViewById(R.id.cap_decrypt_text);
|
||||
|
||||
vCertIcon = (ImageView) view.findViewById(R.id.cap_cert_icon);
|
||||
vSignIcon = (ImageView) view.findViewById(R.id.cap_sign_icon);
|
||||
vDecryptIcon = (ImageView) view.findViewById(R.id.cap_decrypt_icon);
|
||||
vCertIcon = view.findViewById(R.id.cap_cert_icon);
|
||||
vSignIcon = view.findViewById(R.id.cap_sign_icon);
|
||||
vDecryptIcon = view.findViewById(R.id.cap_decrypt_icon);
|
||||
|
||||
vCertToken = view.findViewById(R.id.cap_cert_security_token);
|
||||
vSignToken = view.findViewById(R.id.cap_sign_security_token);
|
||||
|
|
|
@ -50,9 +50,9 @@ public class KeyserverStatusView extends FrameLayout implements KeyserverStatusM
|
|||
|
||||
vLayout = view.findViewById(R.id.keyserver_status_layout);
|
||||
|
||||
vTitle = (TextView) view.findViewById(R.id.keyserver_status_title);
|
||||
vSubtitle = (TextView) view.findViewById(R.id.keyserver_status_subtitle);
|
||||
vIcon = (ImageView) view.findViewById(R.id.keyserver_icon);
|
||||
vTitle = view.findViewById(R.id.keyserver_status_title);
|
||||
vSubtitle = view.findViewById(R.id.keyserver_status_subtitle);
|
||||
vIcon = view.findViewById(R.id.keyserver_icon);
|
||||
// vExpander = (ImageView) view.findViewById(R.id.key_health_expander);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ public class SystemContactCardView extends CardView implements SystemContactMvpV
|
|||
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.system_contact_card, this, true);
|
||||
|
||||
vSystemContactLayout = (LinearLayout) view.findViewById(R.id.system_contact_layout);
|
||||
vSystemContactName = (TextView) view.findViewById(R.id.system_contact_name);
|
||||
vSystemContactPicture = (ImageView) view.findViewById(R.id.system_contact_picture);
|
||||
vSystemContactLayout = view.findViewById(R.id.system_contact_layout);
|
||||
vSystemContactName = view.findViewById(R.id.system_contact_name);
|
||||
vSystemContactPicture = view.findViewById(R.id.system_contact_picture);
|
||||
|
||||
vSystemContactLayout.setOnClickListener(this);
|
||||
}
|
||||
|
|
|
@ -85,10 +85,10 @@ public abstract class LinkedIdCreateFinalFragment extends CryptoOperationFragmen
|
|||
}
|
||||
});
|
||||
|
||||
mVerifyAnimator = (ViewAnimator) view.findViewById(R.id.verify_progress);
|
||||
mVerifyImage = (ImageView) view.findViewById(R.id.verify_image);
|
||||
mVerifyStatus = (TextView) view.findViewById(R.id.verify_status);
|
||||
mVerifyButtonAnimator = (ViewAnimator) view.findViewById(R.id.verify_buttons);
|
||||
mVerifyAnimator = view.findViewById(R.id.verify_progress);
|
||||
mVerifyImage = view.findViewById(R.id.verify_image);
|
||||
mVerifyStatus = view.findViewById(R.id.verify_status);
|
||||
mVerifyButtonAnimator = view.findViewById(R.id.verify_buttons);
|
||||
|
||||
view.findViewById(R.id.button_verify).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -112,18 +112,18 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.linked_create_github_fragment, container, false);
|
||||
|
||||
mButtonContainer = (ViewAnimator) view.findViewById(R.id.button_container);
|
||||
mButtonContainer = view.findViewById(R.id.button_container);
|
||||
|
||||
mStatus1 = (StatusIndicator) view.findViewById(R.id.linked_status_step1);
|
||||
mStatus2 = (StatusIndicator) view.findViewById(R.id.linked_status_step2);
|
||||
mStatus3 = (StatusIndicator) view.findViewById(R.id.linked_status_step3);
|
||||
mStatus1 = view.findViewById(R.id.linked_status_step1);
|
||||
mStatus2 = view.findViewById(R.id.linked_status_step2);
|
||||
mStatus3 = view.findViewById(R.id.linked_status_step3);
|
||||
|
||||
mRetryButton = (Button) view.findViewById(R.id.button_retry);
|
||||
mRetryButton = view.findViewById(R.id.button_retry);
|
||||
|
||||
((ImageView) view.findViewById(R.id.linked_id_type_icon)).setImageResource(R.drawable.linked_github);
|
||||
((ImageView) view.findViewById(R.id.linked_id_certified_icon)).setImageResource(R.drawable.octo_link_24dp);
|
||||
mLinkedIdTitle = (TextView) view.findViewById(R.id.linked_id_title);
|
||||
mLinkedIdComment = (TextView) view.findViewById(R.id.linked_id_comment);
|
||||
mLinkedIdTitle = view.findViewById(R.id.linked_id_title);
|
||||
mLinkedIdComment = view.findViewById(R.id.linked_id_comment);
|
||||
|
||||
view.findViewById(R.id.back_button).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -535,7 +535,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe
|
|||
|
||||
final Dialog auth_dialog = new Dialog(activity);
|
||||
auth_dialog.setContentView(R.layout.oauth_webview);
|
||||
WebView web = (WebView) auth_dialog.findViewById(R.id.web_view);
|
||||
WebView web = auth_dialog.findViewById(R.id.web_view);
|
||||
web.getSettings().setSaveFormData(false);
|
||||
web.getSettings().setJavaScriptEnabled(true);
|
||||
web.getSettings().setUserAgentString("OpenKeychain " + BuildConfig.VERSION_NAME);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue