Merge "TelephonyManager: Avoid unnecessary object allocation."

This commit is contained in:
Narayan Kamath
2017-03-20 10:49:16 +00:00
committed by Gerrit Code Review

View File

@@ -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.