Remove redundant margin update, which caused infinite layout loop.

Fixes: 186217151
Fixes: 183970366
Test: altered build to always show feedback icons, then exhaustively tested conversation notifications.
Change-Id: I19a1428d7fcda35efc3d15b198c5b8d04a30d869
This commit is contained in:
Jeff DeCew
2021-06-03 10:40:16 -04:00
parent 0def72662f
commit e0fb0e6162

View File

@@ -150,7 +150,6 @@ public class ConversationLayout extends FrameLayout
private Icon mShortcutIcon;
private View mAppNameDivider;
private TouchDelegateComposite mTouchDelegate = new TouchDelegateComposite(this);
private int mNotificationHeaderSeparatingMargin;
public ConversationLayout(@NonNull Context context) {
super(context);
@@ -284,8 +283,6 @@ public class ConversationLayout extends FrameLayout
mAppName.setOnVisibilityChangedListener((visibility) -> {
onAppNameVisibilityChanged();
});
mNotificationHeaderSeparatingMargin = getResources().getDimensionPixelSize(
R.dimen.notification_header_separating_margin);
}
@RemotableViewMethod
@@ -1031,7 +1028,6 @@ public class ConversationLayout extends FrameLayout
}
mTouchDelegate.clear();
if (mFeedbackIcon.getVisibility() == VISIBLE) {
updateFeedbackIconMargins();
float width = Math.max(mMinTouchSize, mFeedbackIcon.getWidth());
float height = Math.max(mMinTouchSize, mFeedbackIcon.getHeight());
final Rect feedbackTouchRect = new Rect();
@@ -1057,12 +1053,6 @@ public class ConversationLayout extends FrameLayout
}
}
private void updateFeedbackIconMargins() {
MarginLayoutParams lp = (MarginLayoutParams) mFeedbackIcon.getLayoutParams();
lp.setMarginStart(mNotificationHeaderSeparatingMargin);
mFeedbackIcon.setLayoutParams(lp);
}
public MessagingLinearLayout getMessagingLinearLayout() {
return mMessagingLinearLayout;
}