summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-11-17 11:19:52 -0800
committerKenny Root <kroot@google.com>2010-11-17 11:22:06 -0800
commit5644b080741bb4fae103617ecbea7a62b0262a56 (patch)
treecc7f08a6fb0262357a853af02ae8d04c86406a24 /telephony
parent1bf397ffbdaae9a5354c9bb0b5121c4a9f1c8c76 (diff)
downloadframeworks_base-5644b080741bb4fae103617ecbea7a62b0262a56.zip
frameworks_base-5644b080741bb4fae103617ecbea7a62b0262a56.tar.gz
frameworks_base-5644b080741bb4fae103617ecbea7a62b0262a56.tar.bz2
Don't waste resources creating new Boolean objects
There's a static Boolean.TRUE and Boolean.FALSE that can be used without instantiating a new Boolean object unnecessarily. Change-Id: I30a6c6514faae0ebeb6b571bf741db6814b8cc78
Diffstat (limited to 'telephony')
-rwxr-xr-xtelephony/java/com/android/internal/telephony/cdma/CDMAPhone.java4
-rwxr-xr-xtelephony/java/com/android/internal/telephony/sip/SipPhoneBase.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index b9d5673..099bc30 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -934,13 +934,13 @@ public class CDMAPhone extends PhoneBase {
switch(action) {
case CANCEL_ECM_TIMER:
removeCallbacks(mExitEcmRunnable);
- mEcmTimerResetRegistrants.notifyResult(new Boolean(true));
+ mEcmTimerResetRegistrants.notifyResult(Boolean.TRUE);
break;
case RESTART_ECM_TIMER:
long delayInMillis = SystemProperties.getLong(
TelephonyProperties.PROPERTY_ECM_EXIT_TIMER, DEFAULT_ECM_EXIT_TIMER_VALUE);
postDelayed(mExitEcmRunnable, delayInMillis);
- mEcmTimerResetRegistrants.notifyResult(new Boolean(false));
+ mEcmTimerResetRegistrants.notifyResult(Boolean.FALSE);
break;
default:
Log.e(LOG_TAG, "handleTimerInEmergencyCallbackMode, unsupported action " + action);
diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
index afd4d0c..db9e35a 100755
--- a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
@@ -101,12 +101,12 @@ abstract class SipPhoneBase extends PhoneBase {
}
protected void startRingbackTone() {
- AsyncResult result = new AsyncResult(null, new Boolean(true), null);
+ AsyncResult result = new AsyncResult(null, Boolean.TRUE, null);
mRingbackRegistrants.notifyRegistrants(result);
}
protected void stopRingbackTone() {
- AsyncResult result = new AsyncResult(null, new Boolean(false), null);
+ AsyncResult result = new AsyncResult(null, Boolean.FALSE, null);
mRingbackRegistrants.notifyRegistrants(result);
}