diff --git a/CONTRIBUTORS.mkdn b/CONTRIBUTORS.mkdn
index 4c677091..b7ff7338 100644
--- a/CONTRIBUTORS.mkdn
+++ b/CONTRIBUTORS.mkdn
@@ -18,6 +18,8 @@ Maintainers (CyanogenMod 13.0):
* __Asus EeePad Transformer Pad TF701T:__ pershoot
* __Asus Zenfone 2 ZE550ML (Z008):__ crpalmer, jrior001
* __Asus Zenfone 2 ZE551ML (Z00A):__ crpalmer, jrior001
+* __Asus Zenfone 2 ZE550KL (Z00L):__ LuK1337, luca020400
+* __Asus Zenfone 2 ZE551KL/ZD551KL (Z00T):__ LuK1337, luca020400
* __B&N NookColor (encore):__ eyeballer, fattire, keyodi, krylon360, sluo (NookieDevs)
* __B&N Nook Tablet (acclaim):__ chrmhoffmann
* __Google Android One:__ varunchitre15
@@ -49,6 +51,8 @@ Maintainers (CyanogenMod 13.0):
* __HTC One X:__ gorbi16, mdeejay, tbalden, Thömy
* __HTC One X+:__ Lloir, tombriden
* __HTC One XL:__ h8rift, intervigil, jrior001
+* __Huawei Ascend Mate 2:__ mdmower, u-ra
+* __Huawei Honor 4/4X (cherry):__ dianlujitao, surdupetru, desalesouche
* __LG G2 (AT&T) (D800):__ arcee, Rashed97, Shelnutt2
* __LG G2 (T-Mobile) (D801):__ arcee, Rashed97, Shelnutt2
* __LG G2 (International) (D802):__ arcee, Rashed97, Shelnutt2
@@ -60,13 +64,14 @@ Maintainers (CyanogenMod 13.0):
* __LG G3 (Canada) (D852):__ cuzz1369
* __LG G3 (International) (D855):__ finnq
* __LG G3 (Korea) (F400):__ TheNoFace
-* __LG G3 (Sprint) (LS990):__
+* __LG G3 (Sprint) (LS990):__ Kasual
* __LG G3 (Verizon) (VS985):__ invisiblek
* __LG G4 (T-Mobile) (H811):__ codeworkx, genesixxbf3
* __LG G4 (International) (H815):__ codeworkx, genesixxbf3
* __LG Optimus LTE (P930) / LG Nitro HD {P935):__ arcee
* __LG Optimus LTE (SK Telecom) (SU640):__ arcee
-* __Moto E 2014 (xt1021,xt1022,xt1023/condor):__ percy_g2, scritch007, ashwin007
+* __LG V10 (T-Mobile) (H901):__ genesixxbf3
+* __Moto E 2014 (xt1021,xt1022,xt1023/condor):__
* __Moto G 2014 (xt1063,xt1064,xt1068,xt1069/titan):__ LuK1337, luca020400
* __Moto G 4G (xt1039,xt1040,xt1042,xt1045/peregrine):__ somcom3x, intervigil
* __Moto G 4G 2014 (xt1072,xt1077,xt1078,xt1079/thea):__ LuK1337, luca020400
@@ -89,6 +94,7 @@ Maintainers (CyanogenMod 13.0):
* __Motorola Xoom 3G (UMTS):__ bazar, SteadyHawkin, TDR (Team Rogue)
* __Motorola Xoom 4G LTE (Verizon):__ bazar, SteadyHawkin, TDR (Team Rogue)
* __OnePlus One:__ cyanogen, intervigil, inwotep, arcee
+* __OnePlus X:__ ashwin007, MasterAwesome
* __Oppo Find 5:__ intervigil, nebkat, raymanfx
* __Oppo Find 7:__ intervigil, tdm, inwotep, mikeioannina
* __Oppo N1:__ raymanfx
@@ -101,10 +107,10 @@ Maintainers (CyanogenMod 13.0):
* __Samsung Fascinate / Mesmerize (SCH-I500):__ jt1134, sbrissen
* __Samsung Galaxy Note (GT-N7000):__ Espenfjo
* __Samsung Galaxy Note II (GT-N7100):__ nebkat
-* __Samsung Galaxy Note II LTE (AT&T) (SGH-I317):__ cyanogen
-* __Samsung Galaxy Note II LTE (Verizon) (SCH-I605):__ sbrissen
-* __Samsung Galaxy Note II LTE (Sprint) (SPH-L900):__ sbrissen
-* __Samsung Galaxy Note II LTE (USCC) (SCH-R950):__ sbrissen
+* __Samsung Galaxy Note II LTE (AT&T) (SGH-I317):__ cyanogen, rogersb11
+* __Samsung Galaxy Note II LTE (Verizon) (SCH-I605):__ sbrissen, rogersb11
+* __Samsung Galaxy Note II LTE (Sprint) (SPH-L900):__ sbrissen, rogersb11
+* __Samsung Galaxy Note II LTE (USCC) (SCH-R950):__ sbrissen, rogersb11
* __Samsung Galaxy Note III (hlte):__ cyanogen, noobnl, slayher
* __Samsung Galaxy Note IV Exynos (trelte):__ raymanfx
* __Samsung Galaxy Note IV Exynos (trhplte):__ raymanfx
@@ -122,6 +128,7 @@ Maintainers (CyanogenMod 13.0):
* __Samsung Galaxy S II (T-Mobile) (SGH-T989):__ mikeyman77
* __Samsung Galaxy S II (AT&T) (SGH-I727):__ topprospect
* __Samsung Galaxy S III (AT&T) (SGH-I747):__ nardholio
+* __Samsung Galaxy S III (intl) (GT-I9300):__ forkbomb
* __Samsung Galaxy S III (Sprint) (SPH-L710):__ noobnl
* __Samsung Galaxy S III (Verizon) (SCH-I535):__ invisiblek
* __Samsung Galaxy S III LTE (GT-I9305):__ mcampbellsmith
@@ -169,6 +176,7 @@ Maintainers (CyanogenMod 13.0):
* __Sony Z Ultra GPE (togari_gpe):__ FreeXperia Team
* __Xiaomi Mi2(s) (aries):__ Michael Zimmermann
* __Xiaomi Mi3/4 (cancro):__ JoeyRizzoli
+* __ZTE Nubia Z9 Max (nx510j):__ dianlujitao
FreeXperia Team:
-------------------
diff --git a/ambientsdk/Android.mk b/ambientsdk/Android.mk
new file mode 100644
index 00000000..56ea1f46
--- /dev/null
+++ b/ambientsdk/Android.mk
@@ -0,0 +1,27 @@
+# Copyright (C) 2016 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.
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ambientsdk
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_UNINSTALLABLE_MODULE := true
+
+LOCAL_MAVEN_REPO := https://repo1.maven.org/maven2
+LOCAL_MAVEN_GROUP := com.cyngn.ambient
+LOCAL_MAVEN_ARTIFACT := ambientsdk
+LOCAL_MAVEN_VERSION := 1.4.0
+LOCAL_MAVEN_PACKAGING := aar
+
+include $(BUILD_MAVEN_PREBUILT)
diff --git a/build/core/apicheck_msg_current.txt b/build/core/apicheck_msg_current.txt
new file mode 100644
index 00000000..f58858eb
--- /dev/null
+++ b/build/core/apicheck_msg_current.txt
@@ -0,0 +1,143 @@
+
+******************************
+You have tried to change the API from what has been previously approved.
+
+To make these errors go away, you have two choices:
+ 1) You can add "@hide" javadoc comments to the methods, etc. listed in the
+ errors above.
+
+ 2) You can update current.txt by executing the following command:
+ make update-cm-api
+
+ ^^^^^^^^^^^^^^^^^^
+ CONGRATS YOU EARNED A STINKEYE FROM CID!
+
+
+ . ``
+ `+++++ ;++++'
+ +++++++ ;++++++'
+ ++++++++, ++++++++
+ +++++++++ :++++++++`
+ +++++++++ +++++++++`
+ ++++++++++ +++++++++
+ +++++++++ ++++++++++
+ +++++++++: +++++++++
+ :+++++++++ ;+++++++++
+ +++++++++` +++++++++,
+ ++++++++++ `+++++++++
+ +++++++++ ++++++++++
+ +++++++++; +++++++++
+ ,+++++++++ '+++++++++
+ +++++++++. +++++++++,
+ '+++++++++ .+++++++++
+ +++++++++ +++++++++'
+ +++++++++' +++++++++
+ .+++++++++ '+++++++++
+ +++++++++, +++++++++.
+ ;+++++++++ ,+++++++++
+ +++++++++ +++++++++;
+ ++++++++++ .,;;+++++++++++++++++++++++++++++++++;,,. +++++++++
+ `+++++++++ ,;++++++++++++++++++++++++++++++++++++++++++++++++++++++++',` ++++++++++
+ +++++++++, :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++;. +++++++++`
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++:
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ :+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++;
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++`
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++`
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ `+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'. ,+++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' .++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' `++++++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;++++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' +++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++; ++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++; +++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;+++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++` +++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++.
+ ++++++++++++++++++ .,;+++++++++++++++++++++++++++++++++++++++++++++++++++++ .+++++++++++++.
+ ++++++++++++++++++ .,;++++++++++++++++++++++++++++++++++++++: +++++++++++++.
+ ++++++++++++++++++ .,+++++++++++++++++++++++++ +++++++++++++.
+ +++++++++++++++++. +++++++++++++++++++++++++ ,++++++++++++.
+ +++++++++++++++++ ;++++++++++++++++++++++++ ++++++++++++.
+ +++++++++++++++++ ,+++++++++++++++++++++++; ++++++++++++.
+ +++++++++++++++++ .+++++++++++++++++++++++, ++++++++++++.
+ +++++++++++++++++ .+++++++++++++++++++++++, ++++++++++++.
+ +++++++++++++++++ .+++++++++++++++++++++++, ++++++++++++.
+ +++++++++++++++++ :+++++++++++++++++++++++; ++++++++++++.
+ +++++++++++++++++` +++++++++++++++++++++++++ ++++++++++++.
+ +++++++++++++++++; +++++++++++++++++++++++++ ++++++++++++.
+ ++++++++++++++++++ +++++++++++++++++++++++++ ;++++++++++++.
+ ++++++++++++++++++ ,+++++++++++++++++++++++++ +++++++++++++.
+ ++++++++++++++++++: ++++++++++++++++++++++++++' +++++++++++++.
+ +++++++++++++++++++ +++++++++++++++++++++++++++ ;+++++++++++++.
+ +++++++++++++++++++, ++++++++++++++++++++++++++++, ++++++++++++++.
+ ++++++++++++++++++++ +++++++++++++++++++++++++++++ ;++++++++++++++.
+ ++++++++++++++++++++' ++++++++++++++++++++++++++++++' +++++++++++++++.
+ +++++++++++++++++++++, ++++++++++++++++++++++++++++++++ ++++++++++++++++.
+ ++++++++++++++++++++++ ;+++++++++++++++++++++++++++++++++ '++++++++++++++++.
+ +++++++++++++++++++++++ ;+++++++++++++++++++++++++++++++++++ :+++++++++++++++++.
+ ++++++++++++++++++++++++, '+++++++++++++++++++++++++++++++++++++ ;++++++++++++++++++.
+ +++++++++++++++++++++++++' ++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++.
+ +++++++++++++++++++++++++++, '++++++++++++++++++++++++++++++++++++++++++' +++++++++++++++++++++.
+ +++++++++++++++++++++++++++++: '++++++++++++++++++++++++++++++++++++++++++++++, +++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++;` .++++++++++++++++++++++++++++++++++++++++++++++++++++' ,+++++++++++++++++++++++++.
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++',..,;+++++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++`
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ .+++++++++++++++++++++++++++++++++++++++++++++++++++++++: .,++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++: :+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++, .++++++++++++++++++++++++++++++++++++++++++++++++++++++'
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,
+ .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
+ ,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++;
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++`
+ :+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++`
+ ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,
+ .;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,
+ ,;+++++++++++++++++++++++++++++++++++++++++++++++++++++++:.
+ ..,;;+++++++++++++++++++++++++++++;:,.
+
+ To submit the revised current.txt to the main CyanogenMod repository,
+ you will need approval.
+******************************
\ No newline at end of file
diff --git a/build/core/config.mk b/build/core/config.mk
index 57bb514c..c6fb529a 100644
--- a/build/core/config.mk
+++ b/build/core/config.mk
@@ -22,6 +22,7 @@ FRAMEWORK_CM_PLATFORM_API_FILE := $(TOPDIR)vendor/cmsdk/api/cm_current.txt
FRAMEWORK_CM_PLATFORM_REMOVED_API_FILE := $(TOPDIR)vendor/cmsdk/api/cm_removed.txt
FRAMEWORK_CM_PLATFORM_SYSTEM_API_FILE := $(TOPDIR)vendor/cmsdk/system-api/cm_system-current.txt
FRAMEWORK_CM_PLATFORM_SYSTEM_REMOVED_API_FILE := $(TOPDIR)vendor/cmsdk/system-api/cm_system-removed.txt
+FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT := $(TOPDIR)vendor/cm/build/core/apicheck_msg_current.txt
BUILD_MAVEN_PREBUILT := $(TOP)/vendor/replicant/build/core/maven_artifact.mk
PUBLISH_MAVEN_PREBUILT := $(TOP)/vendor/replicant/build/core/maven_artifact_publish.mk
diff --git a/build/core/apicheck.mk b/build/tasks/apicheck.mk
similarity index 72%
rename from build/core/apicheck.mk
rename to build/tasks/apicheck.mk
index b0df9391..3be3cae1 100644
--- a/build/core/apicheck.mk
+++ b/build/tasks/apicheck.mk
@@ -25,11 +25,8 @@ ifeq (,$(filter true, $(WITHOUT_CHECK_API) $(TARGET_BUILD_PDK)))
# Run the checkapi rules by default.
droidcore: checkapi-cm
-cm_last_released_sdk_version := $(lastword $(call numerically_sort, \
- $(filter-out current, \
- $(patsubst $(CM_SRC_API_DIR)/%.txt,%, $(wildcard $(CM_SRC_API_DIR)/*.txt)) \
- )\
- ))
+# Validate against current platform sdk version api text within prebuilts
+cm_last_released_sdk_version := $(CM_PLATFORM_SDK_VERSION)
.PHONY: check-cm-public-api
checkapi-cm : check-cm-public-api
@@ -41,6 +38,8 @@ checkapi-cm : check-cm-public-api
# (See vendor/cmsdk/Android.mk)
# we need to add api-stubs as additional dependency of the api check.
+$(INTERNAL_CM_PLATFORM_API_FILE): cm-api-stubs-docs
+
# Check that the API we're building hasn't broken the last-released
# SDK version.
$(eval $(call check-api, \
@@ -49,12 +48,14 @@ $(eval $(call check-api, \
$(INTERNAL_CM_PLATFORM_API_FILE), \
$(FRAMEWORK_CM_PLATFORM_REMOVED_API_FILE), \
$(INTERNAL_CM_PLATFORM_REMOVED_API_FILE), \
- cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
+ -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 \
+ -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
+ -error 16 -error 17 -error 18 , \
+ cat $(FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT), \
check-cm-public-api, \
- $(call doc-timestamp-for, cm-api-stubs) \
+ $(call doc-timestamp-for,cm-api-stubs) \
))
-
# Check that the API we're building hasn't changed from the not-yet-released
# SDK version.
$(eval $(call check-api, \
@@ -63,9 +64,13 @@ $(eval $(call check-api, \
$(INTERNAL_CM_PLATFORM_API_FILE), \
$(FRAMEWORK_CM_PLATFORM_REMOVED_API_FILE), \
$(INTERNAL_CM_PLATFORM_REMOVED_API_FILE), \
- cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
+ -error 2 -error 3 -error 4 -error 5 -error 6 \
+ -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
+ -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
+ -error 25 -error 26 -error 27, \
+ cat $(FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT), \
check-cm-public-api, \
- $(call doc-timestamp-for, cm-api-stubs) \
+ $(call doc-timestamp-for,cm-api-stubs) \
))
.PHONY: update-cm-public-api
@@ -81,7 +86,9 @@ update-cm-api : update-cm-public-api
.PHONY: check-cm-system-api
checkapi-cm : check-cm-system-api
-# Check that the Cyanogen System API we're building hasn't broken the last-released
+$(INTERNAL_CM_PLATFORM_SYSTEM_API_FILE): cm-system-api-stubs-docs
+
+# Check that the System API we're building hasn't broken the last-released
# SDK version.
$(eval $(call check-api, \
checksystemapi-cm-last, \
@@ -89,9 +96,12 @@ $(eval $(call check-api, \
$(INTERNAL_CM_PLATFORM_SYSTEM_API_FILE), \
$(FRAMEWORK_CM_PLATFORM_SYSTEM_REMOVED_API_FILE), \
$(INTERNAL_CM_PLATFORM_SYSTEM_REMOVED_API_FILE), \
- cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
+ -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 \
+ -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
+ -error 16 -error 17 -error 18 , \
+ cat $(FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT), \
check-cm-system-api, \
- $(call doc-timestamp-for, cm-system-api-stubs) \
+ $(call doc-timestamp-for,cm-system-api-stubs) \
))
# Check that the System API we're building hasn't changed from the not-yet-released
@@ -102,9 +112,13 @@ $(eval $(call check-api, \
$(INTERNAL_CM_PLATFORM_SYSTEM_API_FILE), \
$(FRAMEWORK_CM_PLATFORM_SYSTEM_REMOVED_API_FILE), \
$(INTERNAL_CM_PLATFORM_SYSTEM_REMOVED_API_FILE), \
- cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
+ -error 2 -error 3 -error 4 -error 5 -error 6 \
+ -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
+ -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
+ -error 25 -error 26 -error 27, \
+ cat $(FRAMEWORK_CM_API_NEEDS_UPDATE_TEXT), \
check-cm-system-api, \
- $(call doc-timestamp-for, cm-system-api-stubs) \
+ $(call doc-timestamp-for,cm-system-api-stubs) \
))
.PHONY: update-cm-system-api
diff --git a/build/tasks/generate_cmsdk_coverage.mk b/build/tasks/generate_cmsdk_coverage.mk
new file mode 100644
index 00000000..d9be81aa
--- /dev/null
+++ b/build/tasks/generate_cmsdk_coverage.mk
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+# Copyright (C) 2016 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.
+#
+
+# Makefile for producing cmsdk coverage reports.
+# Run "make cmsdk-test-coverage" in the $ANDROID_BUILD_TOP directory.
+
+cts_api_coverage_exe := $(HOST_OUT_EXECUTABLES)/cts-api-coverage
+dexdeps_exe := $(HOST_OUT_EXECUTABLES)/dexdeps
+
+coverage_out := $(HOST_OUT)/cmsdk-api-coverage
+
+api_text_description := vendor/cmsdk/api/cm_current.txt
+api_xml_description := $(coverage_out)/api.xml
+$(api_xml_description) : $(api_text_description) $(APICHECK)
+ $(hide) echo "Converting API file to XML: $@"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) $(APICHECK_COMMAND) -convert2xml $< $@
+
+cmsdk-test-coverage-report := $(coverage_out)/test-coverage.html
+
+cmsdk_tests_apk := $(call intermediates-dir-for,APPS,CMPlatformTests)/package.apk
+cmsdk_api_coverage_dependencies := $(cts_api_coverage_exe) $(dexdeps_exe) $(api_xml_description)
+
+$(cmsdk-test-coverage-report): PRIVATE_TEST_CASES := $(cmsdk_tests_apk)
+$(cmsdk-test-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
+$(cmsdk-test-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
+$(cmsdk-test-coverage-report): PRIVATE_API_XML_DESC := $(api_xml_description)
+$(cmsdk-test-coverage-report): $(cmsdk_tests_apk) $(cmsdk_api_coverage_dependencies) | $(ACP)
+ $(call generate-cm-coverage-report,"CMSDK API Coverage Report",\
+ $(PRIVATE_TEST_CASES),html)
+
+.PHONY: cmsdk-test-coverage
+cmsdk-test-coverage : $(cmsdk-test-coverage-report)
+
+# Put the test coverage report in the dist dir if "cmsdk" is among the build goals.
+ifneq ($(filter cmsdk, $(MAKECMDGOALS)),)
+ $(call dist-for-goals, cmsdk, $(cmsdk-test-coverage-report):cmsdk-test-coverage-report.html)
+endif
+
+# Arguments;
+# 1 - Name of the report printed out on the screen
+# 2 - List of apk files that will be scanned to generate the report
+# 3 - Format of the report
+define generate-cm-coverage-report
+ $(hide) mkdir -p $(dir $@)
+ $(hide) $(PRIVATE_CTS_API_COVERAGE_EXE) -d $(PRIVATE_DEXDEPS_EXE) -a $(PRIVATE_API_XML_DESC) -f $(3) -o $@ $(2) -cm
+ @ echo $(1): file://$(ANDROID_BUILD_TOP)/$@
+endef
+
+# Reset temp vars
+cmsdk_api_coverage_dependencies :=
+cmsdk-combined-coverage-report :=
+cmsdk-combined-xml-coverage-report :=
+cmsdk-verifier-coverage-report :=
+cmsdk-test-coverage-report :=
+api_xml_description :=
+api_text_description :=
+coverage_out :=
+dexdeps_exe :=
+cmsdk_api_coverage_exe :=
+cmsdk_verifier_apk :=
+android_cmsdk_zip :=
diff --git a/config/cmsdk_common.mk b/config/cmsdk_common.mk
new file mode 100644
index 00000000..4aad9829
--- /dev/null
+++ b/config/cmsdk_common.mk
@@ -0,0 +1,41 @@
+# Permissions for cmsdk services
+PRODUCT_COPY_FILES += \
+ vendor/cm/config/permissions/org.cyanogenmod.theme.xml:system/etc/permissions/org.cyanogenmod.theme.xml \
+ vendor/cm/config/permissions/org.cyanogenmod.livelockscreen.xml:system/etc/permissions/org.cyanogenmod.livelockscreen.xml
+
+# CM Platform Library
+PRODUCT_PACKAGES += \
+ org.cyanogenmod.platform-res \
+ org.cyanogenmod.platform \
+ org.cyanogenmod.platform.xml
+
+# CM Hardware Abstraction Framework
+PRODUCT_PACKAGES += \
+ org.cyanogenmod.hardware \
+ org.cyanogenmod.hardware.xml
+
+ifndef CM_PLATFORM_SDK_VERSION
+ # This is the canonical definition of the SDK version, which defines
+ # the set of APIs and functionality available in the platform. It
+ # is a single integer that increases monotonically as updates to
+ # the SDK are released. It should only be incremented when the APIs for
+ # the new release are frozen (so that developers don't write apps against
+ # intermediate builds).
+ CM_PLATFORM_SDK_VERSION := 5
+endif
+
+ifndef CM_PLATFORM_REV
+ # For internal SDK revisions that are hotfixed/patched
+ # Reset after each CM_PLATFORM_SDK_VERSION release
+ # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong
+ CM_PLATFORM_REV := 0
+endif
+
+# CyanogenMod Platform SDK Version
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION)
+
+# CyanogenMod Platform Internal
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV)
+
diff --git a/config/common.mk b/config/common.mk
index 745b888d..7007aa5b 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -125,13 +125,12 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
vendor/replicant/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
-# Live lockscreen
-PRODUCT_COPY_FILES += \
- vendor/replicant/config/permissions/org.cyanogenmod.livelockscreen.xml:system/etc/permissions/org.cyanogenmod.livelockscreen.xml
-
# Theme engine
include vendor/replicant/config/themes_common.mk
+# CMSDK
+include vendor/replicant/config/cmsdk_common.mk
+
# Required CM packages
PRODUCT_PACKAGES += \
Development \
@@ -159,16 +158,9 @@ PRODUCT_PACKAGES += \
CMSettingsProvider \
ExactCalculator
-# CM Platform Library
+# Exchange support
PRODUCT_PACKAGES += \
- org.cyanogenmod.platform-res \
- org.cyanogenmod.platform \
- org.cyanogenmod.platform.xml
-
-# CM Hardware Abstraction Framework
-PRODUCT_PACKAGES += \
- org.cyanogenmod.hardware \
- org.cyanogenmod.hardware.xml
+ Exchange2
# Extra tools in CM
PRODUCT_PACKAGES += \
@@ -231,7 +223,7 @@ endif
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.root_access=0
-PRODUCT_PACKAGE_OVERLAYS += vendor/replicant/overlay/common
+DEVICE_PACKAGE_OVERLAYS += vendor/replicant/overlay/common
ifeq ($(USE_OPENGL_RENDERER),true)
PRODUCT_PACKAGE_OVERLAYS += vendor/replicant/overlay/opengl
@@ -277,37 +269,9 @@ ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
endif
endif
-# by default, do not update the recovery with system updates
-PRODUCT_PROPERTY_OVERRIDES += persist.sys.recovery_update=false
-
-ifndef CM_PLATFORM_SDK_VERSION
- # This is the canonical definition of the SDK version, which defines
- # the set of APIs and functionality available in the platform. It
- # is a single integer that increases monotonically as updates to
- # the SDK are released. It should only be incremented when the APIs for
- # the new release are frozen (so that developers don't write apps against
- # intermediate builds).
- CM_PLATFORM_SDK_VERSION := 5
-endif
-
-ifndef CM_PLATFORM_REV
- # For internal SDK revisions that are hotfixed/patched
- # Reset after each CM_PLATFORM_SDK_VERSION release
- # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong
- CM_PLATFORM_REV := 0
-endif
-
PRODUCT_PROPERTY_OVERRIDES += \
ro.cm.display.version=$(CM_DISPLAY_VERSION)
-# CyanogenMod Platform SDK Version
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION)
-
-# CyanogenMod Platform Internal
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV)
-
-include $(WORKSPACE)/build_env/image-auto-bits.mk
-include vendor/cyngn/product.mk
diff --git a/config/themes_common.mk b/config/themes_common.mk
index eaeb2d26..f16b52b5 100644
--- a/config/themes_common.mk
+++ b/config/themes_common.mk
@@ -3,6 +3,3 @@ PRODUCT_PACKAGES += \
aapt \
ThemeChooser \
ThemesProvider
-
-PRODUCT_COPY_FILES += \
- vendor/replicant/config/permissions/org.cyanogenmod.theme.xml:system/etc/permissions/org.cyanogenmod.theme.xml
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 25625c27..214ceb98 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -49,21 +49,8 @@
- power
- reboot
- - profile
- airplane
- bugreport
- users
-
-
-
- - org.cyanogenmod.platform.internal.CMStatusBarManagerService
- - org.cyanogenmod.platform.internal.ProfileManagerService
- - org.cyanogenmod.platform.internal.PartnerInterfaceService
- - org.cyanogenmod.platform.internal.CMTelephonyManagerService
- - org.cyanogenmod.platform.internal.CMHardwareService
- - org.cyanogenmod.platform.internal.AppSuggestManagerService
- - org.cyanogenmod.platform.internal.PerformanceManagerService
-
diff --git a/prebuilt/common/etc/apns-conf.xml b/prebuilt/common/etc/apns-conf.xml
index 753257d1..dcea5f40 100644
--- a/prebuilt/common/etc/apns-conf.xml
+++ b/prebuilt/common/etc/apns-conf.xml
@@ -76,6 +76,7 @@
+
@@ -459,10 +460,8 @@
-
-
-
-
+
+
@@ -828,62 +827,17 @@
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -1463,6 +1417,7 @@
+
@@ -1518,7 +1473,7 @@
-
+
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index 7cf6ec52..1f66b776 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/prebuilt/common/etc/init.local.rc
@@ -63,6 +63,8 @@ on boot
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis
+ chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis
# ondemand governor
chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
diff --git a/sepolicy/platform_app.te b/sepolicy/platform_app.te
index db8647d3..bbd4dd41 100644
--- a/sepolicy/platform_app.te
+++ b/sepolicy/platform_app.te
@@ -2,3 +2,6 @@
# This is a performance optimization that allows platform apps to bypass the FUSE layer
allow platform_app sdcard_posix:dir create_dir_perms;
allow platform_app sdcard_posix:file create_file_perms;
+
+# Allow Gallery3D to crop user images
+allow platform_app system_app_data_file:file rw_file_perms;
diff --git a/sepolicy/recovery.te b/sepolicy/recovery.te
index 76e7a626..da6ddaca 100644
--- a/sepolicy/recovery.te
+++ b/sepolicy/recovery.te
@@ -29,6 +29,9 @@ allow recovery sdcard_posix:file r_file_perms;
# Control properties
allow recovery recovery_prop:property_service set;
+# Set property sys.usb.ffs.ready
+allow recovery ffs_prop:property_service set;
+
# recursive rm for wipes... :(
allow app_data_file self:filesystem associate;
allow recovery app_data_file:file { read open create write };
diff --git a/sepolicy/service.te b/sepolicy/service.te
index 579e2b86..1a6559f5 100644
--- a/sepolicy/service.te
+++ b/sepolicy/service.te
@@ -9,3 +9,5 @@ type cm_telephony_service, system_api_service, system_server_service, service_ma
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;
+type cm_themes_service, system_api_service, system_server_service, service_manager_type;
+type cm_iconcache_service, system_api_service, system_server_service, service_manager_type;
diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts
index 4baf0f8d..04efc6fe 100644
--- a/sepolicy/service_contexts
+++ b/sepolicy/service_contexts
@@ -9,3 +9,5 @@ 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
+cmthemes u:object_r:cm_themes_service:s0
+cmiconcache u:object_r:cm_iconcache_service:s0
diff --git a/sepolicy/su.te b/sepolicy/su.te
index 9cd63452..473386bc 100644
--- a/sepolicy/su.te
+++ b/sepolicy/su.te
@@ -64,4 +64,6 @@ userdebug_or_eng(`
allow system_app superuser_device:sock_file { read write create setattr unlink getattr };
allow system_app sudaemon:unix_stream_socket { connectto read write setopt ioctl };
allow system_app superuser_device:dir { create rw_dir_perms setattr unlink };
+
+ allow kernel sudaemon:fd { use };
')