Skip testAppWidgetConfigNoBalBypass test on auto builds
As Android auto settings doesn't have appwidget bind feature, we should
skip the test.
Bug: 228910564
Test: testAppWidgetConfigNoBalBypass pass on auto build
Change-Id: I9013017e883ca0d51a9ed8247a01d7cc5b229329
diff --git a/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/BackgroundActivityLaunchTest.java b/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/BackgroundActivityLaunchTest.java
index fa3f4ac..ce82131 100644
--- a/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/BackgroundActivityLaunchTest.java
+++ b/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/BackgroundActivityLaunchTest.java
@@ -90,6 +90,7 @@
import com.android.compatibility.common.util.AppOpsUtils;
import org.junit.After;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -711,6 +712,9 @@
}
private void clickAllowBindWidget(ResultReceiver resultReceiver) throws Exception {
+ // Test on non-auto devices only as auto doesn't support appwidget bind.
+ Assume.assumeFalse(mContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_AUTOMOTIVE));
// Create appWidgetId so we can send it to appA, to request bind widget and start config
// activity.
UiDevice device = UiDevice.getInstance(mInstrumentation);