Merge "Fix a crash when setting vertical gear location and content view null" into nyc-dev

am: 6e3a90d

* commit '6e3a90d9b7789b04121a6b773175b97e165ba702':
  Fix a crash when setting vertical gear location and content view null

Change-Id: I75552b157f19b958d52e58ce00920623173d1fb2
This commit is contained in:
Mady Mellor
2016-04-26 19:46:09 +00:00
committed by android-build-merger
2 changed files with 3 additions and 1 deletions

View File

@@ -1123,6 +1123,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
updateMaxHeights();
if (mSettingsIconRow != null) {
mSettingsIconRow.updateVerticalLocation();
}
}
private void updateMaxHeights() {

View File

@@ -244,7 +244,6 @@ public class NotificationSettingsIconRow extends FrameLayout implements View.OnC
}
public void setIconLocation(boolean onLeft) {
updateVerticalLocation();
if ((mIconPlaced && onLeft == mOnLeft) || mSnapping || mParent == null
|| mGearIcon.getWidth() == 0) {
// Do nothing