Merge "Prevent merging transitions if we don't handle it" into main
diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
index 5134f3b..847088d 100644
--- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
@@ -151,7 +151,8 @@
context.getDeviceProfile().overviewPageSpacing,
QuickStepContract.getWindowCornerRadius(context),
AnimationUtils.loadInterpolator(
- context, android.R.interpolator.fast_out_extra_slow_in)));
+ context, android.R.interpolator.fast_out_extra_slow_in)),
+ "SlideInTransition");
if (mOnDesktop) {
UI_HELPER_EXECUTOR.execute(() ->
SystemUiProxy.INSTANCE.get(mKeyboardQuickSwitchView.getContext())
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index 567fad0..7cad57b 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -28,6 +28,7 @@
import android.view.Gravity
import android.view.InsetsFrameProvider
import android.view.InsetsFrameProvider.SOURCE_DISPLAY
+import android.view.InsetsSource.FLAG_ANIMATE_RESIZING
import android.view.InsetsSource.FLAG_INSETS_ROUNDED_CORNER
import android.view.InsetsSource.FLAG_SUPPRESS_SCRIM
import android.view.Surface
@@ -192,10 +193,14 @@
*/
private fun getProvidedInsets(insetsRoundedCornerFlag: Int): Array<InsetsFrameProvider> {
val navBarsFlag =
- (if (context.isGestureNav) FLAG_SUPPRESS_SCRIM else 0) or insetsRoundedCornerFlag
+ (if (context.isGestureNav) FLAG_SUPPRESS_SCRIM or FLAG_ANIMATE_RESIZING else 0) or
+ insetsRoundedCornerFlag
return arrayOf(
InsetsFrameProvider(insetsOwner, 0, navigationBars())
- .setFlags(navBarsFlag, FLAG_SUPPRESS_SCRIM or FLAG_INSETS_ROUNDED_CORNER),
+ .setFlags(
+ navBarsFlag,
+ FLAG_SUPPRESS_SCRIM or FLAG_ANIMATE_RESIZING or FLAG_INSETS_ROUNDED_CORNER
+ ),
InsetsFrameProvider(insetsOwner, 0, tappableElement()),
InsetsFrameProvider(insetsOwner, 0, mandatorySystemGestures()),
InsetsFrameProvider(insetsOwner, INDEX_LEFT, systemGestures())
diff --git a/quickstep/src/com/android/quickstep/util/SlideInRemoteTransition.kt b/quickstep/src/com/android/quickstep/util/SlideInRemoteTransition.kt
index 9f7b46d..1347291 100644
--- a/quickstep/src/com/android/quickstep/util/SlideInRemoteTransition.kt
+++ b/quickstep/src/com/android/quickstep/util/SlideInRemoteTransition.kt
@@ -46,12 +46,7 @@
mergeTarget: IBinder,
finishCB: IRemoteTransitionFinishedCallback
) {
-
- try {
- finishCB.onTransitionFinished(null, Transaction())
- } catch (e: RemoteException) {
- // Ignore
- }
+ // Do not report finish if we don't know how to handle this transition.
}
override fun startAnimation(
diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
index c9aad1a..e86b7d8 100644
--- a/quickstep/src/com/android/quickstep/views/TaskMenuView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
@@ -301,6 +301,7 @@
private void animateOpenOrClosed(boolean closing) {
if (mOpenCloseAnimator != null && mOpenCloseAnimator.isRunning()) {
+ testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE, "getting canceled");
mOpenCloseAnimator.cancel();
}
mOpenCloseAnimator = new AnimatorSet();
@@ -357,11 +358,14 @@
iconAppChip.getMenuTranslationX(),
MULTI_PROPERTY_VALUE, closing ? 0 : -additionalTranslationX);
menuTranslationXAnim.setInterpolator(EMPHASIZED);
+ testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE,
+ "TaskMenuView.java.animateOpenOrClosed: running translation animations");
mOpenCloseAnimator.playTogether(translationYAnim, translationXAnim,
menuTranslationXAnim, menuTranslationYAnim);
}
-
+ testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE,
+ "TaskMenuView.java.animateOpenOrClosed: running animation 2");
mOpenCloseAnimator.playTogether(mRevealAnimator,
ObjectAnimator.ofFloat(
mTaskContainer.getThumbnailView(), DIM_ALPHA,
@@ -379,6 +383,13 @@
}
@Override
+ public void onAnimationCancel(Animator animation) {
+ super.onAnimationCancel(animation);
+ testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE,
+ "TaskMenuView.java.animateOpenOrClosed: onAnimationCancel");
+ }
+
+ @Override
public void onAnimationSuccess(Animator animator) {
testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE,
"TaskMenuView.java.animateOpenOrClosed: onAnimationSuccess");
@@ -392,6 +403,7 @@
}
private void closeComplete() {
+ testLogD(TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE, "TaskMenuView.java.closeComplete");
mIsOpen = false;
mActivity.getDragLayer().removeView(this);
mRevealAnimator = null;
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index 23fc315..abd4ec4 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -861,7 +861,8 @@
@Nullable
public RunnableList launchTaskAnimated() {
if (mTask != null) {
- testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated");
+ testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
+ "TaskView.launchTaskAnimated: startActivityFromRecentsAsync");
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask);
ActivityOptionsWrapper opts = mActivity.getActivityLaunchOptions(this, null);
@@ -910,7 +911,8 @@
*/
public void launchTask(@NonNull Consumer<Boolean> callback, boolean isQuickswitch) {
if (mTask != null) {
- testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated");
+ testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
+ "TaskView.launchTask: startActivityFromRecentsAsync");
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask);
@@ -1004,6 +1006,8 @@
if (targets == null) {
// If the recents animation is cancelled somehow between the parent if block and
// here, try to launch the task as a non live tile task.
+ testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
+ "TaskView.java - launchTasks: recents animation is cancelled");
RunnableList runnableList = launchTaskAnimated();
if (runnableList == null) {
Log.e(TAG, "Recents animation cancelled and cannot launch task as non-live tile"
@@ -1024,6 +1028,8 @@
@Override
public void onAnimationEnd(Animator animator) {
if (mTask != null && mTask.key.displayId != getRootViewDisplayId()) {
+ testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
+ "TaskView.java - launchTasks: onAnimationEnd");
launchTaskAnimated();
}
mIsClickableAsLiveTile = true;
@@ -1043,6 +1049,9 @@
recentsView.onTaskLaunchedInLiveTileMode();
return runnableList;
} else {
+ testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS,
+ "TaskView.java - launchTasks: isRunningTask=" + isRunningTask() + "||"
+ + "remoteTargetHandles == null?" + (remoteTargetHandles == null));
return launchTaskAnimated();
}
}
diff --git a/res/drawable/ic_info_no_shadow.xml b/res/drawable/ic_info_no_shadow.xml
index 7c43779..29a81bd 100644
--- a/res/drawable/ic_info_no_shadow.xml
+++ b/res/drawable/ic_info_no_shadow.xml
@@ -18,7 +18,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="?android:attr/textColorPrimary">
+ android:tint="?attr/materialColorOnSurface">
<path
android:fillColor="@android:color/white"
diff --git a/res/drawable/ic_install_no_shadow.xml b/res/drawable/ic_install_no_shadow.xml
index eaad0de..6e0125a 100644
--- a/res/drawable/ic_install_no_shadow.xml
+++ b/res/drawable/ic_install_no_shadow.xml
@@ -18,7 +18,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="?android:attr/textColorPrimary">
+ android:tint="?attr/materialColorOnSurface">
<path
android:fillColor="@android:color/white"
diff --git a/res/drawable/ic_install_to_private.xml b/res/drawable/ic_install_to_private.xml
index 0e9833c..45723b0 100644
--- a/res/drawable/ic_install_to_private.xml
+++ b/res/drawable/ic_install_to_private.xml
@@ -20,7 +20,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="?android:attr/textColorPrimary">
+ android:tint="?attr/materialColorOnSurface">
<path
android:fillColor="@android:color/white"
diff --git a/res/drawable/ic_uninstall_no_shadow.xml b/res/drawable/ic_uninstall_no_shadow.xml
index fbabdd2..6200054 100644
--- a/res/drawable/ic_uninstall_no_shadow.xml
+++ b/res/drawable/ic_uninstall_no_shadow.xml
@@ -18,7 +18,7 @@
android:height="20dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?android:attr/textColorPrimary" >
+ android:tint="?attr/materialColorOnSurface" >
<path
android:fillColor="@android:color/white"
android:pathData="M15,4V3H9v1H4v2h1v13c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V6h1V4H15z M17,19H7V6h10V19z" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0fe9a9b..eb3441e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -449,6 +449,8 @@
<string name="work_profile_edu_work_apps">Work apps are badged and visible to your IT admin</string>
<!-- Action label to finish work profile edu-->
<string name="work_profile_edu_accept">Got it</string>
+ <!-- Info icon unicode for alpha scroller when work edu card is present -->
+ <string name="work_profile_edu_section" translatable="false">\u24D8</string>
<!--- heading shown when user opens work apps tab while work apps are paused -->
<string name="work_apps_paused_title">Work apps are paused</string>
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
index e07408a..81cfa86 100644
--- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
+++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
@@ -28,6 +28,7 @@
import androidx.recyclerview.widget.DiffUtil;
import com.android.launcher3.Flags;
+import com.android.launcher3.R;
import com.android.launcher3.allapps.BaseAllAppsAdapter.AdapterItem;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
@@ -272,6 +273,12 @@
addApps = mWorkProviderManager.shouldShowWorkApps();
}
if (addApps) {
+ if (/* education card was added */ position == 1) {
+ // Add work educard section with "info icon" at 0th position.
+ mFastScrollerSections.add(new FastScrollSectionInfo(
+ mActivityContext.getResources().getString(
+ R.string.work_profile_edu_section), 0));
+ }
position = addAppsWithSections(mApps, position);
}
if (Flags.enablePrivateSpace()) {
diff --git a/src/com/android/launcher3/allapps/WorkEduCard.java b/src/com/android/launcher3/allapps/WorkEduCard.java
index 1059097..5fe2f0c 100644
--- a/src/com/android/launcher3/allapps/WorkEduCard.java
+++ b/src/com/android/launcher3/allapps/WorkEduCard.java
@@ -103,6 +103,8 @@
AllAppsRecyclerView rv = mActivityContext.getAppsView().mAH.get(
ActivityAllAppsContainerView.AdapterHolder.WORK).mRecyclerView;
rv.getApps().getAdapterItems().remove(mPosition);
+ // Remove the educard fast scroll section.
+ rv.getApps().getFastScrollerSections().remove(0);
rv.getAdapter().notifyItemRemoved(mPosition);
}
}
diff --git a/tests/src/com/android/launcher3/secondarydisplay/TaplSecondaryDisplayLauncherTest.java b/tests/src/com/android/launcher3/secondarydisplay/TaplSecondaryDisplayLauncherTest.java
deleted file mode 100644
index d7b9638..0000000
--- a/tests/src/com/android/launcher3/secondarydisplay/TaplSecondaryDisplayLauncherTest.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3.secondarydisplay;
-
-import static android.content.Context.MODE_PRIVATE;
-import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
-import static android.view.MotionEvent.ACTION_DOWN;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.Intent;
-import android.graphics.Point;
-import android.os.SystemClock;
-import android.view.MotionEvent;
-import android.widget.TextView;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.LargeTest;
-import androidx.test.uiautomator.By;
-import androidx.test.uiautomator.UiObject2;
-import androidx.test.uiautomator.Until;
-
-import com.android.launcher3.tapl.LauncherInstrumentation;
-import com.android.launcher3.ui.AbstractLauncherUiTest;
-
-import org.junit.After;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Tests for {@link SecondaryDisplayLauncher}.
- * TODO (b/242776943): Remove anti-patterns & migrate prediction row tests to Quickstep directory
- */
-@LargeTest
-@RunWith(AndroidJUnit4.class)
-public final class TaplSecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
- private static final int WAIT_TIME_MS = 5000;
- private static final int LONG_PRESS_DURATION_MS = 1000;
- private static final int DRAG_TIME_MS = 160;
-
- private static final String PINNED_APPS_KEY = "pinned_apps";
-
- // Variables required to coordinate drag steps.
- private Point mStartPoint;
- private Point mEndPoint;
- private long mDownTime;
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- setDragNDropFlag(true);
- }
-
- @After
- public void tearDown() {
- mTargetContext.getSharedPreferences(PINNED_APPS_KEY, MODE_PRIVATE)
- .edit().clear().commit();
- }
-
- @Test
- @Ignore
- public void initializeSecondaryDisplayLauncher_allAppsButtonVisible() {
- assertThat(findObjectByResourceName("all_apps_button")).isNotNull();
- }
-
- @Test
- @Ignore
- public void allAppsButtonTap_opensAppDrawer() {
- openAppDrawer();
- assertThat(findObjectByResourceName("search_container_all_apps")).isNotNull();
- }
-
- @Test
- @Ignore("Launcher3 without quickstep doesn't have a predictions row.")
- public void appDrawerOpened_predictionRowAppDividerVisible() {
- openAppDrawer();
- assertThat(findObjectByResourceName("apps_divider_view")).isNotNull();
- }
-
- @Test
- @Ignore
- public void dragNDropDisabled_pinIconAddsToWorkspace() {
- setDragNDropFlag(false);
- openAppDrawer();
- UiObject2 app = findDescendantByResourceName(
- findObjectByResourceName("apps_list_view"), "icon");
- app.click(LONG_PRESS_DURATION_MS);
- UiObject2 popupContainer = findObjectByResourceName("popup_container");
- assertThat(popupContainer).isNotNull();
- UiObject2 pinIcon = findDescendantByTextOrDesc(popupContainer, "Add to home screen");
- assertThat(pinIcon).isNotNull();
- pinIcon.click();
- String appName = app.getContentDescription();
- assertThat(findAppInWorkspace(appName)).isNotNull();
- }
-
- @Test
- @Ignore
- public void pressBackFromAllApps_popupMenuOpen_returnsToWorkspace() {
- openAppDrawer();
- assertThat(findObjectByResourceName("search_container_all_apps")).isNotNull();
-
- findDescendantByResourceName(findObjectByResourceName("apps_list_view"), "icon")
- .click(LONG_PRESS_DURATION_MS);
- assertThat(findObjectByResourceName("popup_container")).isNotNull();
-
- // First back press should close only popup menu.
- mDevice.pressBack();
- assertThat(findObjectByResourceName("search_container_all_apps")).isNotNull();
- assertThat(findObjectByResourceName("popup_container")).isNull();
-
- // Second back press should close app drawer.
- mDevice.pressBack();
- assertThat(findObjectByResourceName("popup_container")).isNull();
- assertThat(findObjectByResourceName("search_container_all_apps")).isNull();
- }
-
- @Test
- @Ignore("Launcher3 without quickstep doesn't have a predictions row.")
- public void dragNDropFromPredictionsRow_pinToGrid() {
- openAppDrawer();
- assertThat(findObjectByResourceName("prediction_row")).isNotNull();
- String appName = startDragFromPredictionRow();
- moveAppToCenterOfScreen();
- dropApp();
-
- // Ensure app was added.
- assertThat(findAppInWorkspace(appName)).isNotNull();
- }
-
- @Test
- @Ignore
- public void dragNDropFromAppDrawer_pinToGrid() {
- openAppDrawer();
- String draggedAppName = startDragFromAllApps();
- moveAppToCenterOfScreen();
- dropApp();
-
- // Ensure app was added.
- assertThat(findAppInWorkspace(draggedAppName)).isNotNull();
- }
-
- @Test
- @Ignore
- public void tapRemoveButton_unpinApp() {
- openAppDrawer();
- String draggedAppName = startDragFromAllApps();
- moveAppToCenterOfScreen();
- dropApp();
- removeAppByName(draggedAppName);
- assertThat(findAppInWorkspace(draggedAppName)).isNull();
- }
-
- private void openAppDrawer() {
- UiObject2 allAppsButton = findObjectByResourceName("all_apps_button");
- assertThat(allAppsButton).isNotNull();
- allAppsButton.click();
- }
-
- private String startDragFromAllApps() {
- // Find app from app drawer.
- UiObject2 allApps = findObjectByResourceName("apps_list_view");
- assertThat(allApps).isNotNull();
- UiObject2 icon = findDescendantByResourceName(allApps, "icon");
- assertThat(icon).isNotNull();
- String appName = icon.getContentDescription();
-
- // Start drag action.
- mDownTime = SystemClock.uptimeMillis();
- mStartPoint = icon.getVisibleCenter();
- mEndPoint = new Point(mStartPoint.x, mStartPoint.y);
- mLauncher.sendPointer(mDownTime, mDownTime, ACTION_DOWN, mStartPoint,
- LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
- assertThat(findObjectByResourceName("popup_container")).isNotNull();
- return appName;
- }
-
- private String startDragFromPredictionRow() {
- // Find app from predictions.
- UiObject2 predictionRow = findObjectByResourceName("prediction_row");
- assertThat(predictionRow).isNotNull();
-
- UiObject2 icon = findDescendantByResourceName(predictionRow, "icon");
- assertThat(icon).isNotNull();
-
- String appName = icon.getContentDescription();
- UiObject2 app = findDescendantByAppName(predictionRow, appName);
- assertThat(app).isNotNull();
-
- // Start drag action.
- mDownTime = SystemClock.uptimeMillis();
- mStartPoint = icon.getVisibleCenter();
- mEndPoint = new Point(mStartPoint.x, mStartPoint.y);
- mLauncher.sendPointer(mDownTime, mDownTime, ACTION_DOWN, mStartPoint,
- LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
- assertThat(findObjectByResourceName("popup_container")).isNotNull();
- return appName;
- }
-
- private void moveAppToCenterOfScreen() {
- mEndPoint.set(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() / 2);
- mLauncher.movePointer(mDownTime, SystemClock.uptimeMillis(), DRAG_TIME_MS, true,
- mStartPoint, mEndPoint, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
- }
-
- private void dropApp() {
- mLauncher.sendPointer(mDownTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP,
- mEndPoint, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
- }
-
- private void removeAppByName(String appName) {
- // Find app within home screen.
- UiObject2 app = findDescendantByAppName(findObjectByResourceName("workspace_grid"),
- appName);
- if (app == null) return;
-
- // Open app's popup container.
- app.click(LONG_PRESS_DURATION_MS);
- UiObject2 popupContainer = findObjectByResourceName("popup_container");
- assertThat(popupContainer).isNotNull();
-
- // Grab & click remove button.
- UiObject2 removeButton = findDescendantByTextOrDesc(popupContainer, "Remove");
- assertThat(removeButton).isNotNull();
- removeButton.click();
- }
-
- private UiObject2 findAppInWorkspace(String appName) {
- UiObject2 workspace = findObjectByResourceName("workspace_grid");
- return findDescendantByAppName(workspace, appName);
- }
-
- private UiObject2 findObjectByResourceName(String resourceName) {
- return mDevice.wait(Until.findObject(By.res(mTargetPackage, resourceName)), WAIT_TIME_MS);
- }
-
- private UiObject2 findDescendantByResourceName(UiObject2 outerObject,
- String resourceName) {
- assertThat(outerObject).isNotNull();
- return outerObject.findObject(By.res(mTargetPackage, resourceName));
- }
-
- private UiObject2 findDescendantByAppName(UiObject2 outerObject, String appName) {
- assertThat(outerObject).isNotNull();
- return outerObject.findObject(By.clazz(TextView.class).text(appName)
- .pkg(mDevice.getLauncherPackageName()));
- }
-
- private UiObject2 findDescendantByTextOrDesc(UiObject2 outerObject, String content) {
- assertThat(outerObject).isNotNull();
- UiObject2 innerObject = outerObject.findObject(By.desc(content));
- if (innerObject == null) innerObject = outerObject.findObject(By.text(content));
- return innerObject;
- }
-
- private void startSecondaryDisplayActivity() {
- mTargetContext.startActivity((
- new Intent(mTargetContext, SecondaryDisplayLauncher.class).addFlags(
- FLAG_ACTIVITY_NEW_TASK)));
- }
-
- private void setDragNDropFlag(Boolean status) {
- startSecondaryDisplayActivity();
- }
-}