diff options
| author | 2025-02-07 15:55:11 -0800 | |
|---|---|---|
| committer | 2025-02-07 17:04:23 -0800 | |
| commit | 19cae5d0c17eb96de7e4c14a770474f61fcf735f (patch) | |
| tree | f5f2542985a915dc345f88167f75a258c6f82315 | |
| parent | 88ba951650f2e4145db95971b0aeb8ea60f0ea64 (diff) | |
Move the constructor of BubbleTaskViewListener above the listener impl
Also adds some java doc to the class.
Flag: EXEMPT moving code around
Test: treehugger
Bug: 272102927
Change-Id: I05ad1f20da71e83620781a0d6ecb393834f2dd66
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java index 55180b704e7d..a38debb702dc 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java @@ -40,6 +40,11 @@ import com.android.internal.protolog.ProtoLog; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.taskview.TaskView; +/** + * A listener that works with task views for bubbles, manages launching the appropriate + * content into the task view from the bubble and sends updates of task view events back to + * the parent view via {@link BubbleTaskViewListener.Callback}. + */ public class BubbleTaskViewListener implements TaskView.Listener { private static final String TAG = BubbleTaskViewListener.class.getSimpleName(); @@ -75,6 +80,20 @@ public class BubbleTaskViewListener implements TaskView.Listener { private boolean mInitialized = false; private boolean mDestroyed = false; + public BubbleTaskViewListener(Context context, BubbleTaskView bubbleTaskView, View parentView, + BubbleExpandedViewManager manager, BubbleTaskViewListener.Callback callback) { + mContext = context; + mTaskView = bubbleTaskView.getTaskView(); + mParentView = parentView; + mExpandedViewManager = manager; + mCallback = callback; + bubbleTaskView.setDelegateListener(this); + if (bubbleTaskView.isCreated()) { + mTaskId = bubbleTaskView.getTaskId(); + callback.onTaskCreated(); + } + } + @Override public void onInitialized() { ProtoLog.d(WM_SHELL_BUBBLES, "onInitialized: destroyed=%b initialized=%b bubble=%s", @@ -207,20 +226,6 @@ public class BubbleTaskViewListener implements TaskView.Listener { } } - public BubbleTaskViewListener(Context context, BubbleTaskView bubbleTaskView, View parentView, - BubbleExpandedViewManager manager, BubbleTaskViewListener.Callback callback) { - mContext = context; - mTaskView = bubbleTaskView.getTaskView(); - mParentView = parentView; - mExpandedViewManager = manager; - mCallback = callback; - bubbleTaskView.setDelegateListener(this); - if (bubbleTaskView.isCreated()) { - mTaskId = bubbleTaskView.getTaskId(); - callback.onTaskCreated(); - } - } - /** * Sets the bubble or updates the bubble used to populate the view. * |