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

Commit c857a5b6 authored by Bryce Lee's avatar Bryce Lee
Browse files

Add back support for force resize developer option.

This functionality was lost when resizable was separated for PiP and
split screen. This changelist brings back this functionality by
taking the developer option flag into account when the TaskRecord
reports its support for split screen.

Fixes: 64010770
Test: turn on force resizable in developer settings, enter split
      screen with non-resizable task in the foreground.
Change-Id: I103943f0400389cac19f799b4e64e0607330f271
parent 73e3d9f5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_AND_PIPABLE
import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION;
import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES;
import static android.provider.Settings.Secure.USER_SETUP_COMPLETE;
import static android.view.Display.DEFAULT_DISPLAY;

@@ -1580,8 +1581,9 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
        // A task can not be docked even if it is considered resizeable because it only supports
        // picture-in-picture mode but has a non-resizeable resizeMode
        return mService.mSupportsSplitScreenMultiWindow
                && isResizeable(false /* checkSupportsPip */)
                && !ActivityInfo.isPreserveOrientationMode(mResizeMode);
                && (mService.mForceResizableActivities
                        || (isResizeable(false /* checkSupportsPip */)
                                && !ActivityInfo.isPreserveOrientationMode(mResizeMode)));
    }

    /**