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

Commit 29107f09 authored by Nancy Chen's avatar Nancy Chen Committed by Android Git Automerger
Browse files

am 4c0050a0: Merge "Fix runtime error when clicking "call back" from secondary user." into mnc-dev

* commit '4c0050a0':
  Fix runtime error when clicking "call back" from secondary user.
parents d5e7e54c 4c0050a0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public final class TelecomBroadcastIntentProcessor {

            Intent callIntent = new Intent(Intent.ACTION_SENDTO, intent.getData());
            callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            mContext.startActivity(callIntent);
            mContext.startActivityAsUser(callIntent, UserHandle.CURRENT);

        // Call back recent caller from the missed call notification.
        } else if (ACTION_CALL_BACK_FROM_NOTIFICATION.equals(action)) {
@@ -67,7 +67,7 @@ public final class TelecomBroadcastIntentProcessor {
            Intent callIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, intent.getData());
            callIntent.setFlags(
                    Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
            mContext.startActivity(callIntent);
            mContext.startActivityAsUser(callIntent, UserHandle.CURRENT);

        // Clear the missed call notification and call log entries.
        } else if (ACTION_CLEAR_MISSED_CALLS.equals(action)) {
+3 −2
Original line number Diff line number Diff line
@@ -220,7 +220,8 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements
        mMissedCallCount = 0;
        long token = Binder.clearCallingIdentity();
        try {
            mNotificationManager.cancel(MISSED_CALL_NOTIFICATION_ID);
            mNotificationManager.cancelAsUser(null, MISSED_CALL_NOTIFICATION_ID,
                    UserHandle.CURRENT);
        } finally {
            Binder.restoreCallingIdentity(token);
        }
@@ -259,7 +260,7 @@ public class MissedCallNotifierImpl extends CallsManagerListenerBase implements
        TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(mContext);
        taskStackBuilder.addNextIntent(intent);

        return taskStackBuilder.getPendingIntent(0, 0);
        return taskStackBuilder.getPendingIntent(0, 0, null, UserHandle.CURRENT);
    }

    /**