Display Key moved to Fragment
Signed-off-by: Durgesh <007durgesh219@gmail.com>
This commit is contained in:
@@ -28,7 +28,7 @@ import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
|||||||
public class CertifyKeyActivity extends BaseActivity {
|
public class CertifyKeyActivity extends BaseActivity {
|
||||||
|
|
||||||
public static final String EXTRA_RESULT = "operation_result";
|
public static final String EXTRA_RESULT = "operation_result";
|
||||||
public static final String EXTRA_KEY_IDS = "extra_key_ids";
|
public static final String EXTRA_KEY_IDS = MultiUserIdsFragment.EXTRA_KEY_IDS ;
|
||||||
public static final String EXTRA_CERTIFY_KEY_ID = "certify_key_id";
|
public static final String EXTRA_CERTIFY_KEY_ID = "certify_key_id";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -62,52 +62,19 @@ import java.util.ArrayList;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class CertifyKeyFragment
|
public class CertifyKeyFragment
|
||||||
extends CachingCryptoOperationFragment<CertifyActionsParcel, CertifyResult>
|
extends CachingCryptoOperationFragment<CertifyActionsParcel, CertifyResult> {
|
||||||
implements LoaderManager.LoaderCallbacks<Cursor> {
|
|
||||||
|
|
||||||
public static final String ARG_CHECK_STATES = "check_states";
|
|
||||||
|
|
||||||
private CheckBox mUploadKeyCheckbox;
|
private CheckBox mUploadKeyCheckbox;
|
||||||
ListView mUserIds;
|
|
||||||
|
|
||||||
private CertifyKeySpinner mCertifyKeySpinner;
|
private CertifyKeySpinner mCertifyKeySpinner;
|
||||||
|
|
||||||
private long[] mPubMasterKeyIds;
|
private MultiUserIdsFragment mMultiUserIdsFragment;
|
||||||
|
|
||||||
public static final String[] USER_IDS_PROJECTION = new String[]{
|
|
||||||
UserPackets._ID,
|
|
||||||
UserPackets.MASTER_KEY_ID,
|
|
||||||
UserPackets.USER_ID,
|
|
||||||
UserPackets.IS_PRIMARY,
|
|
||||||
UserPackets.IS_REVOKED
|
|
||||||
};
|
|
||||||
private static final int INDEX_MASTER_KEY_ID = 1;
|
|
||||||
private static final int INDEX_USER_ID = 2;
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static final int INDEX_IS_PRIMARY = 3;
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static final int INDEX_IS_REVOKED = 4;
|
|
||||||
|
|
||||||
private MultiUserIdsAdapter mUserIdsAdapter;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
mPubMasterKeyIds = getActivity().getIntent().getLongArrayExtra(CertifyKeyActivity.EXTRA_KEY_IDS);
|
if (savedInstanceState == null){
|
||||||
if (mPubMasterKeyIds == null) {
|
|
||||||
Log.e(Constants.TAG, "List of key ids to certify missing!");
|
|
||||||
getActivity().finish();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<Boolean> checkedStates;
|
|
||||||
if (savedInstanceState != null) {
|
|
||||||
checkedStates = (ArrayList<Boolean>) savedInstanceState.getSerializable(ARG_CHECK_STATES);
|
|
||||||
// key spinner and the checkbox keep their own state
|
|
||||||
} else {
|
|
||||||
checkedStates = null;
|
|
||||||
|
|
||||||
// preselect certify key id if given
|
// preselect certify key id if given
|
||||||
long certifyKeyId = getActivity().getIntent()
|
long certifyKeyId = getActivity().getIntent()
|
||||||
.getLongExtra(CertifyKeyActivity.EXTRA_CERTIFY_KEY_ID, Constants.key.none);
|
.getLongExtra(CertifyKeyActivity.EXTRA_CERTIFY_KEY_ID, Constants.key.none);
|
||||||
@@ -124,12 +91,6 @@ public class CertifyKeyFragment
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mUserIdsAdapter = new MultiUserIdsAdapter(getActivity(), null, 0, checkedStates);
|
|
||||||
mUserIds.setAdapter(mUserIdsAdapter);
|
|
||||||
mUserIds.setDividerHeight(0);
|
|
||||||
|
|
||||||
getLoaderManager().initLoader(0, null, this);
|
|
||||||
|
|
||||||
OperationResult result = getActivity().getIntent().getParcelableExtra(CertifyKeyActivity.EXTRA_RESULT);
|
OperationResult result = getActivity().getIntent().getParcelableExtra(CertifyKeyActivity.EXTRA_RESULT);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
// display result from import
|
// display result from import
|
||||||
@@ -137,22 +98,14 @@ public class CertifyKeyFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSaveInstanceState(Bundle outState) {
|
|
||||||
super.onSaveInstanceState(outState);
|
|
||||||
|
|
||||||
ArrayList<Boolean> states = mUserIdsAdapter.getCheckStates();
|
|
||||||
// no proper parceling method available :(
|
|
||||||
outState.putSerializable(ARG_CHECK_STATES, states);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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 = (CertifyKeySpinner) view.findViewById(R.id.certify_key_spinner);
|
||||||
mUploadKeyCheckbox = (CheckBox) view.findViewById(R.id.sign_key_upload_checkbox);
|
mUploadKeyCheckbox = (CheckBox) view.findViewById(R.id.sign_key_upload_checkbox);
|
||||||
mUserIds = (ListView) view.findViewById(R.id.view_key_user_ids);
|
mMultiUserIdsFragment = (MultiUserIdsFragment)
|
||||||
|
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 =
|
||||||
@@ -183,128 +136,11 @@ public class CertifyKeyFragment
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
|
||||||
Uri uri = UserPackets.buildUserIdsUri();
|
|
||||||
|
|
||||||
String selection, ids[];
|
|
||||||
{
|
|
||||||
// generate placeholders and string selection args
|
|
||||||
ids = new String[mPubMasterKeyIds.length];
|
|
||||||
StringBuilder placeholders = new StringBuilder("?");
|
|
||||||
for (int i = 0; i < mPubMasterKeyIds.length; i++) {
|
|
||||||
ids[i] = Long.toString(mPubMasterKeyIds[i]);
|
|
||||||
if (i != 0) {
|
|
||||||
placeholders.append(",?");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// put together selection string
|
|
||||||
selection = UserPackets.IS_REVOKED + " = 0" + " AND "
|
|
||||||
+ Tables.USER_PACKETS + "." + UserPackets.MASTER_KEY_ID
|
|
||||||
+ " IN (" + placeholders + ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
return new CursorLoader(getActivity(), uri,
|
|
||||||
USER_IDS_PROJECTION, selection, ids,
|
|
||||||
Tables.USER_PACKETS + "." + UserPackets.MASTER_KEY_ID + " ASC"
|
|
||||||
+ ", " + Tables.USER_PACKETS + "." + UserPackets.USER_ID + " ASC"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
|
||||||
|
|
||||||
MatrixCursor matrix = new MatrixCursor(new String[]{
|
|
||||||
"_id", "user_data", "grouped"
|
|
||||||
}) {
|
|
||||||
@Override
|
|
||||||
public byte[] getBlob(int column) {
|
|
||||||
return super.getBlob(column);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
data.moveToFirst();
|
|
||||||
|
|
||||||
long lastMasterKeyId = 0;
|
|
||||||
String lastName = "";
|
|
||||||
ArrayList<String> uids = new ArrayList<>();
|
|
||||||
|
|
||||||
boolean header = true;
|
|
||||||
|
|
||||||
// Iterate over all rows
|
|
||||||
while (!data.isAfterLast()) {
|
|
||||||
long masterKeyId = data.getLong(INDEX_MASTER_KEY_ID);
|
|
||||||
String userId = data.getString(INDEX_USER_ID);
|
|
||||||
KeyRing.UserId pieces = KeyRing.splitUserId(userId);
|
|
||||||
|
|
||||||
// Two cases:
|
|
||||||
|
|
||||||
boolean grouped = masterKeyId == lastMasterKeyId;
|
|
||||||
boolean subGrouped = data.isFirst() || grouped && lastName.equals(pieces.name);
|
|
||||||
// Remember for next loop
|
|
||||||
lastName = pieces.name;
|
|
||||||
|
|
||||||
Log.d(Constants.TAG, Long.toString(masterKeyId, 16) + (grouped ? "grouped" : "not grouped"));
|
|
||||||
|
|
||||||
if (!subGrouped) {
|
|
||||||
// 1. This name should NOT be grouped with the previous, so we flush the buffer
|
|
||||||
|
|
||||||
Parcel p = Parcel.obtain();
|
|
||||||
p.writeStringList(uids);
|
|
||||||
byte[] d = p.marshall();
|
|
||||||
p.recycle();
|
|
||||||
|
|
||||||
matrix.addRow(new Object[]{
|
|
||||||
lastMasterKeyId, d, header ? 1 : 0
|
|
||||||
});
|
|
||||||
// indicate that we have a header for this masterKeyId
|
|
||||||
header = false;
|
|
||||||
|
|
||||||
// Now clear the buffer, and add the new user id, for the next round
|
|
||||||
uids.clear();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. This name should be grouped with the previous, just add to buffer
|
|
||||||
uids.add(userId);
|
|
||||||
lastMasterKeyId = masterKeyId;
|
|
||||||
|
|
||||||
// If this one wasn't grouped, the next one's gotta be a header
|
|
||||||
if (!grouped) {
|
|
||||||
header = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Regardless of the outcome, move to next entry
|
|
||||||
data.moveToNext();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// If there is anything left in the buffer, flush it one last time
|
|
||||||
if (!uids.isEmpty()) {
|
|
||||||
|
|
||||||
Parcel p = Parcel.obtain();
|
|
||||||
p.writeStringList(uids);
|
|
||||||
byte[] d = p.marshall();
|
|
||||||
p.recycle();
|
|
||||||
|
|
||||||
matrix.addRow(new Object[]{
|
|
||||||
lastMasterKeyId, d, header ? 1 : 0
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
mUserIdsAdapter.swapCursor(matrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoaderReset(Loader<Cursor> loader) {
|
|
||||||
mUserIdsAdapter.swapCursor(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CertifyActionsParcel createOperationInput() {
|
public CertifyActionsParcel createOperationInput() {
|
||||||
|
|
||||||
// Bail out if there is not at least one user id selected
|
// Bail out if there is not at least one user id selected
|
||||||
ArrayList<CertifyAction> certifyActions = mUserIdsAdapter.getSelectedCertifyActions();
|
ArrayList<CertifyAction> certifyActions = mMultiUserIdsFragment.getSelectedCertifyActions();
|
||||||
if (certifyActions.isEmpty()) {
|
if (certifyActions.isEmpty()) {
|
||||||
Notify.create(getActivity(), "No identities selected!",
|
Notify.create(getActivity(), "No identities selected!",
|
||||||
Notify.Style.ERROR).show();
|
Notify.Style.ERROR).show();
|
||||||
|
|||||||
@@ -0,0 +1,217 @@
|
|||||||
|
package org.sufficientlysecure.keychain.ui;
|
||||||
|
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.database.MatrixCursor;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.app.LoaderManager;
|
||||||
|
import android.support.v4.content.CursorLoader;
|
||||||
|
import android.support.v4.content.Loader;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
|
import org.sufficientlysecure.keychain.R;
|
||||||
|
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||||
|
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||||
|
import org.sufficientlysecure.keychain.provider.KeychainDatabase;
|
||||||
|
import org.sufficientlysecure.keychain.service.CertifyActionsParcel;
|
||||||
|
import org.sufficientlysecure.keychain.ui.adapter.MultiUserIdsAdapter;
|
||||||
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by durgeshchoudhary on 07/03/16.
|
||||||
|
*/
|
||||||
|
public class MultiUserIdsFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor>{
|
||||||
|
public static final String ARG_CHECK_STATES = "check_states";
|
||||||
|
public static final String EXTRA_KEY_IDS = "extra_key_ids";
|
||||||
|
|
||||||
|
ListView mUserIds;
|
||||||
|
private MultiUserIdsAdapter mUserIdsAdapter;
|
||||||
|
|
||||||
|
private long[] mPubMasterKeyIds;
|
||||||
|
|
||||||
|
public static final String[] USER_IDS_PROJECTION = new String[]{
|
||||||
|
KeychainContract.UserPackets._ID,
|
||||||
|
KeychainContract.UserPackets.MASTER_KEY_ID,
|
||||||
|
KeychainContract.UserPackets.USER_ID,
|
||||||
|
KeychainContract.UserPackets.IS_PRIMARY,
|
||||||
|
KeychainContract.UserPackets.IS_REVOKED
|
||||||
|
};
|
||||||
|
private static final int INDEX_MASTER_KEY_ID = 1;
|
||||||
|
private static final int INDEX_USER_ID = 2;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private static final int INDEX_IS_PRIMARY = 3;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private static final int INDEX_IS_REVOKED = 4;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.multi_user_ids_fragment, null);
|
||||||
|
|
||||||
|
mUserIds = (ListView) view.findViewById(R.id.view_key_user_ids);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
|
mPubMasterKeyIds = getActivity().getIntent().getLongArrayExtra(EXTRA_KEY_IDS);
|
||||||
|
if (mPubMasterKeyIds == null) {
|
||||||
|
Log.e(Constants.TAG, "List of key ids to certify missing!");
|
||||||
|
getActivity().finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<Boolean> checkedStates = null;
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
checkedStates = (ArrayList<Boolean>) savedInstanceState.getSerializable(ARG_CHECK_STATES);
|
||||||
|
}
|
||||||
|
|
||||||
|
mUserIdsAdapter = new MultiUserIdsAdapter(getActivity(), null, 0, checkedStates);
|
||||||
|
mUserIds.setAdapter(mUserIdsAdapter);
|
||||||
|
mUserIds.setDividerHeight(0);
|
||||||
|
|
||||||
|
getLoaderManager().initLoader(0, null, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
|
||||||
|
ArrayList<Boolean> states = mUserIdsAdapter.getCheckStates();
|
||||||
|
// no proper parceling method available :(
|
||||||
|
outState.putSerializable(ARG_CHECK_STATES, states);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<CertifyActionsParcel.CertifyAction> getSelectedCertifyActions() {
|
||||||
|
return mUserIdsAdapter.getSelectedCertifyActions();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
||||||
|
Uri uri = KeychainContract.UserPackets.buildUserIdsUri();
|
||||||
|
|
||||||
|
String selection, ids[];
|
||||||
|
{
|
||||||
|
// generate placeholders and string selection args
|
||||||
|
ids = new String[mPubMasterKeyIds.length];
|
||||||
|
StringBuilder placeholders = new StringBuilder("?");
|
||||||
|
for (int i = 0; i < mPubMasterKeyIds.length; i++) {
|
||||||
|
ids[i] = Long.toString(mPubMasterKeyIds[i]);
|
||||||
|
if (i != 0) {
|
||||||
|
placeholders.append(",?");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// put together selection string
|
||||||
|
selection = KeychainContract.UserPackets.IS_REVOKED + " = 0" + " AND "
|
||||||
|
+ KeychainDatabase.Tables.USER_PACKETS + "." + KeychainContract.UserPackets.MASTER_KEY_ID
|
||||||
|
+ " IN (" + placeholders + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CursorLoader(getActivity(), uri,
|
||||||
|
USER_IDS_PROJECTION, selection, ids,
|
||||||
|
KeychainDatabase.Tables.USER_PACKETS + "." + KeychainContract.UserPackets.MASTER_KEY_ID + " ASC"
|
||||||
|
+ ", " + KeychainDatabase.Tables.USER_PACKETS + "." + KeychainContract.UserPackets.USER_ID + " ASC"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
||||||
|
|
||||||
|
MatrixCursor matrix = new MatrixCursor(new String[]{
|
||||||
|
"_id", "user_data", "grouped"
|
||||||
|
}) {
|
||||||
|
@Override
|
||||||
|
public byte[] getBlob(int column) {
|
||||||
|
return super.getBlob(column);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
data.moveToFirst();
|
||||||
|
|
||||||
|
long lastMasterKeyId = 0;
|
||||||
|
String lastName = "";
|
||||||
|
ArrayList<String> uids = new ArrayList<>();
|
||||||
|
|
||||||
|
boolean header = true;
|
||||||
|
|
||||||
|
// Iterate over all rows
|
||||||
|
while (!data.isAfterLast()) {
|
||||||
|
long masterKeyId = data.getLong(INDEX_MASTER_KEY_ID);
|
||||||
|
String userId = data.getString(INDEX_USER_ID);
|
||||||
|
KeyRing.UserId pieces = KeyRing.splitUserId(userId);
|
||||||
|
|
||||||
|
// Two cases:
|
||||||
|
|
||||||
|
boolean grouped = masterKeyId == lastMasterKeyId;
|
||||||
|
boolean subGrouped = data.isFirst() || grouped && lastName.equals(pieces.name);
|
||||||
|
// Remember for next loop
|
||||||
|
lastName = pieces.name;
|
||||||
|
|
||||||
|
Log.d(Constants.TAG, Long.toString(masterKeyId, 16) + (grouped ? "grouped" : "not grouped"));
|
||||||
|
|
||||||
|
if (!subGrouped) {
|
||||||
|
// 1. This name should NOT be grouped with the previous, so we flush the buffer
|
||||||
|
|
||||||
|
Parcel p = Parcel.obtain();
|
||||||
|
p.writeStringList(uids);
|
||||||
|
byte[] d = p.marshall();
|
||||||
|
p.recycle();
|
||||||
|
|
||||||
|
matrix.addRow(new Object[]{
|
||||||
|
lastMasterKeyId, d, header ? 1 : 0
|
||||||
|
});
|
||||||
|
// indicate that we have a header for this masterKeyId
|
||||||
|
header = false;
|
||||||
|
|
||||||
|
// Now clear the buffer, and add the new user id, for the next round
|
||||||
|
uids.clear();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. This name should be grouped with the previous, just add to buffer
|
||||||
|
uids.add(userId);
|
||||||
|
lastMasterKeyId = masterKeyId;
|
||||||
|
|
||||||
|
// If this one wasn't grouped, the next one's gotta be a header
|
||||||
|
if (!grouped) {
|
||||||
|
header = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Regardless of the outcome, move to next entry
|
||||||
|
data.moveToNext();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is anything left in the buffer, flush it one last time
|
||||||
|
if (!uids.isEmpty()) {
|
||||||
|
|
||||||
|
Parcel p = Parcel.obtain();
|
||||||
|
p.writeStringList(uids);
|
||||||
|
byte[] d = p.marshall();
|
||||||
|
p.recycle();
|
||||||
|
|
||||||
|
matrix.addRow(new Object[]{
|
||||||
|
lastMasterKeyId, d, header ? 1 : 0
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mUserIdsAdapter.swapCursor(matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoaderReset(Loader<Cursor> loader) {
|
||||||
|
mUserIdsAdapter.swapCursor(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,8 +22,9 @@
|
|||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<org.sufficientlysecure.keychain.ui.widget.FixedListView
|
<fragment
|
||||||
android:id="@+id/view_key_user_ids"
|
android:id="@+id/multi_user_ids_fragment"
|
||||||
|
android:name="org.sufficientlysecure.keychain.ui.MultiUserIdsFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<org.sufficientlysecure.keychain.ui.widget.FixedListView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/view_key_user_ids"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
Reference in New Issue
Block a user