Fix crash when no SMS package is set

This commit is contained in:
Veeti Paananen 2013-12-03 09:06:16 +02:00
parent d89ef70060
commit 10580a7f20

View File

@ -188,7 +188,7 @@ public class Util {
public static boolean isDefaultSmsProvider(Context context){ public static boolean isDefaultSmsProvider(Context context){
return (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) || return (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) ||
(Telephony.Sms.getDefaultSmsPackage(context).equals(context.getPackageName())); (context.getPackageName().equals(Telephony.Sms.getDefaultSmsPackage(context)));
} }
// public static Bitmap loadScaledBitmap(InputStream src, int targetWidth, int targetHeight) { // public static Bitmap loadScaledBitmap(InputStream src, int targetWidth, int targetHeight) {