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

Commit 5643c12f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6671561 from 8b110570 to rvc-release

Change-Id: Ibbe825c9795ee3a27d3423c2fd9fc378f8179603
parents 82b41add 8b110570
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
               services/incremental/

[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}

strings_lint_hook = ${REPO_ROOT}/frameworks/base/tools/stringslint/stringslint_sha.sh ${PREUPLOAD_COMMIT}

hidden_api_txt_checksorted_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
+13 −1
Original line number Diff line number Diff line
@@ -38,7 +38,9 @@ import java.util.Arrays;
 * Representation of a MAC address.
 *
 * This class only supports 48 bits long addresses and does not support 64 bits long addresses.
 * Instances of this class are immutable.
 * Instances of this class are immutable. This class provides implementations of hashCode()
 * and equals() that make it suitable for use as keys in standard implementations of
 * {@link java.util.Map}.
 */
public final class MacAddress implements Parcelable {

@@ -122,12 +124,22 @@ public final class MacAddress implements Parcelable {
    }

    /**
     * Convert this MacAddress to a byte array.
     *
     * The returned array is in network order. For example, if this MacAddress is 1:2:3:4:5:6,
     * the returned array is [1, 2, 3, 4, 5, 6].
     *
     * @return a byte array representation of this MacAddress.
     */
    public @NonNull byte[] toByteArray() {
        return byteAddrFromLongAddr(mAddr);
    }

    /**
     * Returns a human-readable representation of this MacAddress.
     * The exact format is implementation-dependent and should not be assumed to have any
     * particular format.
     */
    @Override
    public @NonNull String toString() {
        return stringAddrFromLongAddr(mAddr);
+5 −5
Original line number Diff line number Diff line
@@ -125,11 +125,11 @@ public final class ImeFocusController {
        final View viewForWindowFocus = focusedView != null ? focusedView : mViewRootImpl.mView;
        onViewFocusChanged(viewForWindowFocus, true);

        // Skip starting input when the next focused view is same as served view and the served
        // input connection still exists.
        // Starting new input when the next focused view is same as served view but the
        // editor is not aligned with the same editor or editor is inactive.
        final boolean nextFocusIsServedView = mServedView != null && mServedView == focusedView;
        if (nextFocusIsServedView && immDelegate.isAcceptingText()) {
            forceFocus = false;
        if (nextFocusIsServedView && !immDelegate.isSameEditorAndAcceptingText(focusedView)) {
            forceFocus = true;
        }

        immDelegate.startInputAsyncOnWindowFocusGain(viewForWindowFocus,
@@ -254,7 +254,7 @@ public final class ImeFocusController {
        void setCurrentRootView(ViewRootImpl rootView);
        boolean isCurrentRootView(ViewRootImpl rootView);
        boolean isRestartOnNextWindowFocus(boolean reset);
        boolean isAcceptingText();
        boolean isSameEditorAndAcceptingText(View view);
    }

    public View getServedView() {
+20 −6
Original line number Diff line number Diff line
@@ -737,7 +737,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            }
        }

        final boolean hasControl = mTmpControlArray.size() > 0;
        boolean requestedStateStale = false;
        final int[] showTypes = new int[1];
        final int[] hideTypes = new int[1];

@@ -754,9 +754,26 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
        // Ensure to create source consumers if not available yet.
        for (int i = mTmpControlArray.size() - 1; i >= 0; i--) {
            final InsetsSourceControl control = mTmpControlArray.valueAt(i);
            InsetsSourceConsumer consumer = getSourceConsumer(control.getType());
            final @InternalInsetsType int type = control.getType();
            final InsetsSourceConsumer consumer = getSourceConsumer(type);
            consumer.setControl(control, showTypes, hideTypes);

            if (!requestedStateStale) {
                final boolean requestedVisible = consumer.isRequestedVisible();

                // We might have changed our requested visibilities while we don't have the control,
                // so we need to update our requested state once we have control. Otherwise, our
                // requested state at the server side might be incorrect.
                final boolean requestedVisibilityChanged =
                        requestedVisible != mRequestedState.getSourceOrDefaultVisibility(type);

                // The IME client visibility will be reset by insets source provider while updating
                // control, so if IME is requested visible, we need to send the request to server.
                final boolean imeRequestedVisible = type == ITYPE_IME && requestedVisible;

                requestedStateStale = requestedVisibilityChanged || imeRequestedVisible;
            }

        }
        mTmpControlArray.clear();

@@ -772,10 +789,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
        if (hideTypes[0] != 0) {
            applyAnimation(hideTypes[0], false /* show */, false /* fromIme */);
        }
        if (hasControl && mRequestedState.hasSources()) {
            // We might have changed our requested visibilities while we don't have the control,
            // so we need to update our requested state once we have control. Otherwise, our
            // requested state at the server side might be incorrect.
        if (requestedStateStale) {
            updateRequestedState();
        }
    }
+20 −5
Original line number Diff line number Diff line
@@ -1824,13 +1824,19 @@ public final class ViewRootImpl implements ViewParent,
    /**
     * Called after window layout to update the bounds surface. If the surface insets have changed
     * or the surface has resized, update the bounds surface.
     *
     * @param shouldReparent Whether it should reparent the bounds layer to the main SurfaceControl.
     */
    private void updateBoundsLayer() {
    private void updateBoundsLayer(boolean shouldReparent) {
        if (mBoundsLayer != null) {
            setBoundsLayerCrop();
            mTransaction.deferTransactionUntil(mBoundsLayer,
                    getRenderSurfaceControl(), mSurface.getNextFrameNumber())
                    .apply();
            mTransaction.deferTransactionUntil(mBoundsLayer, getRenderSurfaceControl(),
                    mSurface.getNextFrameNumber());

            if (shouldReparent) {
                mTransaction.reparent(mBoundsLayer, getRenderSurfaceControl());
            }
            mTransaction.apply();
        }
    }

@@ -2912,7 +2918,16 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (surfaceSizeChanged || surfaceReplaced || surfaceCreated || windowAttributesChanged) {
            updateBoundsLayer();
            // If the surface has been replaced, there's a chance the bounds layer is not parented
            // to the new layer. When updating bounds layer, also reparent to the main VRI
            // SurfaceControl to ensure it's correctly placed in the hierarchy.
            //
            // This needs to be done on the client side since WMS won't reparent the children to the
            // new surface if it thinks the app is closing. WMS gets the signal that the app is
            // stopping, but on the client side it doesn't get stopped since it's restarted quick
            // enough. WMS doesn't want to keep around old children since they will leak when the
            // client creates new children.
            updateBoundsLayer(surfaceReplaced);
        }

        final boolean didLayout = layoutRequested && (!mStopped || mReportNextDraw);
Loading