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