Loading core/java/android/window/TaskOrganizer.java +9 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,15 @@ public class TaskOrganizer extends WindowOrganizer { } } /** * Gets the executor to run callbacks on. * @hide */ @NonNull public Executor getExecutor() { return mExecutor; } private final ITaskOrganizer mInterface = new ITaskOrganizer.Stub() { @Override public void addStartingWindow(ActivityManager.RunningTaskInfo taskInfo, IBinder appToken) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java +1 −5 Original line number Diff line number Diff line Loading @@ -87,16 +87,12 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, super(context, null, 0, 0, true /* disableBackgroundLayer */); mTaskOrganizer = organizer; mExecutor = organizer.getExecutor(); setUseAlpha(); getHolder().addCallback(this); mGuard.open("release"); } // TODO: Use TaskOrganizer executor when part of wmshell proper public void setExecutor(Executor executor) { mExecutor = executor; } /** * Only one listener may be set on the view, throws an exception otherwise. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +0 −6 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.internal.policy.ScreenDecorationsUtils; import com.android.wm.shell.R; import com.android.wm.shell.TaskView; import com.android.wm.shell.common.AlphaOptimizedButton; import com.android.wm.shell.common.HandlerExecutor; import com.android.wm.shell.common.TriangleShape; import java.io.FileDescriptor; Loading Loading @@ -304,11 +303,6 @@ public class BubbleExpandedView extends LinearLayout { setLayoutDirection(LAYOUT_DIRECTION_LOCALE); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); mTaskView.setExecutor(new HandlerExecutor(getHandler())); } /** * Initialize {@link BubbleController} and {@link BubbleStackView} here, this method must need * to be called after view inflate. Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/TaskViewTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.ActivityManager; import android.app.ActivityOptions; Loading Loading @@ -96,8 +97,8 @@ public class TaskViewTest extends ShellTestCase { return null; }).when(mExecutor).execute(any()); when(mOrganizer.getExecutor()).thenReturn(mExecutor); mTaskView = new TaskView(mContext, mOrganizer); mTaskView.setExecutor(mExecutor); mTaskView.setListener(mViewListener); } Loading @@ -111,7 +112,6 @@ public class TaskViewTest extends ShellTestCase { @Test public void testSetPendingListener_throwsException() { TaskView taskView = new TaskView(mContext, mOrganizer); mTaskView.setExecutor(mExecutor); taskView.setListener(mViewListener); try { taskView.setListener(mViewListener); Loading Loading
core/java/android/window/TaskOrganizer.java +9 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,15 @@ public class TaskOrganizer extends WindowOrganizer { } } /** * Gets the executor to run callbacks on. * @hide */ @NonNull public Executor getExecutor() { return mExecutor; } private final ITaskOrganizer mInterface = new ITaskOrganizer.Stub() { @Override public void addStartingWindow(ActivityManager.RunningTaskInfo taskInfo, IBinder appToken) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java +1 −5 Original line number Diff line number Diff line Loading @@ -87,16 +87,12 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, super(context, null, 0, 0, true /* disableBackgroundLayer */); mTaskOrganizer = organizer; mExecutor = organizer.getExecutor(); setUseAlpha(); getHolder().addCallback(this); mGuard.open("release"); } // TODO: Use TaskOrganizer executor when part of wmshell proper public void setExecutor(Executor executor) { mExecutor = executor; } /** * Only one listener may be set on the view, throws an exception otherwise. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +0 −6 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import com.android.internal.policy.ScreenDecorationsUtils; import com.android.wm.shell.R; import com.android.wm.shell.TaskView; import com.android.wm.shell.common.AlphaOptimizedButton; import com.android.wm.shell.common.HandlerExecutor; import com.android.wm.shell.common.TriangleShape; import java.io.FileDescriptor; Loading Loading @@ -304,11 +303,6 @@ public class BubbleExpandedView extends LinearLayout { setLayoutDirection(LAYOUT_DIRECTION_LOCALE); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); mTaskView.setExecutor(new HandlerExecutor(getHandler())); } /** * Initialize {@link BubbleController} and {@link BubbleStackView} here, this method must need * to be called after view inflate. Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/TaskViewTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.ActivityManager; import android.app.ActivityOptions; Loading Loading @@ -96,8 +97,8 @@ public class TaskViewTest extends ShellTestCase { return null; }).when(mExecutor).execute(any()); when(mOrganizer.getExecutor()).thenReturn(mExecutor); mTaskView = new TaskView(mContext, mOrganizer); mTaskView.setExecutor(mExecutor); mTaskView.setListener(mViewListener); } Loading @@ -111,7 +112,6 @@ public class TaskViewTest extends ShellTestCase { @Test public void testSetPendingListener_throwsException() { TaskView taskView = new TaskView(mContext, mOrganizer); mTaskView.setExecutor(mExecutor); taskView.setListener(mViewListener); try { taskView.setListener(mViewListener); Loading