Merge "Fix classCastException when Monkey test"
diff --git a/src/com/android/server/telecom/components/UserCallActivity.java b/src/com/android/server/telecom/components/UserCallActivity.java
index d88e09e..83e4449 100644
--- a/src/com/android/server/telecom/components/UserCallActivity.java
+++ b/src/com/android/server/telecom/components/UserCallActivity.java
@@ -62,7 +62,10 @@
// accurately determine whether the calling package has the CALL_PHONE runtime permission.
// At this point in time we trust that the ActivityManager has already performed this
// validation before starting this activity.
- new UserCallIntentProcessor(this, userHandle).processIntent(getIntent(),
+ // Create a new instance of intent to avoid modifying the
+ // ActivityThread.ActivityClientRecord#intent directly.
+ // Modifying directly may be a potential risk when relaunching this activity.
+ new UserCallIntentProcessor(this, userHandle).processIntent(new Intent(intent),
getCallingPackage(), true /* hasCallAppOp*/);
finish();
}