Merge "Fixed a crash when the heads up content view was null" into nyc-dev

am: 841e4946bf

* commit '841e4946bf3f6cbbc4a84d849de675f1d6296a02':
  Fixed a crash when the heads up content view was null

Change-Id: I7bfb0889584b971ff8fe0e7e2193fc146e0ebd9b
This commit is contained in:
Selim Cinek
2016-04-22 03:40:32 +00:00
committed by android-build-merger

View File

@@ -834,10 +834,14 @@ public class NotificationContentView extends FrameLayout {
public void updateExpandButtons(boolean expandable) {
mExpandable = expandable;
// if the expanded child has the same height as the collapsed one we hide it.
if (mExpandedChild != null && mExpandedChild.getHeight() != 0 &&
((mIsHeadsUp && mExpandedChild.getHeight() == mHeadsUpChild.getHeight()) ||
(!mIsHeadsUp && mExpandedChild.getHeight() == mContractedChild.getHeight()))) {
expandable = false;
if (mExpandedChild != null && mExpandedChild.getHeight() != 0) {
if ((!mIsHeadsUp || mHeadsUpChild == null)) {
if (mExpandedChild.getHeight() == mContractedChild.getHeight()) {
expandable = false;
}
} else if (mExpandedChild.getHeight() == mHeadsUpChild.getHeight()) {
expandable = false;
}
}
if (mExpandedChild != null) {
mExpandedWrapper.updateExpandability(expandable, mExpandClickListener);