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

Commit 24c2a7e7 authored by Yigit Boyar's avatar Yigit Boyar
Browse files

Don't wipe out explicit Toolbar nav icon when calling setSupportActionBar

Bug: 18440924
Change-Id: I7221532d003fd0208cf91a5ffd9be24a7695bd3d
parent fb11949d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
        mTitle = toolbar.getTitle();
        mSubtitle = toolbar.getSubtitle();
        mTitleSet = mTitle != null;
        mNavIcon = mToolbar.getNavigationIcon();
        final TypedArray a = toolbar.getContext().obtainStyledAttributes(null,
                R.styleable.ActionBar, R.attr.actionBarStyle, 0);
        mDefaultNavigationIcon = a.getDrawable(R.styleable.ActionBar_homeAsUpIndicator);
@@ -120,7 +121,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
            if (icon != null) {
                setIcon(icon);
            }
            if (mDefaultNavigationIcon != null) {
            if (mNavIcon == null && mDefaultNavigationIcon != null) {
                setNavigationIcon(mDefaultNavigationIcon);
            }
            setDisplayOptions(a.getInt(R.styleable.ActionBar_displayOptions, 0));