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

Commit cc5ddcb8 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['android-review.googlesource.com/3281715',...

Merge cherrypicks of ['android-review.googlesource.com/3281715', 'googleplex-android-review.googlesource.com/29552202', 'googleplex-android-review.googlesource.com/29566630', 'googleplex-android-review.googlesource.com/29574124', 'googleplex-android-review.googlesource.com/29549129', 'googleplex-android-review.googlesource.com/29595551', 'googleplex-android-review.googlesource.com/29591525', 'googleplex-android-review.googlesource.com/29599442', 'googleplex-android-review.googlesource.com/29638747'] into 24Q4-release.

Change-Id: If28ed3d1ec772042eae49fde1af87b33289e9c5b
parents 539f9800 a95ad118
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4380,7 +4380,7 @@
             modes dimensions {@link config_minPercentageMultiWindowSupportWidth} the device
             supports to determine if the activity can be shown in multi windowing modes.
    -->
    <integer name="config_respectsActivityMinWidthHeightMultiWindow">0</integer>
    <integer name="config_respectsActivityMinWidthHeightMultiWindow">-1</integer>

    <!-- This value is only used when the device checks activity min height to determine if it
         can be shown in multi windowing modes.
+10 −2
Original line number Diff line number Diff line
@@ -377,8 +377,16 @@ class TaskContainer {

    @Nullable
    TaskFragmentContainer getContainerWithActivity(@NonNull IBinder activityToken) {
        return getContainer(container -> container.hasAppearedActivity(activityToken)
                || container.hasPendingAppearedActivity(activityToken));
        // When the new activity is launched to the topmost TF because the source activity
        // was in that TF, and the source activity is finished before resolving the new activity,
        // we will try to see if the new activity match a rule with the split activities below.
        // If matched, it can be reparented.
        final TaskFragmentContainer taskFragmentContainer
                = getContainer(container -> container.hasPendingAppearedActivity(activityToken));
        if (taskFragmentContainer != null) {
            return taskFragmentContainer;
        }
        return getContainer(container -> container.hasAppearedActivity(activityToken));
    }

    @Nullable
+2 −1
Original line number Diff line number Diff line
@@ -535,7 +535,8 @@ public class TaskFragmentContainerTest {
        // container1.
        container2.setInfo(mTransaction, mInfo);

        assertTrue(container2.hasActivity(mActivity.getActivityToken()));
        assertTrue(container1.hasActivity(mActivity.getActivityToken()));
        assertFalse(container2.hasActivity(mActivity.getActivityToken()));
        // When the pending appeared record is removed from container1, we respect the appeared
        // record in container2.
        container1.removePendingAppearedActivity(mActivity.getActivityToken());
+4 −4
Original line number Diff line number Diff line
@@ -99,11 +99,11 @@

                </LinearLayout>

                <FrameLayout

                <LinearLayout
                    android:minHeight="@dimen/letterbox_restart_dialog_button_height"
                    android:layout_width="match_parent"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="?android:attr/buttonBarButtonStyle"
                    android:layout_gravity="end">

                    <Button
@@ -133,7 +133,7 @@
                        android:text="@string/letterbox_restart_restart"
                        android:contentDescription="@string/letterbox_restart_restart"/>

                </FrameLayout>
                </LinearLayout>

            </LinearLayout>

+11 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.media.projection;

import static android.view.Display.DEFAULT_DISPLAY;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.compat.CompatChanges;
@@ -29,6 +31,7 @@ import android.hardware.display.VirtualDisplayConfig;
import android.os.Build;
import android.os.Handler;
import android.os.RemoteException;
import android.os.UserManager;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;
@@ -70,6 +73,7 @@ public final class MediaProjection {
    private final DisplayManager mDisplayManager;
    @NonNull
    private final Map<Callback, CallbackRecord> mCallbacks = new ArrayMap<>();
    private final int mDisplayId;

    /** @hide */
    public MediaProjection(Context context, IMediaProjection impl) {
@@ -88,6 +92,11 @@ public final class MediaProjection {
            throw new RuntimeException("Failed to start media projection", e);
        }
        mDisplayManager = displayManager;

        final UserManager userManager = context.getSystemService(UserManager.class);
        mDisplayId = userManager.isVisibleBackgroundUsersSupported()
                ? userManager.getMainDisplayIdAssignedToUser()
                : DEFAULT_DISPLAY;
    }

    /**
@@ -156,6 +165,7 @@ public final class MediaProjection {
        if (surface != null) {
            builder.setSurface(surface);
        }
        builder.setDisplayIdToMirror(mDisplayId);
        return createVirtualDisplay(builder, callback, handler);
    }

@@ -234,6 +244,7 @@ public final class MediaProjection {
        if (surface != null) {
            builder.setSurface(surface);
        }
        builder.setDisplayIdToMirror(mDisplayId);
        return createVirtualDisplay(builder, callback, handler);
    }

Loading