Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 191ce1d4 authored by Chilun's avatar Chilun
Browse files

Start secondary home activity only if device support Multi-Display

We don't need to find a home activity to launch on secondary displays if
device not support Multi-Display

Bug: 122475303
Test: atest ActivityManagerMultiDisplayTests
Change-Id: Iba4eadae89a739e8647a23c0006b8f6253aa7917
parent 47bfb774
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -362,6 +362,8 @@ class RootActivityContainer extends ConfigurationContainer
        if (displayId == DEFAULT_DISPLAY) {
            homeIntent = mService.getHomeIntent();
            aInfo = resolveHomeActivity(userId, homeIntent);
        } else if (!mService.mSupportsMultiDisplay) {
            return false;
        } else {
            Pair<ActivityInfo, Intent> info = resolveSecondaryHomeActivity(userId, displayId);
            aInfo = info.first;
@@ -544,6 +546,11 @@ class RootActivityContainer extends ConfigurationContainer
            return true;
        }

        if (displayId != DEFAULT_DISPLAY && !mService.mSupportsMultiDisplay) {
            // Can't launch home on secondary display if device not support multi-display.
            return false;
        }

        final boolean deviceProvisioned = Settings.Global.getInt(
                mService.mContext.getContentResolver(),
                Settings.Global.DEVICE_PROVISIONED, 0) != 0;