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

Commit 1a9ea6ea authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6649874 from 884da7c3 to rvc-qpr1-release

Change-Id: I9dd41c84330b63b9243b0682ede9efa6eef7bd5c
parents ee8d8fdc 884da7c3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -94,10 +94,8 @@ java_defaults {

    annotations_enabled: true,

    // The stub libraries must be visible to frameworks/base so they can be combined
    // into API specific libraries.
    stubs_library_visibility: [
        "//frameworks/base", // Framework
        "//visibility:public",
    ],

    // Set the visibility of the modules creating the stubs source.
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ public class MediaSession2 implements AutoCloseable {
                mCallback.onPostConnect(MediaSession2.this, controllerInfo);
                connected = true;
            } finally {
                if (!connected) {
                if (!connected || isClosed()) {
                    if (DEBUG) {
                        Log.d(TAG, "Rejecting connection or notifying that session is closed"
                                + ", controllerInfo=" + controllerInfo);
+5 −2
Original line number Diff line number Diff line
@@ -1900,11 +1900,13 @@ class ContextImpl extends Context {

    @Override
    public Object getSystemService(String name) {
        // We may override this API from outer context.
        final boolean isUiContext = isUiContext() || getOuterContext().isUiContext();
        // Check incorrect Context usage.
        if (isUiComponent(name) && !isUiContext() && vmIncorrectContextUseEnabled()) {
        if (isUiComponent(name) && !isUiContext && vmIncorrectContextUseEnabled()) {
            final String errorMessage = "Tried to access visual service "
                    + SystemServiceRegistry.getSystemServiceClassName(name)
                    + " from a non-visual Context. ";
                    + " from a non-visual Context:" + getOuterContext();
            final String message = "Visual services, such as WindowManager, WallpaperService or "
                    + "LayoutInflater should be accessed from Activity or other visual Context. "
                    + "Use an Activity or a Context created with "
@@ -2369,6 +2371,7 @@ class ContextImpl extends Context {
        context.setResources(createResources(mToken, mPackageInfo, mSplitName, displayId,
                overrideConfiguration, getDisplayAdjustments(displayId).getCompatibilityInfo(),
                mResources.getLoaders()));
        context.mIsUiContext = isUiContext() || getOuterContext().isUiContext();
        return context;
    }

+3 −2
Original line number Diff line number Diff line
@@ -500,12 +500,13 @@ public class ViewConfiguration {
     */
    public static ViewConfiguration get(Context context) {
        if (!context.isUiContext() && vmIncorrectContextUseEnabled()) {
            final String errorMessage = "Tried to access UI constants from a non-visual Context.";
            final String errorMessage = "Tried to access UI constants from a non-visual Context:"
                    + context;
            final String message = "UI constants, such as display metrics or window metrics, "
                    + "must be accessed from Activity or other visual Context. "
                    + "Use an Activity or a Context created with "
                    + "Context#createWindowContext(int, Bundle), which are adjusted to the "
                    + "configuration and visual bounds of an area on screen.";
                    + "configuration and visual bounds of an area on screen";
            final Exception exception = new IllegalArgumentException(errorMessage);
            StrictMode.onIncorrectContextUsed(message, exception);
            Log.e(TAG, errorMessage + message, exception);
+19 −9
Original line number Diff line number Diff line
@@ -1454,11 +1454,22 @@ public interface WindowManager extends ViewManager {
        @Deprecated
        public static final int FLAG_LAYOUT_INSET_DECOR = 0x00010000;

        /** Window flag: When set, input method can't interact with the focusable window
         * and can be placed to use more space and cover the input method.
         * Note: When combined with {@link #FLAG_NOT_FOCUSABLE}, this flag has no
         * effect since input method cannot interact with windows having {@link #FLAG_NOT_FOCUSABLE}
         * flag set.
        /** Window flag: when set, inverts the input method focusability of the window.
         *
         * The effect of setting this flag depends on whether {@link #FLAG_NOT_FOCUSABLE} is set:
         * <p>
         * If {@link #FLAG_NOT_FOCUSABLE} is <em>not</em> set, i.e. when the window is focusable,
         * setting this flag prevents this window from becoming the target of the input method.
         * Consequently, it will <em>not</em> be able to interact with the input method,
         * and will be layered above the input method (unless there is another input method
         * target above it).
         *
         * <p>
         * If {@link #FLAG_NOT_FOCUSABLE} <em>is</em> set, setting this flag requests for the window
         * to be the input method target even though  the window is <em>not</em> focusable.
         * Consequently, it will be layered below the input method.
         * Note: Windows that set {@link #FLAG_NOT_FOCUSABLE} cannot interact with the input method,
         * regardless of this flag.
         */
        public static final int FLAG_ALT_FOCUSABLE_IM = 0x00020000;

@@ -2142,13 +2153,12 @@ public interface WindowManager extends ViewManager {
         * focus.  In particular, this checks the
         * {@link #FLAG_NOT_FOCUSABLE} and {@link #FLAG_ALT_FOCUSABLE_IM}
         * flags and returns true if the combination of the two corresponds
         * to a window that needs to be behind the input method so that the
         * user can type into it.
         * to a window that can use the input method.
         *
         * @param flags The current window manager flags.
         *
         * @return Returns {@code true} if such a window should be behind/interact
         * with an input method, {@code false} if not.
         * @return Returns {@code true} if a window with the given flags would be able to
         * use the input method, {@code false} if not.
         */
        public static boolean mayUseInputMethod(int flags) {
            return (flags & FLAG_NOT_FOCUSABLE) != FLAG_NOT_FOCUSABLE
Loading