Loading quickstep/src/com/android/quickstep/views/TaskMenuView.java +11 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; Loading Loading @@ -280,4 +281,14 @@ public class TaskMenuView extends AbstractFloatingView { Rect toRect = new Rect(0, 0, getWidth(), getHeight()); return new RoundedRectRevealOutlineProvider(radius, radius, fromRect, toRect); } public View findMenuItemByText(String text) { for (int i = mOptionLayout.getChildCount() - 1; i >= 0; --i) { final ViewGroup menuOptionView = (ViewGroup) mOptionLayout.getChildAt(i); if (text.equals(menuOptionView.<TextView>findViewById(R.id.text).getText())) { return menuOptionView; } } return null; } } quickstep/src/com/android/quickstep/views/TaskView.java +4 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,10 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mDigitalWellBeingToast = findViewById(R.id.digital_well_being_toast); } public TaskMenuView getMenuView() { return mMenuView; } /** * Updates this task view to the given {@param task}. */ Loading tests/src/com/android/launcher3/util/TestUtil.java +7 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import java.io.IOException; import java.io.InputStream; public class TestUtil { public static final String DUMMY_PACKAGE = "com.example.android.aardwolf"; public static void installDummyApp() throws IOException { // Copy apk from resources to a local file and install from there. final Resources resources = getContext().getResources(); Loading @@ -48,4 +50,9 @@ public class TestUtil { UiDevice.getInstance(getInstrumentation()).executeShellCommand("pm install " + apkFilename); } public static void uninstallDummyApp() throws IOException { UiDevice.getInstance(getInstrumentation()).executeShellCommand( "pm uninstall " + DUMMY_PACKAGE); } } Loading
quickstep/src/com/android/quickstep/views/TaskMenuView.java +11 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.Gravity; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; Loading Loading @@ -280,4 +281,14 @@ public class TaskMenuView extends AbstractFloatingView { Rect toRect = new Rect(0, 0, getWidth(), getHeight()); return new RoundedRectRevealOutlineProvider(radius, radius, fromRect, toRect); } public View findMenuItemByText(String text) { for (int i = mOptionLayout.getChildCount() - 1; i >= 0; --i) { final ViewGroup menuOptionView = (ViewGroup) mOptionLayout.getChildAt(i); if (text.equals(menuOptionView.<TextView>findViewById(R.id.text).getText())) { return menuOptionView; } } return null; } }
quickstep/src/com/android/quickstep/views/TaskView.java +4 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,10 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mDigitalWellBeingToast = findViewById(R.id.digital_well_being_toast); } public TaskMenuView getMenuView() { return mMenuView; } /** * Updates this task view to the given {@param task}. */ Loading
tests/src/com/android/launcher3/util/TestUtil.java +7 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import java.io.IOException; import java.io.InputStream; public class TestUtil { public static final String DUMMY_PACKAGE = "com.example.android.aardwolf"; public static void installDummyApp() throws IOException { // Copy apk from resources to a local file and install from there. final Resources resources = getContext().getResources(); Loading @@ -48,4 +50,9 @@ public class TestUtil { UiDevice.getInstance(getInstrumentation()).executeShellCommand("pm install " + apkFilename); } public static void uninstallDummyApp() throws IOException { UiDevice.getInstance(getInstrumentation()).executeShellCommand( "pm uninstall " + DUMMY_PACKAGE); } }