Fixed activity not started for current user
In headless mode, the activity started by the phone process needs
to be started for the current user, because phone process is always
running as the system user, and the actual user is running as
the secondary user.
Fix: 365861945
Test: Basic telephony functionality tests
Test: atest FrameworksTelephonyTests
Test: atest TeleServiceTests
Flag: EXEMPT bug fix
Change-Id: I4f12a3fd948fe590f19ec72551d1a347ac38962a
diff --git a/tests/src/com/android/TestContext.java b/tests/src/com/android/TestContext.java
index a96ce2e..e464ad5 100644
--- a/tests/src/com/android/TestContext.java
+++ b/tests/src/com/android/TestContext.java
@@ -33,6 +33,7 @@
import android.os.Looper;
import android.os.PersistableBundle;
import android.os.Process;
+import android.os.UserHandle;
import android.os.UserManager;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
@@ -112,6 +113,11 @@
}
@Override
+ public void startActivityAsUser(Intent intent, UserHandle user) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public void sendBroadcast(Intent intent) {
mIntent = intent;
}