Merge "Put sl4a back into eng builds." into lmp-dev
diff --git a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothConnectionFacade.java b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothConnectionFacade.java
index 12268fd..a76c30a 100644
--- a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothConnectionFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothConnectionFacade.java
@@ -83,8 +83,6 @@
mGoodNews.putBoolean("Status", true);
mBadNews = new Bundle();
mBadNews.putBoolean("Status", false);
-
- mService.registerReceiver(mPairingHelper, mPairingFilter);
}
private void unregisterCachedListener(String listenerId) {
@@ -296,6 +294,11 @@
mService.unregisterReceiver(mPairingHelper);
}
+ @Rpc(description = "Start intercepting all bluetooth connection pop-ups.")
+ public void bluetoothStartPairingHelper() {
+ mService.registerReceiver(mPairingHelper, mPairingFilter);
+ }
+
@Rpc(description = "Return a list of devices connected through bluetooth")
public List<BluetoothDevice> bluetoothGetConnectedDevices() {
ArrayList<BluetoothDevice> results = new ArrayList<BluetoothDevice>();
diff --git a/ScriptingLayerForAndroid/Android.mk b/ScriptingLayerForAndroid/Android.mk
index 63745b3..a8f6b33 100644
--- a/ScriptingLayerForAndroid/Android.mk
+++ b/ScriptingLayerForAndroid/Android.mk
@@ -17,6 +17,7 @@
LOCAL_STATIC_JAVA_LIBRARIES += sl4a.Utils sl4a.Common
LOCAL_STATIC_JAVA_LIBRARIES += sl4a.InterpreterForAndroid sl4a.ScriptingLayer sl4a.QuickAction
+LOCAL_MODULE_TAGS := eng
LOCAL_PRIVILEGED_MODULE := true
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/ScriptingLayerForAndroid/AndroidManifest.xml b/ScriptingLayerForAndroid/AndroidManifest.xml
index 9165b67..09005ae 100644
--- a/ScriptingLayerForAndroid/AndroidManifest.xml
+++ b/ScriptingLayerForAndroid/AndroidManifest.xml
@@ -176,13 +176,5 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
- <receiver android:name=".facade.bluetooth.BluetoothPairingHelper"
- android:permission="android.permission.BLUETOOTH_ADMIN">
- <intent-filter android:priority="999">
- <action android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
- <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </receiver>
</application>
</manifest>
diff --git a/build_all.sh b/build_all.sh
index 9bbfb95..2e6fa7a 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -30,6 +30,12 @@
declare -a test_list=("Utils" "Common")
+IFS='_' read -a array <<< "$TARGET_PRODUCT"
+export TP=${array[0]}
+if [[ ${#array[@]} -eq 2 ]]; then
+ export TP=${array[1]}
+fi
+
APP_NAME=sl4a
APP_PACKAGE_NAME=com.googlecode.android_scripting
@@ -37,7 +43,7 @@
SL4A_ROOT=$BRANCH_ROOT/vendor/google_testing/comms/Tools/sl4a
SHARED_LIB_JAR_ROOT=$BRANCH_ROOT/out/target/common/obj/JAVA_LIBRARIES
APP_JAR_ROOT=$BRANCH_ROOT/out/target/common/obj/APPS
-APK_ROOT=$BRANCH_ROOT/out/target/product/hammerhead/system/priv-app/sl4a
+APK_ROOT=$BRANCH_ROOT/out/target/product/$TP/system/priv-app/sl4a
SL4A_PROJ_DIR=$SL4A_ROOT/ScriptingLayerForAndroid
echo -e "${y}Removing intermediates of all the dependency libs${NC}"