summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-04-18 12:03:44 -0700
committerSvet Ganov <svetoslavganov@google.com>2015-04-18 12:14:07 -0700
commit774afb9a8e9f8f5a4d31d0573d94efeb3e5c3655 (patch)
tree1314b6460f20bb33983247978975ee96cf5482c5 /telephony
parent641207d180510b6b4ef39f7f1393f5d539479cb4 (diff)
downloadframeworks_base-774afb9a8e9f8f5a4d31d0573d94efeb3e5c3655.zip
frameworks_base-774afb9a8e9f8f5a4d31d0573d94efeb3e5c3655.tar.gz
frameworks_base-774afb9a8e9f8f5a4d31d0573d94efeb3e5c3655.tar.bz2
Fix calling package for app ops
Change-Id: Ie867262e74d0b09e16193cb575b1c1cf942c83cb
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 81f329c..7c68de2 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -2571,10 +2571,11 @@ public class TelephonyManager {
* LISTEN_ flags.
*/
public void listen(PhoneStateListener listener, int events) {
- String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
+ if (mContext == null) return;
try {
Boolean notifyNow = (getITelephony() != null);
- sRegistry.listenForSubscriber(listener.mSubId, pkgForDebug, listener.callback, events, notifyNow);
+ sRegistry.listenForSubscriber(listener.mSubId, mContext.getOpPackageName(),
+ listener.callback, events, notifyNow);
} catch (RemoteException ex) {
// system process dead
} catch (NullPointerException ex) {