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

Commit 49e43291 authored by Adam Lesinski's avatar Adam Lesinski Committed by Android Git Automerger
Browse files

am 234c6c8a: am ff7cba54: am 42e9b631: Merge "Make room for new public flags" into klp-dev

* commit '234c6c8a':
  Make room for new public flags
parents 5d5e5733 234c6c8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ public class SurfaceView extends View {
                              | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                              ;
                if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) {
                    mLayout.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
                    mLayout.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
                }
                mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION;

+4 −5
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ import java.io.OutputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Locale;

/**
 * The top of a view hierarchy, implementing the needed protocol between View
@@ -468,7 +467,7 @@ public final class ViewRootImpl implements ViewParent,
                if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs);

                if (!compatibilityInfo.supportsScreen()) {
                    attrs.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
                    attrs.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
                    mLastInCompatMode = true;
                }

@@ -750,7 +749,7 @@ public final class ViewRootImpl implements ViewParent,
            mClientWindowLayoutFlags = attrs.flags;
            // preserve compatible window flag if exists.
            int compatibleWindowFlag =
                mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
                mWindowAttributes.flags & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
            // transfer over system UI visibility values as they carry current state.
            attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility;
            attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility;
@@ -1147,10 +1146,10 @@ public final class ViewRootImpl implements ViewParent,
            mFullRedrawNeeded = true;
            mLayoutRequested = true;
            if (mLastInCompatMode) {
                params.flags &= ~WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
                params.flags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
                mLastInCompatMode = false;
            } else {
                params.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
                params.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
                mLastInCompatMode = true;
            }
        }
+25 −24
Original line number Diff line number Diff line
@@ -841,6 +841,15 @@ public interface WindowManager extends ViewManager {
        // ----- HIDDEN FLAGS.
        // These start at the high bit and go down.

        /**
         * Flag for a window in local focus mode.
         * Window in local focus mode can control focus independent of window manager using
         * {@link Window#setLocalFocus(boolean, boolean)}.
         * Usually window in this mode will not get touch/key events from window manager, but will
         * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}.
         */
        public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000;

        /** Window flag: Enable touches to slide out of a window into neighboring
         * windows in mid-gesture instead of being captured for the duration of
         * the gesture.
@@ -851,7 +860,7 @@ public interface WindowManager extends ViewManager {
         *
         * {@hide}
         */
        public static final int FLAG_SLIPPERY = 0x04000000;
        public static final int FLAG_SLIPPERY = 0x20000000;

        /**
         * Flag for a window belonging to an activity that responds to {@link KeyEvent#KEYCODE_MENU}
@@ -864,29 +873,8 @@ public interface WindowManager extends ViewManager {
         *
         * {@hide}
         */
        public static final int FLAG_NEEDS_MENU_KEY = 0x08000000;
        public static final int FLAG_NEEDS_MENU_KEY = 0x40000000;

        /**
         * Flag for a window in local focus mode.
         * Window in local focus mode can control focus independent of window manager using
         * {@link Window#setLocalFocus(boolean, boolean)}.
         * Usually window in this mode will not get touch/key events from window manager, but will
         * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}.
         */
        public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000;

        /** Window flag: special flag to limit the size of the window to be
         * original size ([320x480] x density). Used to create window for applications
         * running under compatibility mode.
         *
         * {@hide} */
        public static final int FLAG_COMPATIBLE_WINDOW = 0x20000000;

        /** Window flag: a special option intended for system dialogs.  When
         * this flag is set, the window will demand focus unconditionally when
         * it is created.
         * {@hide} */
        public static final int FLAG_SYSTEM_ERROR = 0x40000000;

        /**
         * Various behavioral options/flags.  Default is none.
@@ -1045,6 +1033,19 @@ public interface WindowManager extends ViewManager {
         * {@hide} */
        public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040;

        /** Window flag: special flag to limit the size of the window to be
         * original size ([320x480] x density). Used to create window for applications
         * running under compatibility mode.
         *
         * {@hide} */
        public static final int PRIVATE_FLAG_COMPATIBLE_WINDOW = 0x00000080;

        /** Window flag: a special option intended for system dialogs.  When
         * this flag is set, the window will demand focus unconditionally when
         * it is created.
         * {@hide} */
        public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100;

        /**
         * Control flags that are private to the platform.
         * @hide
@@ -1783,7 +1784,7 @@ public interface WindowManager extends ViewManager {
                sb.append(" rotAnim=");
                sb.append(rotationAnimation);
            }
            if ((flags & FLAG_COMPATIBLE_WINDOW) != 0) {
            if ((flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) {
                sb.append(" compatible=true");
            }
            if (systemUiVisibility != 0) {
+1 −1
Original line number Diff line number Diff line
@@ -1626,7 +1626,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);

            if (!compatInfo.supportsScreen()) {
                win.addFlags(WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW);
                win.addFlags(WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW);
            }

            win.setDefaultIcon(icon);
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.server.am;

import static android.view.WindowManager.LayoutParams.FLAG_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR;

import android.content.Context;
import android.content.DialogInterface;
@@ -72,7 +72,7 @@ final class AppErrorDialog extends BaseErrorDialog {
        }

        setTitle(res.getText(com.android.internal.R.string.aerr_title));
        getWindow().addFlags(FLAG_SYSTEM_ERROR);
        getWindow().addFlags(PRIVATE_FLAG_SYSTEM_ERROR);
        WindowManager.LayoutParams attrs = getWindow().getAttributes();
        attrs.setTitle("Application Error: " + app.info.processName);
        attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
Loading