collection of fixes based on comments/small aesthetic stuff // FREEBIE

This commit is contained in:
Jake McGinty 2014-02-18 16:28:54 -08:00
parent d19ab04bdd
commit 9d9a0ec218
8 changed files with 14 additions and 14 deletions

View File

@ -114,7 +114,7 @@ import ws.com.google.android.mms.MmsException;
public class ConversationActivity extends PassphraseRequiredSherlockFragmentActivity
implements ConversationFragment.ConversationFragmentListener
{
private static final String TAG = "ConversationActivity";
private static final String TAG = ConversationActivity.class.getSimpleName();
public static final String RECIPIENTS_EXTRA = "recipients";
public static final String THREAD_ID_EXTRA = "thread_id";
@ -498,8 +498,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
if (avatar != null) {
getSupportActionBar().setIcon(new BitmapDrawable(getResources(), BitmapUtil.getCroppedBitmap(avatar)));
}
}
else {
} else {
title = getString(R.string.ConversationActivity_group_conversation);
}
int size = getRecipients().getRecipientsList().size();

View File

@ -65,7 +65,7 @@ import static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageCo
public class GroupCreateActivity extends PassphraseRequiredSherlockFragmentActivity {
private final static String TAG = "GroupCreateActivity";
private final static String TAG = GroupCreateActivity.class.getSimpleName();
public static final String MASTER_SECRET_EXTRA = "master_secret";

View File

@ -102,7 +102,9 @@ public class SingleContactSelectionActivity extends PassphraseRequiredSherlockFr
numberData.number,
false);
recipients.getRecipientsList().addAll(recipientsForNumber.getRecipientsList());
} catch (RecipientFormattingException rfe) { }
} catch (RecipientFormattingException rfe) {
Log.w(TAG, "Caught RecipientFormattingException when trying to convert a selected number to a Recipient.", rfe);
}
}
}
return recipients;

View File

@ -54,7 +54,8 @@ import java.util.HashMap;
public class SingleContactSelectionListFragment extends SherlockListFragment
implements LoaderManager.LoaderCallbacks<Cursor>
{
private final String TAG = "SingleContactSelectionListFragment";
private final String TAG = SingleContactSelectionListFragment.class.getSimpleName();
private final HashMap<Long, ContactData> selectedContacts = new HashMap<Long, ContactData>();
private static LayoutInflater li;
private OnContactSelectedListener onContactSelectedListener;

View File

@ -50,7 +50,7 @@ import java.util.Set;
* @author Moxie Marlinspike
*/
public class PushRecipientsPanel extends RelativeLayout {
private final String TAG = "PushRecipientsPanel";
private final String TAG = PushRecipientsPanel.class.getSimpleName();
private RecipientsPanelChangedListener panelChangeListener;
private RecipientsEditor recipientsText;

View File

@ -45,7 +45,7 @@ import java.util.List;
* @author Moxie Marlinspike
*/
public class SingleRecipientPanel extends RelativeLayout {
private final String TAG = "SingleRecipientsPanel";
private final String TAG = SingleRecipientPanel.class.getSimpleName();
private RecipientsPanelChangedListener panelChangeListener;
private RecipientsEditor recipientsText;

View File

@ -103,11 +103,11 @@ public class DecryptingPartInputStream extends FileInputStream {
try {
int flourish = cipher.doFinal(buffer, offset);
// mac.update(buffer, offset, flourish);
byte[] ourMac = mac.doFinal();
byte[] theirMac = new byte[mac.getMacLength()];
readFully(theirMac);
if (!Arrays.equals(ourMac, theirMac))
throw new IOException("MAC doesn't match! Potential tampering?");
@ -175,7 +175,7 @@ public class DecryptingPartInputStream extends FileInputStream {
return readLength;
} catch (ShortBufferException e) {
throw new AssertionError(e);
}
}
}
private Mac initializeMac(SecretKeySpec key) throws NoSuchAlgorithmException, InvalidKeyException {
@ -214,6 +214,4 @@ public class DecryptingPartInputStream extends FileInputStream {
else return;
}
}
}

View File

@ -34,7 +34,7 @@ import java.util.HashSet;
public class Recipient implements Parcelable, CanonicalRecipient {
private final static String TAG = "Recipient";
private final static String TAG = Recipient.class.getSimpleName();
public static final Parcelable.Creator<Recipient> CREATOR = new Parcelable.Creator<Recipient>() {
public Recipient createFromParcel(Parcel in) {