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

Commit 90f35621 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8953730 from ae817376 to tm-qpr1-release

Change-Id: I734271ec119052c5c3b814ecec12560db364992a
parents 0da50713 ae817376
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -153,9 +153,9 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
            final IWindowSession session = WindowManagerGlobal.getWindowSession();
            while (state.keepRunning()) {
                session.relayout(mWindow, mParams, mWidth, mHeight,
                        mViewVisibility.getAsInt(), mFlags, mOutFrames,
                        mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls,
                        new Bundle());
                        mViewVisibility.getAsInt(), mFlags, 0 /* seq */, 0 /* lastSyncSeqId */,
                        mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState,
                        mOutControls, new Bundle());
            }
        }
    }
+13 −4
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ import com.android.internal.inputmethod.ImeTracing;
import com.android.internal.inputmethod.InputMethodNavButtonFlags;
import com.android.internal.inputmethod.InputMethodPrivilegedOperations;
import com.android.internal.inputmethod.InputMethodPrivilegedOperationsRegistry;
import com.android.internal.inputmethod.SoftInputShowHideReason;
import com.android.internal.util.RingBuffer;
import com.android.internal.view.IInlineSuggestionsRequestCallback;
import com.android.internal.view.IInputContext;
@@ -2962,9 +2963,13 @@ public class InputMethodService extends AbstractInputMethodService {
     * @param flags Provides additional operating flags.
     */
    public void requestHideSelf(int flags) {
        requestHideSelf(flags, SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_IME);
    }

    private void requestHideSelf(int flags, @SoftInputShowHideReason int reason) {
        ImeTracing.getInstance().triggerServiceDump("InputMethodService#requestHideSelf", mDumper,
                null /* icProto */);
        mPrivOps.hideMySoftInput(flags);
        mPrivOps.hideMySoftInput(flags, reason);
    }

    /**
@@ -2985,7 +2990,9 @@ public class InputMethodService extends AbstractInputMethodService {
        if (mShowInputRequested) {
            // If the soft input area is shown, back closes it and we
            // consume the back key.
            if (doIt) requestHideSelf(0);
            if (doIt) {
                requestHideSelf(0 /* flags */, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY);
            }
            return true;
        } else if (mDecorViewVisible) {
            if (mCandidatesVisibility == View.VISIBLE) {
@@ -3136,7 +3143,8 @@ public class InputMethodService extends AbstractInputMethodService {
    private void onToggleSoftInput(int showFlags, int hideFlags) {
        if (DEBUG) Log.v(TAG, "toggleSoftInput()");
        if (isInputViewShown()) {
            requestHideSelf(hideFlags);
            requestHideSelf(
                    hideFlags, SoftInputShowHideReason.HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT);
        } else {
            requestShowSelf(showFlags);
        }
@@ -3571,7 +3579,8 @@ public class InputMethodService extends AbstractInputMethodService {
     */
    public void onExtractingInputChanged(EditorInfo ei) {
        if (ei.inputType == InputType.TYPE_NULL) {
            requestHideSelf(InputMethodManager.HIDE_NOT_ALWAYS);
            requestHideSelf(InputMethodManager.HIDE_NOT_ALWAYS,
                    SoftInputShowHideReason.HIDE_SOFT_INPUT_EXTRACT_INPUT_CHANGED);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public final class DefaultSelectionToolbarRenderService extends SelectionToolbar

        if (mToolbarCache.indexOfKey(callingUid) < 0) {
            RemoteSelectionToolbar toolbar = new RemoteSelectionToolbar(this,
                    widgetToken, showInfo.getHostInputToken(),
                    widgetToken, showInfo,
                    callbackWrapper, this::transferTouch);
            mToolbarCache.put(callingUid, new Pair<>(widgetToken, toolbar));
        }
+4 −9
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.AnimatedVectorDrawable;
@@ -162,15 +161,14 @@ final class RemoteSelectionToolbar {
    private final Rect mTempContentRectForRoot = new Rect();
    private final int[] mTempCoords = new int[2];

    RemoteSelectionToolbar(Context context, long selectionToolbarToken, IBinder hostInputToken,
    RemoteSelectionToolbar(Context context, long selectionToolbarToken, ShowInfo showInfo,
            SelectionToolbarRenderService.RemoteCallbackWrapper callbackWrapper,
            SelectionToolbarRenderService.TransferTouchListener transferTouchListener) {
        mContext = applyDefaultTheme(context);
        mContext = applyDefaultTheme(context, showInfo.isIsLightTheme());
        mSelectionToolbarToken = selectionToolbarToken;
        mCallbackWrapper = callbackWrapper;
        mTransferTouchListener = transferTouchListener;
        mHostInputToken = hostInputToken;

        mHostInputToken = showInfo.getHostInputToken();
        mContentContainer = createContentContainer(mContext);
        mMarginHorizontal = mContext.getResources()
                .getDimensionPixelSize(R.dimen.floating_toolbar_horizontal_margin);
@@ -1359,12 +1357,9 @@ final class RemoteSelectionToolbar {
    /**
     * Returns a re-themed context with controlled look and feel for views.
     */
    private static Context applyDefaultTheme(Context originalContext) {
        TypedArray a = originalContext.obtainStyledAttributes(new int[]{R.attr.isLightTheme});
        boolean isLightTheme = a.getBoolean(0, true);
    private static Context applyDefaultTheme(Context originalContext, boolean isLightTheme) {
        int themeId =
                isLightTheme ? R.style.Theme_DeviceDefault_Light : R.style.Theme_DeviceDefault;
        a.recycle();
        return new ContextThemeWrapper(originalContext, themeId);
    }

+2 −2
Original line number Diff line number Diff line
@@ -1154,8 +1154,8 @@ public abstract class WallpaperService extends Service {
                        mLayout.surfaceInsets.set(0, 0, 0, 0);
                    }
                    final int relayoutResult = mSession.relayout(mWindow, mLayout, mWidth, mHeight,
                            View.VISIBLE, 0, mWinFrames, mMergedConfiguration, mSurfaceControl,
                            mInsetsState, mTempControls, mSyncSeqIdBundle);
                            View.VISIBLE, 0, 0, 0, mWinFrames, mMergedConfiguration,
                            mSurfaceControl, mInsetsState, mTempControls, mSyncSeqIdBundle);

                    final int transformHint = SurfaceControl.rotationToBufferTransform(
                            (mDisplayInstallOrientation + mDisplay.getRotation()) % 4);
Loading