diff options
author | Raj Yengisetty <raj@cyngn.com> | 2016-02-29 19:46:33 -0800 |
---|---|---|
committer | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-08 10:42:51 -0700 |
commit | 86b7461d47587c7bfdd774137bc76585249474cc (patch) | |
tree | 5abe8773732b39fc34818e57730ab9b02adda45b | |
parent | 70b3f14c1e951eba89cfec9fd050847c55e950cd (diff) | |
download | packages_apps_PhoneCommon-86b7461d47587c7bfdd774137bc76585249474cc.tar.gz packages_apps_PhoneCommon-86b7461d47587c7bfdd774137bc76585249474cc.tar.bz2 packages_apps_PhoneCommon-86b7461d47587c7bfdd774137bc76585249474cc.zip |
InCall: check class of creditWarn value
This helps us avoid logcat spam when Floats/Integers get mixed up
CD-411
Change-Id: Ia2bf8bfb838211fce74d14b3193e75e060abe17c
-rw-r--r-- | src-ambient/incall/CallMethodHelper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src-ambient/incall/CallMethodHelper.java b/src-ambient/incall/CallMethodHelper.java index 2c9d56f..2d3aa35 100644 --- a/src-ambient/incall/CallMethodHelper.java +++ b/src-ambient/incall/CallMethodHelper.java @@ -780,8 +780,15 @@ public class CallMethodHelper { if (bundleResult != null && bundleResult.bundle != null && bundleResult.bundle.containsKey(NudgeKey .INCALL_PARAM_CREDIT_WARN)) { - cmi.mCreditWarn = bundleResult.bundle.getFloat(NudgeKey + Object creditWarn = bundleResult.bundle.get(NudgeKey .INCALL_PARAM_CREDIT_WARN); + if (creditWarn.getClass().equals(Integer.class)) { + cmi.mCreditWarn = (Integer) creditWarn; + } else if (creditWarn.getClass().equals(Float.class)) { + cmi.mCreditWarn = (Float) creditWarn; + } else { + Log.e(TAG, "Invalid value for Credit Warn limit: " + creditWarn); + } mCallMethodInfos.put(pluginComponent, cmi); } maybeBroadcastToSubscribers(); |