Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleTaskViewListenerTest.kt +10 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.protolog.ProtoLog import com.android.window.flags.Flags.FLAG_DISALLOW_BUBBLE_TO_ENTER_PIP import com.android.window.flags.Flags.FLAG_EXCLUDE_TASK_FROM_RECENTS import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_ANYTHING import com.android.wm.shell.Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE import com.android.wm.shell.R import com.android.wm.shell.ShellTaskOrganizer import com.android.wm.shell.bubbles.Bubbles.BubbleMetadataFlagListener Loading Loading @@ -531,6 +532,15 @@ class BubbleTaskViewListenerTest { verify(listenerCallback).onTaskRemovalStarted() } @EnableFlags(FLAG_ENABLE_CREATE_ANY_BUBBLE) @Test fun onTaskInfoChanged() { getInstrumentation().runOnMainSync { bubbleTaskViewListener.onTaskInfoChanged(taskInfo) } verify(listenerCallback).onTaskInfoChanged(taskInfo) } @Test fun onBackPressedOnTaskRoot_expanded() { val taskId = 123 Loading libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ <string name="forced_resizable_secondary_display">App may not work on a secondary display.</string> <!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. --> <string name="activity_launch_on_secondary_display_failed_text">App does not support launch on secondary displays.</string> <!-- Warning message when we try to bubble a task in an unsupported environment [CHAR LIMIT=NONE] --> <string name="bubble_not_supported_text">App does not support bubble</string> <!-- Accessibility label and window tile for the divider that separates the windows in split screen mode [CHAR LIMIT=NONE] --> <string name="accessibility_divider">Split screen divider</string> Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +6 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.wm.shell.shared.TypefaceUtils.setTypeface; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.ComponentName; Loading Loading @@ -517,6 +518,11 @@ public class BubbleExpandedView extends LinearLayout { public void onTaskRemovalStarted() { // nothing to do / handled in listener. } @Override public void onTaskInfoChanged(RunningTaskInfo taskInfo) { // nothing to do / handled in listener. } }); } else { mCurrentTaskViewListener = mTaskViewListener; Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.bubbles import android.app.ActivityManager.RunningTaskInfo import android.app.ActivityTaskManager.INVALID_TASK_ID import android.content.ComponentName import androidx.annotation.VisibleForTesting Loading Loading @@ -88,6 +89,10 @@ class BubbleTaskView(val taskView: TaskView, executor: Executor) { delegateListener?.onTaskRemovalStarted(taskId) } override fun onTaskInfoChanged(taskInfo: RunningTaskInfo?) { delegateListener?.onTaskInfoChanged(taskInfo) } override fun onBackPressedOnTaskRoot(taskId: Int) { delegateListener?.onBackPressedOnTaskRoot(taskId) } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java +10 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,9 @@ public class BubbleTaskViewListener implements TaskView.Listener { /** Called when task removal has started. */ void onTaskRemovalStarted(); /** Called when the task's info has changed. */ void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo); } private final Context mContext; Loading Loading @@ -263,6 +266,13 @@ public class BubbleTaskViewListener implements TaskView.Listener { mCallback.onTaskRemovalStarted(); } @Override public void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo) { if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) { mCallback.onTaskInfoChanged(taskInfo); } } @Override public void onBackPressedOnTaskRoot(int taskId) { if (mTaskId == taskId && mExpandedViewManager.isStackExpanded()) { Loading Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleTaskViewListenerTest.kt +10 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.protolog.ProtoLog import com.android.window.flags.Flags.FLAG_DISALLOW_BUBBLE_TO_ENTER_PIP import com.android.window.flags.Flags.FLAG_EXCLUDE_TASK_FROM_RECENTS import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_ANYTHING import com.android.wm.shell.Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE import com.android.wm.shell.R import com.android.wm.shell.ShellTaskOrganizer import com.android.wm.shell.bubbles.Bubbles.BubbleMetadataFlagListener Loading Loading @@ -531,6 +532,15 @@ class BubbleTaskViewListenerTest { verify(listenerCallback).onTaskRemovalStarted() } @EnableFlags(FLAG_ENABLE_CREATE_ANY_BUBBLE) @Test fun onTaskInfoChanged() { getInstrumentation().runOnMainSync { bubbleTaskViewListener.onTaskInfoChanged(taskInfo) } verify(listenerCallback).onTaskInfoChanged(taskInfo) } @Test fun onBackPressedOnTaskRoot_expanded() { val taskId = 123 Loading
libs/WindowManager/Shell/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ <string name="forced_resizable_secondary_display">App may not work on a secondary display.</string> <!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. --> <string name="activity_launch_on_secondary_display_failed_text">App does not support launch on secondary displays.</string> <!-- Warning message when we try to bubble a task in an unsupported environment [CHAR LIMIT=NONE] --> <string name="bubble_not_supported_text">App does not support bubble</string> <!-- Accessibility label and window tile for the divider that separates the windows in split screen mode [CHAR LIMIT=NONE] --> <string name="accessibility_divider">Split screen divider</string> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +6 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.wm.shell.shared.TypefaceUtils.setTypeface; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.ComponentName; Loading Loading @@ -517,6 +518,11 @@ public class BubbleExpandedView extends LinearLayout { public void onTaskRemovalStarted() { // nothing to do / handled in listener. } @Override public void onTaskInfoChanged(RunningTaskInfo taskInfo) { // nothing to do / handled in listener. } }); } else { mCurrentTaskViewListener = mTaskViewListener; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.bubbles import android.app.ActivityManager.RunningTaskInfo import android.app.ActivityTaskManager.INVALID_TASK_ID import android.content.ComponentName import androidx.annotation.VisibleForTesting Loading Loading @@ -88,6 +89,10 @@ class BubbleTaskView(val taskView: TaskView, executor: Executor) { delegateListener?.onTaskRemovalStarted(taskId) } override fun onTaskInfoChanged(taskInfo: RunningTaskInfo?) { delegateListener?.onTaskInfoChanged(taskInfo) } override fun onBackPressedOnTaskRoot(taskId: Int) { delegateListener?.onBackPressedOnTaskRoot(taskId) } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewListener.java +10 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,9 @@ public class BubbleTaskViewListener implements TaskView.Listener { /** Called when task removal has started. */ void onTaskRemovalStarted(); /** Called when the task's info has changed. */ void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo); } private final Context mContext; Loading Loading @@ -263,6 +266,13 @@ public class BubbleTaskViewListener implements TaskView.Listener { mCallback.onTaskRemovalStarted(); } @Override public void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo) { if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) { mCallback.onTaskInfoChanged(taskInfo); } } @Override public void onBackPressedOnTaskRoot(int taskId) { if (mTaskId == taskId && mExpandedViewManager.isStackExpanded()) { Loading