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

Commit 6192b07b authored by Adam Powell's avatar Adam Powell
Browse files

Treat empty string as title-set in ToolbarWidgetWrapper

If a developer explicitly sets the empty string as the title of a
Toolbar that is used as an action bar via Activity#setActionBar, don't
overwrite it with the window title. This clears up a nonintuitive
behavior when explicitly clearing the title of a toolbar.

Bug 17510951

Change-Id: I183c2ca57d3bd16ae1f89bb7daa2cdf086189138
parent 025207b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {

        mTitle = toolbar.getTitle();
        mSubtitle = toolbar.getSubtitle();
        mTitleSet = !TextUtils.isEmpty(mTitle);
        mTitleSet = mTitle != null;

        if (style) {
            final TypedArray a = toolbar.getContext().obtainStyledAttributes(null,