Fix crash when loading vector from typed array.

Fixes #9933
fork-5.53.8
Alex Hart 2020-08-19 10:45:01 -03:00 zatwierdzone przez GitHub
rodzic 56392b87f7
commit b3e247e9cc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -2,7 +2,6 @@ package org.thoughtcrime.securesms.components;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import android.widget.ImageView;
@ -36,9 +35,9 @@ public final class ConversationScrollToView extends FrameLayout {
if (attrs != null) {
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ConversationScrollToView);
Drawable src = array.getDrawable(R.styleable.ConversationScrollToView_cstv_scroll_button_src);
int srcId = array.getResourceId(R.styleable.ConversationScrollToView_cstv_scroll_button_src, 0);
scrollButton.setImageDrawable(src);
scrollButton.setImageResource(srcId);
array.recycle();
}