Skip to content

Commit

Permalink
Merge "Remove redundant margin update, which caused infinite layout l…
Browse files Browse the repository at this point in the history
…oop." into sc-dev
  • Loading branch information
Jeff DeCew authored and Android (Google) Code Review committed Jun 3, 2021
2 parents 80efce1 + e0fb0e6 commit a39cdd1
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/java/com/android/internal/widget/ConversationLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -284,8 +283,6 @@ protected void onFinishInflate() {
mAppName.setOnVisibilityChangedListener((visibility) -> {
onAppNameVisibilityChanged();
});
mNotificationHeaderSeparatingMargin = getResources().getDimensionPixelSize(
R.dimen.notification_header_separating_margin);
}

@RemotableViewMethod
Expand Down Expand Up @@ -1031,7 +1028,6 @@ public boolean onPreDraw() {
}
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();
Expand All @@ -1057,12 +1053,6 @@ private void getRelativeTouchRect(Rect touchRect, View view) {
}
}

private void updateFeedbackIconMargins() {
MarginLayoutParams lp = (MarginLayoutParams) mFeedbackIcon.getLayoutParams();
lp.setMarginStart(mNotificationHeaderSeparatingMargin);
mFeedbackIcon.setLayoutParams(lp);
}

public MessagingLinearLayout getMessagingLinearLayout() {
return mMessagingLinearLayout;
}
Expand Down

0 comments on commit a39cdd1

Please sign in to comment.