Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61340907 authored by Bryce Lee's avatar Bryce Lee
Browse files

Only add callback into missed call notification with non-null handle.

Change-Id: I13fac3aa2c12b232c9caa0d19fa5ab544d8b907b
parent 2e65dd91
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -164,9 +164,16 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements
            intent.putExtra(TelecomManager.EXTRA_CLEAR_MISSED_CALLS_INTENT,
                    createClearMissedCallsPendingIntent());


            if (count == 1 && call != null) {
                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(call.getHandle()));
                            createCallBackPendingIntent(handleUri));
                }
            }

            mContext.sendBroadcast(intent);