diff options
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/cyanogenmod/tests/profiles/unit/ProfileManagerTest.java | 4 | ||||
-rw-r--r-- | tests/src/org/cyanogenmod/tests/profiles/unit/ProfileTest.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileManagerTest.java b/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileManagerTest.java index 37338b0..d044150 100644 --- a/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileManagerTest.java +++ b/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileManagerTest.java @@ -18,6 +18,7 @@ package org.cyanogenmod.tests.profiles.unit; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; +import cyanogenmod.app.CMContextConstants; import cyanogenmod.app.ProfileManager; import cyanogenmod.app.IProfileManager; import cyanogenmod.providers.CMSettings; @@ -32,6 +33,9 @@ public class ProfileManagerTest extends AndroidTestCase { protected void setUp() throws Exception { super.setUp(); mProfileManager = ProfileManager.getInstance(mContext); + // Only run this if we support profiles service + org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature( + CMContextConstants.Features.PROFILES)); } @SmallTest diff --git a/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileTest.java b/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileTest.java index f48b805..38ba56e 100644 --- a/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileTest.java +++ b/tests/src/org/cyanogenmod/tests/profiles/unit/ProfileTest.java @@ -23,6 +23,7 @@ import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; +import cyanogenmod.app.CMContextConstants; import cyanogenmod.app.Profile; import cyanogenmod.profiles.AirplaneModeSettings; import cyanogenmod.profiles.BrightnessSettings; @@ -39,6 +40,9 @@ public class ProfileTest extends AndroidTestCase { @Override protected void setUp() throws Exception { super.setUp(); + // Only run this if we support profiles service + org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature( + CMContextConstants.Features.PROFILES)); } @MediumTest |