Merge "Allow home app being instrumented while starting home from PhoneWindowManager"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3b1056d2c4
@@ -5126,7 +5126,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
|
||||
// Start home.
|
||||
mActivityTaskManagerInternal.startHomeOnDisplay(mCurrentUserId, "startDockOrHome",
|
||||
displayId, fromHomeKey);
|
||||
displayId, true /* allowInstrumenting */, fromHomeKey);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -364,7 +364,7 @@ public abstract class ActivityTaskManagerInternal {
|
||||
* - Use the secondary home defined in the config.
|
||||
*/
|
||||
public abstract boolean startHomeOnDisplay(int userId, String reason, int displayId,
|
||||
boolean fromHomeKey);
|
||||
boolean allowInstrumenting, boolean fromHomeKey);
|
||||
/** Start home activities on all displays that support system decorations. */
|
||||
public abstract boolean startHomeOnAllDisplays(int userId, String reason);
|
||||
/** @return true if the given process is the factory test process. */
|
||||
|
||||
@@ -6492,10 +6492,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,8 @@ class RootActivityContainer extends ConfigurationContainer
|
||||
}
|
||||
|
||||
boolean startHomeOnDisplay(int userId, String reason, int displayId) {
|
||||
return startHomeOnDisplay(userId, reason, displayId, false /*fromHomeKey*/);
|
||||
return startHomeOnDisplay(userId, reason, displayId, false /* allowInstrumenting */,
|
||||
false /* fromHomeKey */);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,7 +362,8 @@ class RootActivityContainer extends ConfigurationContainer
|
||||
* If there are multiple activities matched, use first one.
|
||||
* - Use the secondary home defined in the config.
|
||||
*/
|
||||
boolean startHomeOnDisplay(int userId, String reason, int displayId, boolean fromHomeKey) {
|
||||
boolean startHomeOnDisplay(int userId, String reason, int displayId, boolean allowInstrumenting,
|
||||
boolean fromHomeKey) {
|
||||
// Fallback to top focused display if the displayId is invalid.
|
||||
if (displayId == INVALID_DISPLAY) {
|
||||
displayId = getTopDisplayFocusedStack().mDisplayId;
|
||||
@@ -383,7 +385,7 @@ class RootActivityContainer extends ConfigurationContainer
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!canStartHomeOnDisplay(aInfo, displayId, false /* allowInstrumenting */)) {
|
||||
if (!canStartHomeOnDisplay(aInfo, displayId, allowInstrumenting)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user