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

Commit 76d1466d authored by Adam Powell's avatar Adam Powell
Browse files

Fix bad casts in action bars

Not all DecorToolbars are themselves views. Use the interface
passthrough instead.

Bug 15335176

Change-Id: I88f1701822406d4204d344aef855a4a707e4c7ab
parent 2d2e30ee
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -588,7 +588,7 @@ public class WindowDecorActionBar extends ActionBar implements
            return;
        }

        final FragmentTransaction trans = ((View) mDecorToolbar).isInEditMode() ? null :
        final FragmentTransaction trans = mDecorToolbar.getViewGroup().isInEditMode() ? null :
                mActivity.getFragmentManager().beginTransaction().disallowAddToBackStack();

        if (mSelectedTab == tab) {
@@ -847,7 +847,7 @@ public class WindowDecorActionBar extends ActionBar implements
        mDecorToolbar.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
        mContextView.animateToVisibility(toActionMode ? View.VISIBLE : View.GONE);
        if (mTabScrollView != null && !mDecorToolbar.hasEmbeddedTabs() &&
                isCollapsed((View) mDecorToolbar)) {
                isCollapsed(mDecorToolbar.getViewGroup())) {
            mTabScrollView.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
        }
    }
@@ -959,7 +959,7 @@ public class WindowDecorActionBar extends ActionBar implements

            // Clear out the context mode views after the animation finishes
            mContextView.closeMode();
            ((View) mDecorToolbar).sendAccessibilityEvent(
            mDecorToolbar.getViewGroup().sendAccessibilityEvent(
                    AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
            mOverlayLayout.setHideOnContentScrollEnabled(mHideOnContentScroll);