aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/google
diff options
context:
space:
mode:
authorAng Li <angli@google.com>2017-10-05 10:10:12 -0700
committerGitHub <noreply@github.com>2017-10-05 10:10:12 -0700
commit953365323e977ebc0c459c6efde4bfc5a327356b (patch)
treecb93a33f1175c79f214e82f99fe3a82b476774dc /src/main/java/com/google
parentfe0b2f468fa728f04d3769ce7d1a88f2598cf20a (diff)
downloadmobly-bundled-snippets-953365323e977ebc0c459c6efde4bfc5a327356b.tar.gz
Fix a misuse of enum in Ble scan record. (#86)
* Don't use advertising enum for scan record.
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r--src/main/java/com/google/android/mobly/snippet/bundled/utils/JsonSerializer.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/google/android/mobly/snippet/bundled/utils/JsonSerializer.java b/src/main/java/com/google/android/mobly/snippet/bundled/utils/JsonSerializer.java
index 7e5ca5b..ef7f7d7 100644
--- a/src/main/java/com/google/android/mobly/snippet/bundled/utils/JsonSerializer.java
+++ b/src/main/java/com/google/android/mobly/snippet/bundled/utils/JsonSerializer.java
@@ -185,9 +185,7 @@ public class JsonSerializer {
private Bundle serializeBleScanRecord(ScanRecord record) {
Bundle result = new Bundle();
result.putString("DeviceName", record.getDeviceName());
- result.putString(
- "TxPowerLevel",
- MbsEnums.BLE_ADVERTISE_TX_POWER.getString(record.getTxPowerLevel()));
+ result.putInt("TxPowerLevel", record.getTxPowerLevel());
return result;
}