Cleanup of some testcases. Addition of some testcases.
Removed print statement in BleAdvertiseApiTest
Created BeaconSwarmTest for raspbi testbed.
Fixed BleAttenuatorTest to work with the new framework.
Added Bugs test to test various bugs. (sandbox area)
Added low latency scanning and advertising for tests
    that don't rely on it. This speeds up many tests.
Changed a mispelling in test_runner.py.
Added documentation to these test suites:
    BleScanApiTest, BeaconSwarmTest, BleAttenuatorTest,
Added enums to BleEnum: BluetoothGattCharacteristic,
    BluetoothGattDescriptor, BluetoothGattService

BluetoothGattFacade fixes:
    I was putting an empty string into the onServiceAdded
        callback results. changed to instanceId.
    Method openGattServer was looking for the same value
        twice. Removed the second instance.

Change-Id: I455c4a0e51a2b677ede2998d44f01e71c2a7f037
diff --git a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothGattFacade.java b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothGattFacade.java
index d772491..ecf76dc 100644
--- a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothGattFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothGattFacade.java
@@ -78,22 +78,15 @@
     @Rpc(description = "Open new gatt server")
     public int openGattServer(
         @RpcParameter(name = "index")
-        Integer index,
-        @RpcParameter(name = "callbackIndex")
-        Integer callbackIndex
+        Integer index
         ) throws Exception {
         if (mBluetoothGattServerCallbackList.get(index) != null) {
-            if (mBluetoothGattServerCallbackList.get(callbackIndex) != null) {
-                BluetoothGattServer mGattServer = mBluetoothManager.openGattServer(
-                        mContext, mBluetoothGattServerCallbackList.get(callbackIndex));
-                GattServerCount += 1;
-                int in = GattServerCount;
-                mBluetoothGattServerList.put(in, mGattServer);
-                return in;
-            } else {
-                throw new Exception("Invalid callbackIndex input:"
-                        + Integer.toString(callbackIndex));
-            }
+            BluetoothGattServer mGattServer = mBluetoothManager.openGattServer(
+                    mContext, mBluetoothGattServerCallbackList.get(index));
+            GattServerCount += 1;
+            int in = GattServerCount;
+            mBluetoothGattServerList.put(in, mGattServer);
+            return in;
         }
         else {
             throw new Exception("Invalid index input:"
@@ -239,7 +232,6 @@
             String serviceUuid,
             @RpcParameter(name = "characteristicIndex")
             Integer characteristicIndex
-
             ) throws Exception {
         if (mBluetoothGattList.get(index) != null
                 && mBluetoothGattList.get(index).getService(UUID.fromString(serviceUuid)) != null
@@ -807,10 +799,11 @@
             index = idx;
         }
 
+        @Override
         public void onServiceAdded(int status, BluetoothGattService service) {
             Log.d("gatt_server change onServiceAdded " + mEventType + " " + index);
             mResults.putString("serviceUuid", service.getUuid().toString());
-            mResults.putInt("", service.getInstanceId());
+            mResults.putInt("instanceId", service.getInstanceId());
             mEventFacade
                     .postEvent(mEventType + index + "onServiceAdded", mResults.clone());
             mResults.clear();