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

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

Snap for 9406096 from 6dca005e to tm-qpr2-release

Change-Id: If559ae520c5fbfb7ff0f42980130c782afb819d0
parents f9c7953c 6dca005e
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -36,6 +36,21 @@ import java.util.Objects;
 */
public final class HotwordAudioStream implements Parcelable {

    /**
     * Key for int value to be read from {@link #getMetadata()}. The value is read by the system and
     * is the length (in bytes) of the byte buffers created to copy bytes in the
     * {@link #getAudioStreamParcelFileDescriptor()} written by the {@link HotwordDetectionService}.
     * The buffer length should be chosen such that no additional latency is introduced. Typically,
     * this should be <em>at least</em> the size of byte chunks written by the
     * {@link HotwordDetectionService}.
     *
     * <p>If no value specified in the metadata for the buffer length, or if the value is less than
     * 1, or if it is greater than 65,536, or if it is not an int, the default value of 2,560 will
     * be used.</p>
     */
    public static final String KEY_AUDIO_STREAM_COPY_BUFFER_LENGTH_BYTES =
            "android.service.voice.key.AUDIO_STREAM_COPY_BUFFER_LENGTH_BYTES";

    /**
     * The {@link AudioFormat} of the audio stream.
     */
+40 −38
Original line number Diff line number Diff line
@@ -3799,9 +3799,45 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (mAdded) {
            profileRendering(hasWindowFocus);
            dispatchFocusEvent(hasWindowFocus);

            // Note: must be done after the focus change callbacks,
            // so all of the view state is set up correctly.
            mImeFocusController.onPostWindowFocus(
                    getFocusedViewOrNull(), hasWindowFocus, mWindowAttributes);

            if (hasWindowFocus) {
                if (mAttachInfo.mThreadedRenderer != null && mSurface.isValid()) {
                // Clear the forward bit.  We can just do this directly, since
                // the window manager doesn't care about it.
                mWindowAttributes.softInputMode &=
                        ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
                ((WindowManager.LayoutParams) mView.getLayoutParams())
                        .softInputMode &=
                        ~WindowManager.LayoutParams
                                .SOFT_INPUT_IS_FORWARD_NAVIGATION;

                // Refocusing a window that has a focused view should fire a
                // focus event for the view since the global focused view changed.
                fireAccessibilityFocusEventIfHasFocusedNode();
            } else {
                if (mPointerCapture) {
                    handlePointerCaptureChanged(false);
                }
            }
        }
        mFirstInputStage.onWindowFocusChanged(hasWindowFocus);

        // NOTE: there's no view visibility (appeared / disapparead) events when the windows focus
        // is lost, so we don't need to to force a flush - there might be other events such as
        // text changes, but these should be flushed independently.
        if (hasWindowFocus) {
            handleContentCaptureFlush();
        }
    }

    private void dispatchFocusEvent(boolean hasWindowFocus) {
        profileRendering(hasWindowFocus);
        if (hasWindowFocus && mAttachInfo.mThreadedRenderer != null && mSurface.isValid()) {
            mFullRedrawNeeded = true;
            try {
                final Rect surfaceInsets = mWindowAttributes.surfaceInsets;
@@ -3823,7 +3859,6 @@ public final class ViewRootImpl implements ViewParent,
                return;
            }
        }
            }

        mAttachInfo.mHasWindowFocus = hasWindowFocus;
        mImeFocusController.updateImeFocusable(mWindowAttributes, true /* force */);
@@ -3837,39 +3872,6 @@ public final class ViewRootImpl implements ViewParent,
                mAttachInfo.mTooltipHost.hideTooltip();
            }
        }

            // Note: must be done after the focus change callbacks,
            // so all of the view state is set up correctly.
            mImeFocusController.onPostWindowFocus(
                    getFocusedViewOrNull(), hasWindowFocus, mWindowAttributes);

            if (hasWindowFocus) {
                // Clear the forward bit.  We can just do this directly, since
                // the window manager doesn't care about it.
                mWindowAttributes.softInputMode &=
                        ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
                ((WindowManager.LayoutParams) mView.getLayoutParams())
                        .softInputMode &=
                        ~WindowManager.LayoutParams
                                .SOFT_INPUT_IS_FORWARD_NAVIGATION;

                // Refocusing a window that has a focused view should fire a
                // focus event for the view since the global focused view changed.
                fireAccessibilityFocusEventIfHasFocusedNode();
            } else {
                if (mPointerCapture) {
                    handlePointerCaptureChanged(false);
                }
            }
        }
        mFirstInputStage.onWindowFocusChanged(hasWindowFocus);

        // NOTE: there's no view visibility (appeared / disapparead) events when the windows focus
        // is lost, so we don't need to to force a flush - there might be other events such as
        // text changes, but these should be flushed independently.
        if (hasWindowFocus) {
            handleContentCaptureFlush();
        }
    }

    private void handleWindowTouchModeChanged() {
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@

    /**
     * Called when a voice session window is shown/hidden.
     * Caution that there could be duplicated visibility change callbacks, it's up to the listener
     * to dedup those events.
     */
    void onVoiceSessionWindowVisibilityChanged(boolean visible);

+4 −0
Original line number Diff line number Diff line
@@ -5300,6 +5300,10 @@
    <!-- Whether using split screen aspect ratio as a default aspect ratio for unresizable apps. -->
    <bool name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled">false</bool>

    <!-- Whether the specific behaviour for translucent activities letterboxing is enabled.
         TODO(b/255532890) Enable when ignoreOrientationRequest is set -->
    <bool name="config_letterboxIsEnabledForTranslucentActivities">false</bool>

    <!-- Whether a camera compat controller is enabled to allow the user to apply or revert
         treatment for stretched issues in camera viewfinder. -->
    <bool name="config_isCameraCompatControlForStretchedIssuesEnabled">false</bool>
+3 −0
Original line number Diff line number Diff line
@@ -4401,6 +4401,9 @@
  <!-- Set to true to make assistant show in front of the dream/screensaver. -->
  <java-symbol type="bool" name="config_assistantOnTopOfDream"/>

  <!-- Set to true to enable letterboxing on translucent activities. -->
  <java-symbol type="bool" name="config_letterboxIsEnabledForTranslucentActivities" />

  <java-symbol type="string" name="config_overrideComponentUiPackage" />

  <java-symbol type="string" name="notification_channel_network_status" />
Loading