From 42b04e4cf1935921fe90f9a8eab3327d723435b0 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Wed, 19 Jun 2013 11:28:06 -0700 Subject: [PATCH] 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(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 26dde1e15e0f..4185aea5278d 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 -- 2.11.0