Merge "Fix runtime error when clicking "call back" from secondary user." into mnc-dev
diff --git a/src/com/android/server/telecom/TelecomBroadcastIntentProcessor.java b/src/com/android/server/telecom/TelecomBroadcastIntentProcessor.java
index 2b22ea9..89aa2aa 100644
--- a/src/com/android/server/telecom/TelecomBroadcastIntentProcessor.java
+++ b/src/com/android/server/telecom/TelecomBroadcastIntentProcessor.java
@@ -56,7 +56,7 @@
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 @@
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)) {
diff --git a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
index 300137f..ad6fc16 100644
--- a/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
+++ b/src/com/android/server/telecom/ui/MissedCallNotifierImpl.java
@@ -220,7 +220,8 @@
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 @@
TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(mContext);
taskStackBuilder.addNextIntent(intent);
- return taskStackBuilder.getPendingIntent(0, 0);
+ return taskStackBuilder.getPendingIntent(0, 0, null, UserHandle.CURRENT);
}
/**