From c80e3d434f034d8594014df2fe028e9420930ea8 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Wed, 19 Jun 2013 11:28:06 -0700 Subject: TelephonyManager.listen can have notifyNow always true. Since telepony.registry is a real system service notifyNow parameter doesn't need to be conditional as telephony.registery will never go away. This is different from most of the other TelephonyManager methods which are used to invoke methods on the phone service which implements ITelephony and is implemented by PhoneInterfaceManager in the phone application. Since the phone app is not a system service it can and does go away when it crashes. Bug: 9393863 Change-Id: I1a8afc12b0e139e72f05820e49f3d996aec2b52a --- telephony/java/android/telephony/TelephonyManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'telephony') diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 26dde1e..4185aea 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1252,7 +1252,7 @@ public class TelephonyManager { public void listen(PhoneStateListener listener, int events) { String pkgForDebug = mContext != null ? mContext.getPackageName() : ""; try { - Boolean notifyNow = (getITelephony() != null); + Boolean notifyNow = true; sRegistry.listen(pkgForDebug, listener.callback, events, notifyNow); } catch (RemoteException ex) { // system process dead -- cgit v1.1