diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-03-25 12:37:26 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2016-03-25 14:14:14 -0700 |
commit | 279ce42664be4a958e01dd41fecefbe36eaa5074 (patch) | |
tree | 115d30726290d53d449aeaadf144308c08019199 /tests/src | |
parent | ccdb292eecc53c1343eaae0f4e0e9342326bad16 (diff) | |
download | vendor_cmsdk-279ce42664be4a958e01dd41fecefbe36eaa5074.zip vendor_cmsdk-279ce42664be4a958e01dd41fecefbe36eaa5074.tar.gz vendor_cmsdk-279ce42664be4a958e01dd41fecefbe36eaa5074.tar.bz2 |
cmsdk: Mandate performance 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: I50f5993ff9c5107fdeaa9a5aa95377235eb3ac02
TICKET: CYNGNOS-2294
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java b/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java index 7b00a5c..7bc3430 100644 --- a/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java +++ b/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java @@ -17,6 +17,8 @@ package org.cyanogenmod.tests.power.unit; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; + +import cyanogenmod.app.CMContextConstants; import cyanogenmod.power.IPerformanceManager; import cyanogenmod.power.PerformanceManager; @@ -34,6 +36,9 @@ public class PerfomanceManagerTest extends AndroidTestCase { @Override protected void setUp() throws Exception { super.setUp(); + // Only run this if we support performance abstraction + org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature( + CMContextConstants.Features.PERFORMANCE)); mCMPerformanceManager = PerformanceManager.getInstance(mContext); // Save the perf profile for later restore. mSavedPerfProfile = mCMPerformanceManager.getPowerProfile(); |