aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/org
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-03-25 12:43:22 -0700
committerAdnan Begovic <adnan@cyngn.com>2016-03-25 14:16:35 -0700
commitb271dcf279d0818c01c080827141a1ac311250c2 (patch)
treea88aa74f2277294e6b3104ab99d395931d04f119 /tests/src/org
parent279ce42664be4a958e01dd41fecefbe36eaa5074 (diff)
downloadvendor_cmsdk-b271dcf279d0818c01c080827141a1ac311250c2.zip
vendor_cmsdk-b271dcf279d0818c01c080827141a1ac311250c2.tar.gz
vendor_cmsdk-b271dcf279d0818c01c080827141a1ac311250c2.tar.bz2
cmsdk: Mandate partner feature xml's for service implementation.
The feature xml plays two roles: 1) To allow sdk interface (constructor) to throw when system service is unavailable. This allows for clearer platform development debugging. 2) To allow for simpler disambiguation of what services to instrument in a modular environment. Change-Id: Ic980225df9c115e97f7147cf043cf92bbb225f01 TICKET: CYNGNOS-2293
Diffstat (limited to 'tests/src/org')
-rw-r--r--tests/src/org/cyanogenmod/tests/settings/unit/CMPartnerInterfaceTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/src/org/cyanogenmod/tests/settings/unit/CMPartnerInterfaceTest.java b/tests/src/org/cyanogenmod/tests/settings/unit/CMPartnerInterfaceTest.java
index ec28d0a..c1ac0de 100644
--- a/tests/src/org/cyanogenmod/tests/settings/unit/CMPartnerInterfaceTest.java
+++ b/tests/src/org/cyanogenmod/tests/settings/unit/CMPartnerInterfaceTest.java
@@ -29,6 +29,8 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.provider.Settings;
import android.text.format.DateUtils;
import android.util.Log;
+
+import cyanogenmod.app.CMContextConstants;
import cyanogenmod.app.PartnerInterface;
import java.util.List;
@@ -45,6 +47,9 @@ public class CMPartnerInterfaceTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
+ // Only run this if we support partner interfaces
+ org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
+ CMContextConstants.Features.PARTNER));
mPartnerInterface = PartnerInterface.getInstance(getContext());
setupAirplaneModeTests();