Messaging: Further code improvements
* Remove redundant casts * getParcelable(ArrayList|Exra) without class argument is deprecated * ViewPager.setOnPageChangeListener -> addOnPageChangeListener * RecyclerView.setOnScrollListener -> addOnScrollListener * Remove unused initializations * Remove unused code Change-Id: I21beb6c90c675a4f2cfd7e3d5ebbd18b745f5911
This commit is contained in:
@@ -96,22 +96,22 @@ public class PduComposer {
|
||||
/**
|
||||
* The output message.
|
||||
*/
|
||||
protected ByteArrayOutputStream mMessage = null;
|
||||
protected ByteArrayOutputStream mMessage;
|
||||
|
||||
/**
|
||||
* The PDU.
|
||||
*/
|
||||
private GenericPdu mPdu = null;
|
||||
private GenericPdu mPdu;
|
||||
|
||||
/**
|
||||
* Current visiting position of the mMessage.
|
||||
*/
|
||||
protected int mPosition = 0;
|
||||
protected int mPosition;
|
||||
|
||||
/**
|
||||
* Message compose buffer stack.
|
||||
*/
|
||||
private BufferStack mStack = null;
|
||||
private BufferStack mStack;
|
||||
|
||||
/**
|
||||
* Content resolver.
|
||||
@@ -121,12 +121,12 @@ public class PduComposer {
|
||||
/**
|
||||
* Header of this pdu.
|
||||
*/
|
||||
private PduHeaders mPduHeader = null;
|
||||
private PduHeaders mPduHeader;
|
||||
|
||||
/**
|
||||
* Map of all content type
|
||||
*/
|
||||
private static SimpleArrayMap<String, Integer> mContentTypeMap = null;
|
||||
private static SimpleArrayMap<String, Integer> mContentTypeMap;
|
||||
|
||||
static {
|
||||
mContentTypeMap = new SimpleArrayMap<>();
|
||||
@@ -469,7 +469,7 @@ public class PduComposer {
|
||||
}
|
||||
|
||||
private EncodedStringValue appendAddressType(final EncodedStringValue address) {
|
||||
EncodedStringValue temp = null;
|
||||
EncodedStringValue temp;
|
||||
|
||||
try {
|
||||
final int addressType = checkAddressType(address.getString());
|
||||
@@ -1065,7 +1065,7 @@ public class PduComposer {
|
||||
try {
|
||||
final byte[] buffer = new byte[PDU_COMPOSER_BLOCK_SIZE];
|
||||
cr = mResolver.openInputStream(part.getDataUri());
|
||||
int len = 0;
|
||||
int len;
|
||||
while ((len = cr.read(buffer)) != -1) {
|
||||
mMessage.write(buffer, 0, len);
|
||||
mPosition += len;
|
||||
|
||||
Reference in New Issue
Block a user