Directly call from switch to work profile dialog

Bug: 269593132
Test: Manual(
With work profile telephony enabled
1. Tried to call a number from a personal profile dialer
2. Switch to work profile dialog gets launched
3. On clicking the "Switch to work profile" button,
4. [New behavior] call is placed directly using the work profile dialer
   instead of [Old behavior] work dialer gets launched with number auto
   filled on the dial pad and user needs to press the call button to
   make the call.
)
Change-Id: I20fed35b8aff592a012679375ed026b2d0a33761
This commit is contained in:
Ayush Sharma
2023-02-21 16:38:12 +00:00
parent 16ac8f216e
commit 222e1766cb

View File

@@ -66,7 +66,7 @@ class SwitchToManagedProfileForCallActivity : AlertActivity(), DialogInterface.O
private fun switchToManagedProfile() {
try {
applicationContext.startActivityAsUser(
Intent(Intent.ACTION_DIAL, phoneNumber),
Intent(Intent.ACTION_CALL, phoneNumber),
ActivityOptions.makeOpenCrossProfileAppsAnimation().toBundle(),
UserHandle.of(managedProfileUserId)
)