From eb7cb561f016a1d23b81364e0e78ace5d4192018 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Fri, 17 Mar 2017 10:28:54 +0000 Subject: TelephonyManager: Avoid unnecessary object allocation. No need to use a boxed type - the value is being passed to a function that takes a boolean. Test: make Change-Id: Id6d5c581dd6e3a1832d3419a2fbec92e97c4240d --- telephony/java/android/telephony/TelephonyManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index c691879706eb..d8a489285ad3 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3204,7 +3204,7 @@ public class TelephonyManager { public void listen(PhoneStateListener listener, int events) { if (mContext == null) return; try { - Boolean notifyNow = (getITelephony() != null); + boolean notifyNow = (getITelephony() != null); // If the listener has not explicitly set the subId (for example, created with the // default constructor), replace the subId so it will listen to the account the // telephony manager is created with. -- cgit v1.2.3-59-g8ed1b