Loading services/core/java/com/android/server/am/ActivityStarter.java +10 −10 Original line number Diff line number Diff line Loading @@ -1457,17 +1457,11 @@ class ActivityStarter { } /** * Returns the ID of the display to use for a new activity. If the source activity has * a explicit display ID set, use that to launch the activity. If not and the device is in VR * mode, then return the Vr mode's virtual display ID. * Returns the ID of the display to use for a new activity. If the device is in VR mode, * then return the Vr mode's virtual display ID. If not, if the source activity has * a explicit display ID set, use that to launch the activity. */ private int getSourceDisplayId(ActivityRecord sourceRecord, ActivityRecord startingActivity) { int displayId = sourceRecord != null ? sourceRecord.getDisplayId() : INVALID_DISPLAY; // If the activity has a displayId set explicitly, launch it on the same displayId. if (displayId != INVALID_DISPLAY) { return displayId; } // Check if the Activity is a VR activity. If so, the activity should be launched in // main display. if (startingActivity != null && startingActivity.requestedVrComponent != null) { Loading @@ -1475,7 +1469,7 @@ class ActivityStarter { } // Get the virtual display id from ActivityManagerService. displayId = mService.mVrCompatibilityDisplayId; int displayId = mService.mVrCompatibilityDisplayId; if (displayId != INVALID_DISPLAY) { if (DEBUG_STACK) { Slog.d(TAG, "getSourceDisplayId :" + displayId); Loading @@ -1483,6 +1477,12 @@ class ActivityStarter { mUsingVrCompatibilityDisplay = true; return displayId; } displayId = sourceRecord != null ? sourceRecord.getDisplayId() : INVALID_DISPLAY; // If the activity has a displayId set explicitly, launch it on the same displayId. if (displayId != INVALID_DISPLAY) { return displayId; } return DEFAULT_DISPLAY; } Loading Loading
services/core/java/com/android/server/am/ActivityStarter.java +10 −10 Original line number Diff line number Diff line Loading @@ -1457,17 +1457,11 @@ class ActivityStarter { } /** * Returns the ID of the display to use for a new activity. If the source activity has * a explicit display ID set, use that to launch the activity. If not and the device is in VR * mode, then return the Vr mode's virtual display ID. * Returns the ID of the display to use for a new activity. If the device is in VR mode, * then return the Vr mode's virtual display ID. If not, if the source activity has * a explicit display ID set, use that to launch the activity. */ private int getSourceDisplayId(ActivityRecord sourceRecord, ActivityRecord startingActivity) { int displayId = sourceRecord != null ? sourceRecord.getDisplayId() : INVALID_DISPLAY; // If the activity has a displayId set explicitly, launch it on the same displayId. if (displayId != INVALID_DISPLAY) { return displayId; } // Check if the Activity is a VR activity. If so, the activity should be launched in // main display. if (startingActivity != null && startingActivity.requestedVrComponent != null) { Loading @@ -1475,7 +1469,7 @@ class ActivityStarter { } // Get the virtual display id from ActivityManagerService. displayId = mService.mVrCompatibilityDisplayId; int displayId = mService.mVrCompatibilityDisplayId; if (displayId != INVALID_DISPLAY) { if (DEBUG_STACK) { Slog.d(TAG, "getSourceDisplayId :" + displayId); Loading @@ -1483,6 +1477,12 @@ class ActivityStarter { mUsingVrCompatibilityDisplay = true; return displayId; } displayId = sourceRecord != null ? sourceRecord.getDisplayId() : INVALID_DISPLAY; // If the activity has a displayId set explicitly, launch it on the same displayId. if (displayId != INVALID_DISPLAY) { return displayId; } return DEFAULT_DISPLAY; } Loading