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

Commit 84d65852 authored by shaoweishen's avatar shaoweishen
Browse files

[Output Switcher] Set title on window

set window title in dialog to prevent Talkback announce "System UI"(app
name) when dialog pop up.

Test: verify on device
Bug: 204946806
Change-Id: I595c92139e21cb4dce9376e9b34e3333df972f43
parent 9c557cdf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
        MediaOutputController.Callback, Window.Callback {

    private static final String TAG = "MediaOutputDialog";
    private static final String EMPTY_TITLE = " ";

    private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper());
    private final RecyclerView.LayoutManager mLayoutManager;
@@ -109,6 +110,9 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
        lp.setFitInsetsIgnoringVisibility(true);
        window.setAttributes(lp);
        window.setContentView(mDialogView);
        // Sets window to a blank string to avoid talkback announce app label first when pop up,
        // which doesn't make sense.
        window.setTitle(EMPTY_TITLE);

        mHeaderTitle = mDialogView.requireViewById(R.id.header_title);
        mHeaderSubtitle = mDialogView.requireViewById(R.id.header_subtitle);