summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:10:49 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:10:49 +0000
commitd38c4793830b89291ad6f01b8b6eb0abdf5ccd54 (patch)
treec0ec2aaae0a580adacbb292ec010eb914f378cd9
parent39b5b839bddc216ba8102d36c1f955190b2ec100 (diff)
parent6179ceeccf2ed30919d9e913f8a43ee81d01d41c (diff)
downloadconnectivity-d38c4793830b89291ad6f01b8b6eb0abdf5ccd54.tar.gz
Change-Id: Idb4dcde2978c099d6869d75c9dac5534a36e5993
-rw-r--r--OWNERS4
-rw-r--r--PMC/Android.bp4
-rw-r--r--PMC/AndroidManifest.xml73
-rw-r--r--PMC/src/com/android/pmc/A2dpReceiver.java35
-rw-r--r--PMC/src/com/android/pmc/BleScanReceiver.java3
-rw-r--r--PMC/src/com/android/pmc/GattPMCReceiver.java3
-rw-r--r--PMC/src/com/android/pmc/PMCMainActivity.java24
-rw-r--r--UID/Android.bp4
-rw-r--r--UID/AndroidManifest.xml2
-rw-r--r--sl4n/Android.bp21
-rw-r--r--sl4n/LICENSE113
-rw-r--r--sl4n/facades/bluetooth/bt_binder_facade.h2
-rw-r--r--sl4n/facades/wifi/wifi_facade.h2
-rw-r--r--sl4n/rapidjson/doc/stream.md2
14 files changed, 227 insertions, 65 deletions
diff --git a/OWNERS b/OWNERS
index 2b254eb..cc15db5 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,3 +1 @@
-pavlin@google.com
-tturney@google.com
-markdr@google.com
+include platform/packages/modules/Bluetooth:/OWNERS
diff --git a/PMC/Android.bp b/PMC/Android.bp
index 1c2b54a..83aa0d3 100644
--- a/PMC/Android.bp
+++ b/PMC/Android.bp
@@ -1,3 +1,7 @@
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
android_app {
name: "PMC",
platform_apis: true,
diff --git a/PMC/AndroidManifest.xml b/PMC/AndroidManifest.xml
index d8485b9..e276ff1 100644
--- a/PMC/AndroidManifest.xml
+++ b/PMC/AndroidManifest.xml
@@ -16,52 +16,49 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.pmc"
- android:versionCode="3"
- android:versionName="3.0" >
+ package="com.android.pmc"
+ android:versionCode="3"
+ android:versionName="3.0">
- <uses-sdk
- android:minSdkVersion="19"
- android:targetSdkVersion="21" />
+ <uses-sdk android:minSdkVersion="19"
+ android:targetSdkVersion="21"/>
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
- <uses-permission android:name="android.permission.WAKE_LOCK" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.BLUETOOTH" />
- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
- <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
- <uses-permission android:name="android.permission.MANAGE_USB" />
- <uses-permission android:name="android.permission.WRITE_SETTINGS" />
- <uses-permission android:name="android.permission.TETHER_PRIVILEGED" />
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.LOCATION_HARDWARE"/>
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.BLUETOOTH"/>
+ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL"/>
+ <uses-permission android:name="android.permission.MANAGE_USB"/>
+ <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
+ <uses-permission android:name="android.permission.TETHER_PRIVILEGED"/>
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
+ <application android:allowBackup="true"
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@style/AppTheme">
<!-- Main activity -->
- <activity
- android:name="com.android.pmc.PMCMainActivity"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:label="@string/app_name" >
+ <activity android:name="com.android.pmc.PMCMainActivity"
+ android:configChanges="keyboardHidden|orientation|screenSize"
+ android:label="@string/app_name"
+ android:exported="true">
<intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Settings activity -->
- <activity
- android:name="com.android.pmc.SettingActivity"
- android:configChanges="keyboardHidden|orientation|screenSize"
- android:label="@string/settings" >
+ <activity android:name="com.android.pmc.SettingActivity"
+ android:configChanges="keyboardHidden|orientation|screenSize"
+ android:label="@string/settings">
</activity>
</application>
diff --git a/PMC/src/com/android/pmc/A2dpReceiver.java b/PMC/src/com/android/pmc/A2dpReceiver.java
index 162d864..f610788 100644
--- a/PMC/src/com/android/pmc/A2dpReceiver.java
+++ b/PMC/src/com/android/pmc/A2dpReceiver.java
@@ -35,6 +35,7 @@ import android.os.SystemClock;
import android.util.Log;
import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
/**
@@ -399,11 +400,11 @@ public class A2dpReceiver extends BroadcastReceiver {
private BluetoothCodecConfig getCodecValue(boolean printCapabilities) {
BluetoothCodecStatus codecStatus = null;
BluetoothCodecConfig codecConfig = null;
- BluetoothCodecConfig[] codecsLocalCapabilities = null;
- BluetoothCodecConfig[] codecsSelectableCapabilities = null;
+ List<BluetoothCodecConfig> codecsLocalCapabilities = new ArrayList<>();
+ List<BluetoothCodecConfig> codecsSelectableCapabilities = new ArrayList<>();
if (mBluetoothA2dp != null) {
- BluetoothDevice activeDevice = mBluetoothA2dp.getActiveDevice();
+ BluetoothDevice activeDevice = getA2dpActiveDevice();
if (activeDevice == null) {
Log.e(TAG, "getCodecValue: Active device is null");
return null;
@@ -450,10 +451,17 @@ public class A2dpReceiver extends BroadcastReceiver {
+ " bitsPerSample: " + bitsPerSample + " Channel Mode: " + channelMode
+ " LDAC quality: " + codecSpecific1);
- BluetoothCodecConfig codecConfig =
- new BluetoothCodecConfig(codecType, BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST,
- sampleRate, bitsPerSample, channelMode,
- codecSpecific1, codecSpecific2, codecSpecific3, codecSpecific4);
+ BluetoothCodecConfig codecConfig = new BluetoothCodecConfig.Builder()
+ .setCodecType(codecType)
+ .setCodecPriority(BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST)
+ .setSampleRate(sampleRate)
+ .setBitsPerSample(bitsPerSample)
+ .setChannelMode(channelMode)
+ .setCodecSpecific1(codecSpecific1)
+ .setCodecSpecific2(codecSpecific2)
+ .setCodecSpecific3(codecSpecific3)
+ .setCodecSpecific4(codecSpecific4)
+ .build();
// Wait here to see if mBluetoothA2dp is set
for (int i = 0; i < WAIT_SECONDS; i++) {
@@ -470,13 +478,13 @@ public class A2dpReceiver extends BroadcastReceiver {
}
if (mBluetoothA2dp != null) {
- BluetoothDevice activeDevice = mBluetoothA2dp.getActiveDevice();
+ BluetoothDevice activeDevice = getA2dpActiveDevice();
if (activeDevice == null) {
Log.e(TAG, "setCodecValue: Active device is null. Codec is not set.");
return false;
}
Log.d(TAG, "setCodecConfigPreference()");
- mBluetoothA2dp.setCodecConfigPreference(mBluetoothA2dp.getActiveDevice(), codecConfig);
+ mBluetoothA2dp.setCodecConfigPreference(getA2dpActiveDevice(), codecConfig);
} else {
Log.e(TAG, "mBluetoothA2dp is null. Codec is not set");
return false;
@@ -501,6 +509,15 @@ public class A2dpReceiver extends BroadcastReceiver {
return true;
}
+ private BluetoothDevice getA2dpActiveDevice() {
+ if (mBluetoothAdapter == null) {
+ return null;
+ }
+ List<BluetoothDevice> activeDevices =
+ mBluetoothAdapter.getActiveDevices(BluetoothProfile.A2DP);
+ return (activeDevices.size() > 0) ? activeDevices.get(0) : null;
+ }
+
/**
* Method to verify if the codec config values are changed
*
diff --git a/PMC/src/com/android/pmc/BleScanReceiver.java b/PMC/src/com/android/pmc/BleScanReceiver.java
index cb33a68..815f520 100644
--- a/PMC/src/com/android/pmc/BleScanReceiver.java
+++ b/PMC/src/com/android/pmc/BleScanReceiver.java
@@ -238,7 +238,8 @@ public class BleScanReceiver extends BroadcastReceiver {
// RegisterAlarmReceiver for BleScanListener
mContext.registerReceiver(mAlarmScanListener,
- new IntentFilter(BleScanListener.BLESCAN));
+ new IntentFilter(BleScanListener.BLESCAN),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
}
diff --git a/PMC/src/com/android/pmc/GattPMCReceiver.java b/PMC/src/com/android/pmc/GattPMCReceiver.java
index 4a29dbb..28676f2 100644
--- a/PMC/src/com/android/pmc/GattPMCReceiver.java
+++ b/PMC/src/com/android/pmc/GattPMCReceiver.java
@@ -48,7 +48,8 @@ public class GattPMCReceiver extends BroadcastReceiver {
// RegisterAlarmReceiver for GattListener
context.registerReceiver(mGattClientListener,
- new IntentFilter(GattClientListener.GATTCLIENT_ALARM));
+ new IntentFilter(GattClientListener.GATTCLIENT_ALARM),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
Log.d(TAG, "Start GattPMCReceiver()");
}
diff --git a/PMC/src/com/android/pmc/PMCMainActivity.java b/PMC/src/com/android/pmc/PMCMainActivity.java
index 8f59ef2..25ecb91 100644
--- a/PMC/src/com/android/pmc/PMCMainActivity.java
+++ b/PMC/src/com/android/pmc/PMCMainActivity.java
@@ -109,11 +109,16 @@ public class PMCMainActivity extends Activity {
mBtnStart = (Button) findViewById(R.id.btnstart);
mBtnStop = (Button) findViewById(R.id.btnstop);
addListenerOnButton();
- registerReceiver(mPMCReceiver, new IntentFilter(AUTOPOWER_INTENT_STRING));
- registerReceiver(mPMCReceiver, new IntentFilter(SETPARAMS_INTENT_STRING));
- registerReceiver(mBleScanReceiver, new IntentFilter(BleScanReceiver.BLE_SCAN_INTENT));
- registerReceiver(mGattPMCReceiver, new IntentFilter(GattPMCReceiver.GATTPMC_INTENT));
- registerReceiver(mA2dpReceiver, new IntentFilter(A2dpReceiver.A2DP_INTENT));
+ registerReceiver(mPMCReceiver, new IntentFilter(AUTOPOWER_INTENT_STRING),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
+ registerReceiver(mPMCReceiver, new IntentFilter(SETPARAMS_INTENT_STRING),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
+ registerReceiver(mBleScanReceiver, new IntentFilter(BleScanReceiver.BLE_SCAN_INTENT),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
+ registerReceiver(mGattPMCReceiver, new IntentFilter(GattPMCReceiver.GATTPMC_INTENT),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
+ registerReceiver(mA2dpReceiver, new IntentFilter(A2dpReceiver.A2DP_INTENT),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
}
@Override
@@ -201,7 +206,8 @@ public class PMCMainActivity extends Activity {
mDR = new WifiDownloadReceiver(PMCMainActivity.this,
"http://" + mServerIP + ":" + mServerPort + "/" + filename, mIntervalMillis,
mAlarmManager, mPIDownload);
- registerReceiver(mDR, new IntentFilter(sDownloadAction));
+ registerReceiver(mDR, new IntentFilter(sDownloadAction),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
Log.d(TAG, "Setting download data alarm. Interval: " + mIntervalMillis);
mDR.scheduleDownload();
mBtnStart.setEnabled(false);
@@ -225,7 +231,8 @@ public class PMCMainActivity extends Activity {
// Stop any ongoing scans before starting a new instance.
stopConnectivityScan();
mConnSR = new WifiConnScanReceiver(this, mIntervalMillis, mAlarmManager, mPIConnScan);
- registerReceiver(mConnSR, new IntentFilter(sConnScanAction));
+ registerReceiver(mConnSR, new IntentFilter(sConnScanAction),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
Log.d(TAG, "Setting connectivity scan alarm. Interval: " + mIntervalMillis);
mConnSR.scheduleConnScan();
mBtnStart.setEnabled(false);
@@ -262,7 +269,8 @@ public class PMCMainActivity extends Activity {
}
mGScanR = new WifiGScanReceiver(
this, scanSettings, mIntervalMillis, mAlarmManager, mPIGScan);
- registerReceiver(mGScanR, new IntentFilter(sGScanAction));
+ registerReceiver(mGScanR, new IntentFilter(sGScanAction),
+ Context.RECEIVER_EXPORTED_UNAUDITED);
Log.d(TAG, "Setting Gscan alarm. Interval: " + mIntervalMillis);
mGScanR.scheduleGscan();
mBtnStart.setEnabled(false);
diff --git a/UID/Android.bp b/UID/Android.bp
index 76f160d..de9ae7e 100644
--- a/UID/Android.bp
+++ b/UID/Android.bp
@@ -14,6 +14,10 @@
// limitations under the License.
//
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
android_app {
name: "ConnectivityUIDTest",
sdk_version: "current",
diff --git a/UID/AndroidManifest.xml b/UID/AndroidManifest.xml
index 9dc2680..73233eb 100644
--- a/UID/AndroidManifest.xml
+++ b/UID/AndroidManifest.xml
@@ -33,7 +33,7 @@
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
- <!-- Dummy activity -->
+ <!-- Test activity -->
<activity
android:name="com.android.tests.connectivity.uid.ConnectivityTestActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
diff --git a/sl4n/Android.bp b/sl4n/Android.bp
index 97aba31..e515d4f 100644
--- a/sl4n/Android.bp
+++ b/sl4n/Android.bp
@@ -1,10 +1,29 @@
+package {
+ default_applicable_licenses: [
+ "packages_apps_Test_connectivity_sl4n_license",
+ "Android-Apache-2.0",
+ ],
+}
+
+ // http://go/android-license-faq
+license {
+ name: "packages_apps_Test_connectivity_sl4n_license",
+ package_name: "Scripting Layer For Native",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-MIT",
+ ],
+ license_text: ["LICENSE"],
+}
+
cc_binary {
name: "sl4n",
header_libs: [
"libbluetooth_headers",
],
include_dirs: [
- "system/bt",
+ "packages/modules/Bluetooth/system",
],
local_include_dirs: [
"rapidjson/include",
diff --git a/sl4n/LICENSE b/sl4n/LICENSE
new file mode 100644
index 0000000..524b58b
--- /dev/null
+++ b/sl4n/LICENSE
@@ -0,0 +1,113 @@
+-------------------------------------------------
+
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// 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.
+
+Copyright 2015 THL A29 Limited, a Tencent company, and Milo Yip.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-------------------------------------------------
+msinttypes/inttypes.h
+
+// ISO C9x compliant inttypes.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+//
+// Copyright (c) 2006-2013 Alexander Chemeris
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the product nor the names of its contributors may
+// be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// The above software in this distribution may have been modified by
+// THL A29 Limited ("Tencent Modifications").
+// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
+
+-------------------------------------------------
+msinttypes/stdint.h
+
+// ISO C9x compliant stdint.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+//
+// Copyright (c) 2006-2013 Alexander Chemeris
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the product nor the names of its contributors may
+// be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// The above software in this distribution may have been modified by
+// THL A29 Limited ("Tencent Modifications").
+// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
diff --git a/sl4n/facades/bluetooth/bt_binder_facade.h b/sl4n/facades/bluetooth/bt_binder_facade.h
index e06cd75..65ece71 100644
--- a/sl4n/facades/bluetooth/bt_binder_facade.h
+++ b/sl4n/facades/bluetooth/bt_binder_facade.h
@@ -26,7 +26,7 @@
// representing the pass/fail value of the function. The functions check to see
// if the API call is actually possible. If it is the function's tuple will
// contain the actual result and an integer that indicates the value passed. If
-// the function is not possible then there will be a dummy return value in the
+// the function is not possible then there will be a mock return value in the
// first position of the tuple and the second value in the tuple indicates the
// value failed. Therefore it is up to the function to decide whether the
// expected api call is actually possible before calling it.
diff --git a/sl4n/facades/wifi/wifi_facade.h b/sl4n/facades/wifi/wifi_facade.h
index c028c5b..c68771b 100644
--- a/sl4n/facades/wifi/wifi_facade.h
+++ b/sl4n/facades/wifi/wifi_facade.h
@@ -22,7 +22,7 @@
// WifiFacade provides simple wrappers to call Wi-Fi HAL APIs.
//
// Each public function returns a tuple: <result, code>, where:
-// result: result of HAL API or a dummy value (of the correct type)
+// result: result of HAL API or a mock value (of the correct type)
// on failure.
// code: sl4n_error_codes::kPassInt or sl4n_error_codes::kFailInt on
// success or failure respectively.
diff --git a/sl4n/rapidjson/doc/stream.md b/sl4n/rapidjson/doc/stream.md
index 7b3c5ca..e70f52a 100644
--- a/sl4n/rapidjson/doc/stream.md
+++ b/sl4n/rapidjson/doc/stream.md
@@ -273,7 +273,7 @@ concept Stream {
For input stream, they must implement `Peek()`, `Take()` and `Tell()`.
For output stream, they must implement `Put()` and `Flush()`.
-There are two special interface, `PutBegin()` and `PutEnd()`, which are only for *in situ* parsing. Normal streams do not implement them. However, if the interface is not needed for a particular stream, it is still need to a dummy implementation, otherwise will generate compilation error.
+There are two special interface, `PutBegin()` and `PutEnd()`, which are only for *in situ* parsing. Normal streams do not implement them. However, if the interface is not needed for a particular stream, it is still need to a placeholder implementation, otherwise will generate compilation error.
## Example: istream wrapper {#ExampleIStreamWrapper}