diff options
| author | Stephen Bird <sbird@cyngn.com> | 2016-02-16 16:55:50 -0800 |
|---|---|---|
| committer | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-08 10:42:50 -0700 |
| commit | 30dc7856360ba4ab0903544cd3a44b9af1c3ea23 (patch) | |
| tree | 02e37339408550c579673f5fb46804bb9f6df574 /src-ambient | |
| parent | a1aefab78ec4c7de7f69b5c3a6362f6ebe9d79f9 (diff) | |
| download | packages_apps_PhoneCommon-30dc7856360ba4ab0903544cd3a44b9af1c3ea23.tar.gz packages_apps_PhoneCommon-30dc7856360ba4ab0903544cd3a44b9af1c3ea23.tar.bz2 packages_apps_PhoneCommon-30dc7856360ba4ab0903544cd3a44b9af1c3ea23.zip | |
Fix crash with null mimetype
Ticket: CD-421
Change-Id: I34a19400e1f8d08a23773ded1d5e012d75140449
Diffstat (limited to 'src-ambient')
| -rw-r--r-- | src-ambient/incall/CallMethodHelper.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src-ambient/incall/CallMethodHelper.java b/src-ambient/incall/CallMethodHelper.java index 015abfd..10e5e7f 100644 --- a/src-ambient/incall/CallMethodHelper.java +++ b/src-ambient/incall/CallMethodHelper.java @@ -25,6 +25,7 @@ import android.content.res.Resources; import android.os.Bundle; import android.os.Handler; import android.os.Looper; +import android.text.TextUtils; import android.util.Log; import android.widget.Toast; @@ -196,8 +197,11 @@ public class CallMethodHelper { public static CallMethodInfo getMethodForMimeType(String mimeType) { for (CallMethodInfo entry : mCallMethodInfos.values()) { - if (entry.mMimeType.equals(mimeType)) { - return entry; + // TODO: find out why mimetype may be null + if (!TextUtils.isEmpty(entry.mMimeType)) { + if (entry.mMimeType.equals(mimeType)) { + return entry; + } } } return null; |
