perf: Moving PerformanceManager to CMSDK

 * Devices will need to update their configurations!

Change-Id: I22cf4ec96656b98f515cf28fef95443cf6adb397
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
index b33887a..25625c2 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -44,15 +44,6 @@
     <string name="config_mms_user_agent">CyanogenMod</string>
     <string name="config_mms_user_agent_profile_url">http://www.google.com/oha/rdf/ua-profile-kila.xml</string>
 
-    <!-- Automatic power profile management per app.
-         Each item should list the fully-qualified activity
-         name and the power profile id, separated by a comma. -->
-    <string-array name="config_auto_perf_activities" translatable="false">
-        <item>com.aurorasoftworks.quadrant.*BenchmarkExecutionActivity,2</item>
-        <item>com.antutu.ABenchMark.*,2</item>
-        <item>.*com.antutu.benchmark.*,2</item>
-    </string-array>
-
     <!-- Defines the default set of global actions. Actions may still be disabled or hidden based
          on the current state of the device. -->
     <string-array translatable="false" name="config_globalActionsList">
@@ -73,5 +64,6 @@
         <item>org.cyanogenmod.platform.internal.CMTelephonyManagerService</item>
         <item>org.cyanogenmod.platform.internal.CMHardwareService</item>
         <item>org.cyanogenmod.platform.internal.AppSuggestManagerService</item>
+        <item>org.cyanogenmod.platform.internal.PerformanceManagerService</item>
     </string-array>
 </resources>
diff --git a/overlay/common/vendor/cmsdk/cm/res/res/values/config.xml b/overlay/common/vendor/cmsdk/cm/res/res/values/config.xml
new file mode 100644
index 0000000..c4d3378
--- /dev/null
+++ b/overlay/common/vendor/cmsdk/cm/res/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2013 The CyanogenMod Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Automatic power profile management per app.
+         Each item should list the fully-qualified activity
+         name and the power profile id, separated by a comma. -->
+    <string-array name="config_auto_perf_activities" translatable="false">
+        <item>com.aurorasoftworks.quadrant.*BenchmarkExecutionActivity,2</item>
+        <item>com.antutu.ABenchMark.*,2</item>
+        <item>.*com.antutu.benchmark.*,2</item>
+    </string-array>
+</resources>
diff --git a/sepolicy/service.te b/sepolicy/service.te
index 8a7a425..579e2b8 100644
--- a/sepolicy/service.te
+++ b/sepolicy/service.te
@@ -8,3 +8,4 @@
 type cm_telephony_service, system_api_service, system_server_service, service_manager_type;
 type cm_hardware_service, system_api_service, system_server_service, service_manager_type;
 type cm_app_suggest_service, system_api_service, system_server_service, service_manager_type;
+type cm_performance_service, system_api_service, system_server_service, service_manager_type;
diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts
index 324b13d..4baf0f8 100644
--- a/sepolicy/service_contexts
+++ b/sepolicy/service_contexts
@@ -8,3 +8,4 @@
 cmtelephonymanager                        u:object_r:cm_telephony_service:s0
 cmhardware                                u:object_r:cm_hardware_service:s0
 cmappsuggest                              u:object_r:cm_app_suggest_service:s0
+cmperformance                             u:object_r:cm_performance_service:s0