diff options
author | Adam Powell <adamp@google.com> | 2014-05-30 10:28:14 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2014-05-30 10:34:40 -0700 |
commit | 76d1466dfcdfbeb80dac64b9ec210c61b0b08574 (patch) | |
tree | 277e40178f0863d8369a75d29e887d3e89273472 /core/java | |
parent | 2d2e30eeac5b6799808c23b944f29d68ed0c205d (diff) | |
download | frameworks_base-76d1466dfcdfbeb80dac64b9ec210c61b0b08574.zip frameworks_base-76d1466dfcdfbeb80dac64b9ec210c61b0b08574.tar.gz frameworks_base-76d1466dfcdfbeb80dac64b9ec210c61b0b08574.tar.bz2 |
Fix bad casts in action bars
Not all DecorToolbars are themselves views. Use the interface
passthrough instead.
Bug 15335176
Change-Id: I88f1701822406d4204d344aef855a4a707e4c7ab
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/com/android/internal/app/WindowDecorActionBar.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java index 5c7a4e6..c0b5b97 100644 --- a/core/java/com/android/internal/app/WindowDecorActionBar.java +++ b/core/java/com/android/internal/app/WindowDecorActionBar.java @@ -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); |