mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Fix LauncherInstrumentationTestCase#openAllApps() method.
b/29535532 Change-Id: Iebf20c2fe66ad244b04658b15ade21d579fb2c12
This commit is contained in:
@@ -28,6 +28,7 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.compat.AppWidgetManagerCompat;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.util.ManagedProfileHeuristic;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
@@ -101,8 +102,14 @@ public class LauncherInstrumentationTestCase extends InstrumentationTestCase {
|
||||
* Opens all apps and returns the recycler view
|
||||
*/
|
||||
protected UiObject2 openAllApps() {
|
||||
mDevice.wait(Until.findObject(
|
||||
By.desc(mTargetContext.getString(R.string.all_apps_button_label))), DEFAULT_UI_TIMEOUT).click();
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
|
||||
// clicking on the page indicator brings up all apps tray on non tablets.
|
||||
findViewById(R.id.page_indicator).click();
|
||||
} else {
|
||||
mDevice.wait(Until.findObject(
|
||||
By.desc(mTargetContext.getString(R.string.all_apps_button_label))),
|
||||
DEFAULT_UI_TIMEOUT).click();
|
||||
}
|
||||
return findViewById(R.id.apps_list_view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user