diff options
author | Bryce Lee <brycelee@google.com> | 2015-08-24 15:25:09 -0700 |
---|---|---|
committer | Bryce Lee <brycelee@google.com> | 2015-08-24 15:25:09 -0700 |
commit | 6134090794feafcbf3f09878a16b12f00d9b3215 (patch) | |
tree | f859ddc66380d6dfc6ec4fc17087e9268a3180f3 /src | |
parent | 2e65dd91aae6ac09b1759e8f9e28dd03115270f6 (diff) | |
download | android_packages_services_Telecomm-6134090794feafcbf3f09878a16b12f00d9b3215.tar.gz android_packages_services_Telecomm-6134090794feafcbf3f09878a16b12f00d9b3215.tar.bz2 android_packages_services_Telecomm-6134090794feafcbf3f09878a16b12f00d9b3215.zip |
Only add callback into missed call notification with non-null handle.
Change-Id: I13fac3aa2c12b232c9caa0d19fa5ab544d8b907b
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/server/telecom/ui/MissedCallNotifierImpl.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java index 11a27381..ef16e59f 100644 --- a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java +++ b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java @@ -164,9 +164,16 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements intent.putExtra(TelecomManager.EXTRA_CLEAR_MISSED_CALLS_INTENT, createClearMissedCallsPendingIntent()); + if (count == 1 && call != null) { - intent.putExtra(TelecomManager.EXTRA_CALL_BACK_INTENT, - createCallBackPendingIntent(call.getHandle())); + final Uri handleUri = call.getHandle(); + String handle = handleUri == null ? null : handleUri.getSchemeSpecificPart(); + + if (!TextUtils.isEmpty(handle) && !TextUtils.equals(handle, + mContext.getString(R.string.handle_restricted))) { + intent.putExtra(TelecomManager.EXTRA_CALL_BACK_INTENT, + createCallBackPendingIntent(handleUri)); + } } mContext.sendBroadcast(intent); |