mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Further lint cleanup 2
Github Desktop isn't working as expected :(
This commit is contained in:
@@ -65,7 +65,7 @@ public class RetryScheduler implements Observer {
|
||||
ConnectivityManager mConnMgr = (ConnectivityManager)
|
||||
mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo ni = mConnMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE_MMS);
|
||||
return (ni == null ? false : ni.isConnected());
|
||||
return (ni != null && ni.isConnected());
|
||||
}
|
||||
|
||||
public void update(Observable observable) {
|
||||
|
||||
@@ -132,11 +132,7 @@ public class Base64 {
|
||||
private static boolean isBase64(byte octect) {
|
||||
if (octect == PAD) {
|
||||
return true;
|
||||
} else if (base64Alphabet[octect] == -1) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else return base64Alphabet[octect] != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -810,7 +810,7 @@ public class PduComposer {
|
||||
}
|
||||
|
||||
// Need at least one of "cc", "bcc" and "to".
|
||||
if (false == recipient) {
|
||||
if (!recipient) {
|
||||
return PDU_COMPOSE_CONTENT_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,11 +313,8 @@ public class PhoneNumberUtils extends android.telephony.PhoneNumberUtils {
|
||||
|
||||
// if the number of dialable chars in a and b match, but the matched chars < MIN_MATCH,
|
||||
// treat them as equal (i.e. 404-04 and 40404)
|
||||
if (effectiveALen == effectiveBLen && effectiveALen == matched) {
|
||||
return true;
|
||||
}
|
||||
return effectiveALen == effectiveBLen && effectiveALen == matched;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// At least one string has matched completely;
|
||||
@@ -346,13 +343,9 @@ public class PhoneNumberUtils extends android.telephony.PhoneNumberUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (matchTrunkPrefix(b, ib + 1)
|
||||
&& matchIntlPrefixAndCC(a, ia +1)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return matchTrunkPrefix(b, ib + 1)
|
||||
&& matchIntlPrefixAndCC(a, ia + 1);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** all of 'a' up to len must be a (+|00|011)country code)
|
||||
|
||||
@@ -20,9 +20,6 @@ public class ViewUtils {
|
||||
int vw = view.getWidth();
|
||||
int vh = view.getHeight();
|
||||
|
||||
if (x < vx || x > vx + vw || y < vy || y > vy + vh) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !(x < vx || x > vx + vw || y < vy || y > vy + vh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class Base64 {
|
||||
|
||||
// If doPadding is false, set length to truncate '='
|
||||
// padding characters
|
||||
while (doPadding == false && outLen > 0) {
|
||||
while (!doPadding && outLen > 0) {
|
||||
if (outBuff[outLen - 1] != '=') {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -322,11 +322,7 @@ public class Transaction {
|
||||
|
||||
private boolean checkIfMessageExistsAfterDelay(Uri messageUti) {
|
||||
Cursor query = context.getContentResolver().query(messageUti, new String[] {"_id"}, null, null, null);
|
||||
if (query != null && query.moveToFirst()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return query != null && query.moveToFirst();
|
||||
}
|
||||
|
||||
private void sendMmsMessage(String text, String[] addresses, Bitmap[] image, String[] imageNames, byte[] media, String mimeType, String subject) {
|
||||
|
||||
@@ -643,10 +643,8 @@ public class SlideshowModel extends Model
|
||||
return false;
|
||||
|
||||
// No audio allowed.
|
||||
if (slide.hasAudio())
|
||||
return false;
|
||||
return !slide.hasAudio();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user