I released the IME application (soft keyboard) and I get crash reports from HTC phones . Here is the stack trace:
java.lang.NullPointerException at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:465) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:666) at com.comet.android.keyboard.util.Util.getBitmapDrawable(MyFile.java:416) ...
Here is my call to Drawable.createFromResourceStream ()
drawable = Drawable.createFromResourceStream(context.getResources(), null, stream, null);
where context subclass of InputMethodService and stream is FileInputStream or AssetInputStream (I tried both). A resource file is a compiled NinePatchDrawable file. I confirmed that the thread is not null.
Repeat: this error only occurs with some HTC phones (including Evo) with different versions of the Android OS.
Has anyone experienced this and / or knew how to fix it?
Thanks in advance,
Barry
PS It is strange that line 465 of the failure is not in the breakdown method of BitmapFactory.decodeResourceStream () in any version of BitmapFactory.java, therefore HTC must use a modified code.
android android-assets nine-patch htc-android
Barry fruitman
source share