Merge "Fix close and back buttons in caption proto 1." into tm-qpr-dev am: 16ac8f216e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21486865

Change-Id: Ida957a4f906e07d8b187d81f5a1f79f860d83920
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Matt Sziklay
2023-02-21 15:59:23 +00:00
committed by Automerger Merge Worker

View File

@@ -213,6 +213,12 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
final View handle = caption.findViewById(R.id.caption_handle);
handle.setOnTouchListener(mOnCaptionTouchListener);
handle.setOnClickListener(mOnCaptionButtonClickListener);
if (DesktopModeStatus.isProto1Enabled()) {
final View back = caption.findViewById(R.id.back_button);
back.setOnClickListener(mOnCaptionButtonClickListener);
final View close = caption.findViewById(R.id.close_window);
close.setOnClickListener(mOnCaptionButtonClickListener);
}
updateButtonVisibility();
}
@@ -319,6 +325,14 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
final View handle = caption.findViewById(R.id.caption_handle);
final Drawable handleBackground = handle.getBackground();
handleBackground.setTintList(buttonTintColor);
if (DesktopModeStatus.isProto1Enabled()) {
final View back = caption.findViewById(R.id.back_button);
final Drawable backBackground = back.getBackground();
backBackground.setTintList(buttonTintColor);
final View close = caption.findViewById(R.id.close_window);
final Drawable closeBackground = close.getBackground();
closeBackground.setTintList(buttonTintColor);
}
}
private void closeDragResizeListener() {