From 6833fbdd09d1347e31f9974e375d8d01c09aa5e5 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Thu, 12 Dec 2024 09:14:14 -0800 Subject: [PATCH] fbandroid/libraries/fresco/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/preferences/SizePreferences.java Reviewed By: nicholeic Differential Revision: D67097657 fbshipit-source-id: 37519f3fbce43016dfda97a2dc3a97353661e634 --- .../samples/scrollperf/preferences/SizePreferences.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/preferences/SizePreferences.java b/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/preferences/SizePreferences.java index 855f6beecd..71b7a56c9f 100644 --- a/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/preferences/SizePreferences.java +++ b/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/preferences/SizePreferences.java @@ -14,19 +14,23 @@ import android.widget.TextView; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; +import com.facebook.infer.annotation.Nullsafe; import com.facebook.samples.scrollperf.R; import com.facebook.samples.scrollperf.util.SizeUtil; import javax.annotation.Nullable; /** A simple Preference containing a SeekBar in order to select a size */ +@Nullsafe(Nullsafe.Mode.LOCAL) public class SizePreferences extends Preference implements SeekBar.OnSeekBarChangeListener { // We always use half of the width as default private static final int DEFAULT_SIZE_VALUE = SizeUtil.DISPLAY_WIDTH / 2; + // NULLSAFE_FIXME[Field Not Initialized] private SeekBar mSeekBar; @Nullable private TextView mSeekBarValueTextView; + // NULLSAFE_FIXME[Field Not Initialized] private TextView mTitleView; private int mProgressValue; @@ -54,10 +58,12 @@ public void setSeekBarMaxValue(int maxValue) { public void onBindViewHolder(PreferenceViewHolder holder) { super.onBindViewHolder(holder); // We get the reference to the mSeekBar + // NULLSAFE_FIXME[Not Vetted Third-Party] mSeekBar = (SeekBar) holder.findViewById(R.id.size_seek_bar); mSeekBar.setMax(mMaxValue); mSeekBar.setOnSeekBarChangeListener(this); mSeekBarValueTextView = (TextView) holder.findViewById(R.id.seek_bar_value); + // NULLSAFE_FIXME[Not Vetted Third-Party] mTitleView = (TextView) holder.findViewById(R.id.title); mTitleView.setText(getTitle()); // This is called after the initial value is set