Fixed the incorrect audio duration used for ETWS messages.
The incorrect audio duration caused no beep and no text-to-speech
messages played when the device recieves ETWS messages. Fixed by
multiplying the duration by 1000.
Bug: 23946090
Change-Id: Ic36281d30f3eefb59ca9c4c192245ccf16768805
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
index c51dc39..535a183 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
@@ -335,7 +335,8 @@
} else {
duration = SubscriptionManager.getIntegerSubscriptionProperty(message.getSubId(),
SubscriptionManager.CB_ALERT_SOUND_DURATION,
- Integer.parseInt(CellBroadcastSettings.ALERT_SOUND_DEFAULT_DURATION), this);
+ Integer.parseInt(CellBroadcastSettings.ALERT_SOUND_DEFAULT_DURATION), this)
+ * 1000;
}
audioIntent.putExtra(CellBroadcastAlertAudio.ALERT_AUDIO_DURATION_EXTRA, duration);