Allow home app being instrumented while starting home from PhoneWindowManager
The Launcher tests about home key will go througth PhoneWindowManager
and call to RootActivityContainer#startHomeOnDisplay().
The original startHomeOnDisplay() calls canStartHomeOnDisplay() with
allowInstrumenting=false and causes the tests fail.
This patch allow home app being instrumented while staring home from
PhoneWindowManager.
Bug: 129073085
Test: adb shell am instrument -w -r -e debug false -e log false -e class com.android.quickstep.TaplTestsQuickstep#testOverview com.google.android.apps.nexuslauncher.tests/androidx.test.runner.AndroidJUnitRunner
Change-Id: If6e2c748bed034866b3d4c3e40554c34373a333c
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index c91ee8e..b8e6b0c 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6492,10 +6492,10 @@
@Override
public boolean startHomeOnDisplay(int userId, String reason, int displayId,
- boolean fromHomeKey) {
+ boolean allowInstrumenting, boolean fromHomeKey) {
synchronized (mGlobalLock) {
return mRootActivityContainer.startHomeOnDisplay(userId, reason, displayId,
- fromHomeKey);
+ allowInstrumenting, fromHomeKey);
}
}