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

Commit 5998c183 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Add a remote control mechanism for window containers"

parents eef40f11 ddedfd46
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import android.service.voice.IVoiceInteractionSession;
import android.view.IRecentsAnimationRunner;
import android.view.RemoteAnimationDefinition;
import android.view.RemoteAnimationAdapter;
import android.view.WindowContainerTransaction;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.os.IResultReceiver;
import com.android.internal.policy.IKeyguardDismissCallback;
@@ -220,6 +221,7 @@ interface IActivityTaskManager {
    void setTaskResizeable(int taskId, int resizeableMode);
    void toggleFreeformWindowingMode(in IBinder token);
    void resizeTask(int taskId, in Rect bounds, int resizeMode);
    void applyContainerTransaction(in WindowContainerTransaction t);
    void moveStackToDisplay(int stackId, int displayId);
    void removeStack(int stackId);

+28 −0
Original line number Diff line number Diff line
@@ -439,6 +439,34 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
        return changed;
    }

    /**
     * Copies the fields specified by mask from delta into this Configuration object.
     * @hide
     */
    public void setTo(@NonNull WindowConfiguration delta, @WindowConfig int mask) {
        if ((mask & WINDOW_CONFIG_BOUNDS) != 0) {
            setBounds(delta.mBounds);
        }
        if ((mask & WINDOW_CONFIG_APP_BOUNDS) != 0) {
            setAppBounds(delta.mAppBounds);
        }
        if ((mask & WINDOW_CONFIG_WINDOWING_MODE) != 0) {
            setWindowingMode(delta.mWindowingMode);
        }
        if ((mask & WINDOW_CONFIG_ACTIVITY_TYPE) != 0) {
            setActivityType(delta.mActivityType);
        }
        if ((mask & WINDOW_CONFIG_ALWAYS_ON_TOP) != 0) {
            setAlwaysOnTop(delta.mAlwaysOnTop);
        }
        if ((mask & WINDOW_CONFIG_ROTATION) != 0) {
            setRotation(delta.mRotation);
        }
        if ((mask & WINDOW_CONFIG_DISPLAY_WINDOWING_MODE) != 0) {
            setDisplayWindowingMode(delta.mDisplayWindowingMode);
        }
    }

    /**
     * Return a bit mask of the differences between this Configuration object and the given one.
     * Does not change the values of either. Any undefined fields in <var>other</var> are ignored.
+74 −0
Original line number Diff line number Diff line
@@ -1586,6 +1586,80 @@ public final class Configuration implements Parcelable, Comparable<Configuration
        return changed;
    }

    /**
     * Copies the fields specified by mask from delta into this Configuration object. This will
     * copy anything allowed by the mask (including undefined values).
     * @hide
     */
    public void setTo(@NonNull Configuration delta, @Config int mask,
            @WindowConfiguration.WindowConfig int windowMask) {
        if ((mask & ActivityInfo.CONFIG_FONT_SCALE) != 0) {
            fontScale = delta.fontScale;
        }
        if ((mask & ActivityInfo.CONFIG_MCC) != 0) {
            mcc = delta.mcc;
        }
        if ((mask & ActivityInfo.CONFIG_MNC) != 0) {
            mnc = delta.mnc;
        }
        if ((mask & ActivityInfo.CONFIG_LOCALE) != 0) {
            mLocaleList = delta.mLocaleList;
            if (!mLocaleList.isEmpty()) {
                locale = (Locale) delta.locale.clone();
            }
        }
        if ((mask & ActivityInfo.CONFIG_LAYOUT_DIRECTION) != 0) {
            final int deltaScreenLayoutDir = delta.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK;
            screenLayout = (screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK) | deltaScreenLayoutDir;
        }
        if ((mask & ActivityInfo.CONFIG_LOCALE) != 0) {
            userSetLocale = delta.userSetLocale;
        }
        if ((mask & ActivityInfo.CONFIG_TOUCHSCREEN) != 0) {
            touchscreen = delta.touchscreen;
        }
        if ((mask & ActivityInfo.CONFIG_KEYBOARD) != 0) {
            keyboard = delta.keyboard;
        }
        if ((mask & ActivityInfo.CONFIG_KEYBOARD_HIDDEN) != 0) {
            keyboardHidden = delta.keyboardHidden;
            hardKeyboardHidden = delta.hardKeyboardHidden;
            navigationHidden = delta.navigationHidden;
        }
        if ((mask & ActivityInfo.CONFIG_NAVIGATION) != 0) {
            navigation = delta.navigation;
        }
        if ((mask & ActivityInfo.CONFIG_ORIENTATION) != 0) {
            orientation = delta.orientation;
        }
        if ((mask & ActivityInfo.CONFIG_SCREEN_LAYOUT) != 0) {
            // Not enough granularity for each component unfortunately.
            screenLayout = screenLayout | (delta.screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK);
        }
        if ((mask & ActivityInfo.CONFIG_COLOR_MODE) != 0) {
            colorMode = delta.colorMode;
        }
        if ((mask & ActivityInfo.CONFIG_UI_MODE) != 0) {
            uiMode = delta.uiMode;
        }
        if ((mask & ActivityInfo.CONFIG_SCREEN_SIZE) != 0) {
            screenWidthDp = delta.screenWidthDp;
            screenHeightDp = delta.screenHeightDp;
        }
        if ((mask & ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE) != 0) {
            smallestScreenWidthDp = delta.smallestScreenWidthDp;
        }
        if ((mask & ActivityInfo.CONFIG_DENSITY) != 0) {
            densityDpi = delta.densityDpi;
        }
        if ((mask & ActivityInfo.CONFIG_ASSETS_PATHS) != 0) {
            assetsSeq = delta.assetsSeq;
        }
        if ((mask & ActivityInfo.CONFIG_WINDOW_CONFIGURATION) != 0) {
            windowConfiguration.setTo(delta.windowConfiguration, windowMask);
        }
    }

    /**
     * Return a bit mask of the differences between this Configuration
     * object and the given one.  Does not change the values of either.  Any
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.view;

import android.view.SurfaceControl;

/**
 * Interface for a window container to communicate with the window manager. This also acts as a
 * token.
 * @hide
 */
interface IWindowContainer {

    /**
     * Gets a persistent leash for this container or {@code null}.
     */
    SurfaceControl getLeash();
}
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.view;

parcelable WindowContainerTransaction;
Loading