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

Commit 059df13f authored by Andrii Kulian's avatar Andrii Kulian Committed by Android (Google) Code Review
Browse files

Merge "Add unit tests for 180 degree rotation"

parents 6c7dcd8a 4ede3e0d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -628,6 +628,10 @@ public class ActivityManager {
            return stackId >= FIRST_STATIC_STACK_ID && stackId <= LAST_STATIC_STACK_ID;
        }

        public static boolean isDynamicStack(int stackId) {
            return stackId >= FIRST_DYNAMIC_STACK_ID;
        }

        /**
         * Returns true if the activities contained in the input stack display a shadow around
         * their border.
@@ -825,7 +829,7 @@ public class ActivityManager {
        /** Returns true if the input stack and its content can affect the device orientation. */
        public static boolean canSpecifyOrientation(int stackId) {
            return stackId == HOME_STACK_ID || stackId == RECENTS_STACK_ID
                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID;
                    || stackId == FULLSCREEN_WORKSPACE_STACK_ID || isDynamicStack(stackId);
        }
    }

+0 −1
Original line number Diff line number Diff line
@@ -1984,7 +1984,6 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
        if (!createStaticStackIfNeeded || !StackId.isStaticStack(stackId)) {
            return null;
        }
        // TODO(multi-display): Allow creating stacks on secondary displays.
        return createStackOnDisplay(stackId, DEFAULT_DISPLAY, createOnTop);
    }

+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ import static android.app.ActivityManager.StackId.HOME_STACK_ID;
import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
import static android.app.ActivityManager.StackId.RECENTS_STACK_ID;
import static android.app.ActivityManager.StackId.isStaticStack;
import static android.app.ActivityManager.StackId.isDynamicStack;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
@@ -1926,7 +1926,7 @@ class ActivityStarter {
        final boolean canUseFocusedStack = focusedStackId == FULLSCREEN_WORKSPACE_STACK_ID
                || (focusedStackId == DOCKED_STACK_ID && r.canGoInDockedStack())
                || (focusedStackId == FREEFORM_WORKSPACE_STACK_ID && r.isResizeableOrForced())
                || !isStaticStack(focusedStackId);
                || isDynamicStack(focusedStackId);
        if (canUseFocusedStack && (!newTask
                || mSupervisor.mFocusedStack.mActivityContainer.isEligibleForNewTasks())) {
            if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG_FOCUS,
@@ -1938,7 +1938,7 @@ class ActivityStarter {
        final ArrayList<ActivityStack> homeDisplayStacks = mSupervisor.mHomeStack.mStacks;
        for (int stackNdx = homeDisplayStacks.size() - 1; stackNdx >= 0; --stackNdx) {
            stack = homeDisplayStacks.get(stackNdx);
            if (!ActivityManager.StackId.isStaticStack(stack.mStackId)) {
            if (isDynamicStack(stack.mStackId)) {
                if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG_FOCUS,
                        "computeStackFocus: Setting focused stack=" + stack);
                return stack;
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> {
            mService.configureDisplayPolicyLocked(dc);

            // TODO(multi-display): Create an input channel for each display with touch capability.
            if (displayId == DEFAULT_DISPLAY) {
            if (displayId == DEFAULT_DISPLAY && mService.canDispatchPointerEvents()) {
                dc.mTapDetector = new TaskTapPointerEventListener(
                        mService, dc);
                mService.registerPointerEventListener(dc.mTapDetector);
+6 −1
Original line number Diff line number Diff line
@@ -3404,6 +3404,11 @@ public class WindowManagerService extends IWindowManager.Stub
        mPointerEventDispatcher.unregisterInputEventListener(listener);
    }

    /** Check if the service is set to dispatch pointer events. */
    boolean canDispatchPointerEvents() {
        return mPointerEventDispatcher != null;
    }

    // Called by window manager policy. Not exposed externally.
    @Override
    public int getLidState() {
@@ -4980,7 +4985,7 @@ public class WindowManagerService extends IWindowManager.Stub
        int keyboardPresence = 0;
        int navigationPresence = 0;
        final InputDevice[] devices = mInputManager.getInputDevices();
        final int len = devices.length;
        final int len = devices != null ? devices.length : 0;
        for (int i = 0; i < len; i++) {
            InputDevice device = devices[i];
            if (!device.isVirtual()) {
Loading