Dismiss Get In Key dialog after the timeout sent by the card
Don't use the default timeout for the dialog if the proactive command
explicitly specifies one.
Change-Id: I4e54d9e37ac6df832c4dcf93e6749eaff74756e1
diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java
index b6228fb..fb81469 100644
--- a/src/com/android/stk/StkInputActivity.java
+++ b/src/com/android/stk/StkInputActivity.java
@@ -256,9 +256,14 @@
}
private void startTimeOut() {
+ int duration = StkApp.calculateDurationInMilis(mStkInput.duration);
+
+ if (duration <= 0) {
+ duration = StkApp.UI_TIMEOUT;
+ }
cancelTimeOut();
mTimeoutHandler.sendMessageDelayed(mTimeoutHandler
- .obtainMessage(MSG_ID_TIMEOUT), StkApp.UI_TIMEOUT);
+ .obtainMessage(MSG_ID_TIMEOUT), duration);
}
private void configInputDisplay() {