Skip to content

Commit

Permalink
fix[CustomSeekBarPreference]: incompatibility with TypedArray.close()…
Browse files Browse the repository at this point in the history
… on Android API lower than 31

Revert change from #6390 on this class
  • Loading branch information
TarikBR authored Jan 3, 2025
1 parent 80e0a6a commit 0dddfc1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public class CustomSeekBarPreference extends SeekBarPreference {
@SuppressLint("PrivateResource")
public CustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
try (TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.SeekBarPreference, defStyleAttr, defStyleRes)) {
mMin = a.getInt(R.styleable.SeekBarPreference_min, 0);
}
TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.SeekBarPreference, defStyleAttr, defStyleRes);
mMin = a.getInt(R.styleable.SeekBarPreference_min, 0);
a.recycle();
}

public CustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
Expand Down

0 comments on commit 0dddfc1

Please sign in to comment.