mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Quick for for broken OOP tests
Change-Id: I1009381a58ca28b3ef922f1c6bb872f811f88716
This commit is contained in:
@@ -111,25 +111,27 @@ public abstract class AbstractLauncherUiTest {
|
||||
mLauncher = new LauncherInstrumentation(instrumentation);
|
||||
|
||||
// b/130558787; b/131419978
|
||||
try {
|
||||
Class systemProps = Class.forName("android.os.SystemProperties");
|
||||
Method getInt = systemProps.getMethod("getInt", String.class, int.class);
|
||||
int apiLevel = (int) getInt.invoke(null, "ro.product.first_api_level", 0);
|
||||
if (TestHelpers.isInLauncherProcess()) {
|
||||
try {
|
||||
Class systemProps = Class.forName("android.os.SystemProperties");
|
||||
Method getInt = systemProps.getMethod("getInt", String.class, int.class);
|
||||
int apiLevel = (int) getInt.invoke(null, "ro.product.first_api_level", 0);
|
||||
|
||||
if (apiLevel >= Build.VERSION_CODES.P) {
|
||||
setActiveOverlay(NAV_BAR_MODE_GESTURAL_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.ZERO_BUTTON);
|
||||
if (apiLevel >= Build.VERSION_CODES.P) {
|
||||
setActiveOverlay(NAV_BAR_MODE_GESTURAL_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.ZERO_BUTTON);
|
||||
}
|
||||
if (apiLevel >= Build.VERSION_CODES.O && apiLevel < Build.VERSION_CODES.P) {
|
||||
setActiveOverlay(NAV_BAR_MODE_2BUTTON_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.TWO_BUTTON);
|
||||
}
|
||||
if (apiLevel < Build.VERSION_CODES.O) {
|
||||
setActiveOverlay(NAV_BAR_MODE_3BUTTON_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.THREE_BUTTON);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (apiLevel >= Build.VERSION_CODES.O && apiLevel < Build.VERSION_CODES.P) {
|
||||
setActiveOverlay(NAV_BAR_MODE_2BUTTON_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.TWO_BUTTON);
|
||||
}
|
||||
if (apiLevel < Build.VERSION_CODES.O) {
|
||||
setActiveOverlay(NAV_BAR_MODE_3BUTTON_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.THREE_BUTTON);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user