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

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

Merge cherrypicks of [6831382, 6831345, 6829733] into qt-release

Change-Id: I182571105ffd482a98478df5169086c07ebbace8
parents f5f1a2e7 53f4e0c9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
  -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sysui="http://schemas.android.com/apk/res-auto"
    android:id="@+id/volume_dialog_container"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
@@ -116,16 +117,17 @@
            android:clipToPadding="false"
            android:translationZ="@dimen/volume_dialog_elevation"
            android:background="@drawable/rounded_bg_full">
            <com.android.keyguard.AlphaOptimizedImageButton
            <com.android.systemui.volume.CaptionsToggleImageButton
                android:id="@+id/odi_captions_icon"
                android:src="@drawable/ic_volume_odi_captions_disabled"
                style="@style/VolumeButtons"
                android:background="@drawable/rounded_ripple"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:tint="@color/accent_tint_color_selector"
                android:tint="@color/caption_tint_color_selector"
                android:layout_gravity="center"
                android:soundEffectsEnabled="false" />
                android:soundEffectsEnabled="false"
                sysui:optedOut="false"/>
        </FrameLayout>

        <ViewStub
+11 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.wm;

import static android.view.Display.INVALID_DISPLAY;

import static com.android.server.wm.BarControllerProto.STATE;
import static com.android.server.wm.BarControllerProto.TRANSIENT_STATE;

@@ -90,6 +92,12 @@ public class BarController {
        mWin = win;
    }

    /** @return The display id of {@link #mWin}. It is used to be called from {@link #mHandler}. */
    int getDisplayId() {
        final WindowState win = mWin;
        return win != null ? win.getDisplayId() : INVALID_DISPLAY;
    }

    /**
     * Sets the frame within which the bar will display its content.
     *
@@ -228,8 +236,9 @@ public class BarController {
                @Override
                public void run() {
                    StatusBarManagerInternal statusbar = getStatusBarInternal();
                    if (statusbar != null) {
                        statusbar.setWindowState(mWin.getDisplayId(), mStatusBarManagerId, state);
                    int displayId = getDisplayId();
                    if (statusbar != null && displayId != INVALID_DISPLAY) {
                        statusbar.setWindowState(displayId, mStatusBarManagerId, state);
                    }
                }
            });
+13 −8
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.wm;

import static android.view.Display.INVALID_DISPLAY;
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static android.view.WindowManager.LayoutParams.MATCH_PARENT;

@@ -36,22 +37,25 @@ public class StatusBarController extends BarController {

        private Runnable mAppTransitionPending = () -> {
            StatusBarManagerInternal statusBar = getStatusBarInternal();
            if (statusBar != null && mWin != null) {
                statusBar.appTransitionPending(mWin.getDisplayId());
            int displayId = getDisplayId();
            if (statusBar != null && displayId != INVALID_DISPLAY) {
                statusBar.appTransitionPending(displayId);
            }
        };

        private Runnable mAppTransitionCancelled = () -> {
            StatusBarManagerInternal statusBar = getStatusBarInternal();
            if (statusBar != null && mWin != null) {
                statusBar.appTransitionCancelled(mWin.getDisplayId());
            int displayId = getDisplayId();
            if (statusBar != null && displayId != INVALID_DISPLAY) {
                statusBar.appTransitionCancelled(displayId);
            }
        };

        private Runnable mAppTransitionFinished = () -> {
            StatusBarManagerInternal statusBar = getStatusBarInternal();
            if (statusBar != null && mWin != null) {
                statusBar.appTransitionFinished(mWin.getDisplayId());
            int displayId = getDisplayId();
            if (statusBar != null && displayId != INVALID_DISPLAY) {
                statusBar.appTransitionFinished(displayId);
            }
        };

@@ -65,8 +69,9 @@ public class StatusBarController extends BarController {
                long statusBarAnimationStartTime, long statusBarAnimationDuration) {
            mHandler.post(() -> {
                StatusBarManagerInternal statusBar = getStatusBarInternal();
                if (statusBar != null && mWin != null) {
                    statusBar.appTransitionStarting(mWin.getDisplayId(),
                int displayId = getDisplayId();
                if (statusBar != null && displayId != INVALID_DISPLAY) {
                    statusBar.appTransitionStarting(displayId,
                            statusBarAnimationStartTime, statusBarAnimationDuration);
                }
            });