mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN picker - fix types in AndroidDialogPickerManagerInterface
Summary: according to [this crash report](https://our.intern.facebook.com/intern/logview/details/facebook_android_crashes/7ba7056481015482c6166d65cb97e49d/?trace_key=1506fe36a70dd5e50cdc8968f6317f27), `value` was throwing an NPE despite being null-checked. this is because it was an `int` rather than an `Integer`, so the null check wasn't working Changelog: Fix types in AndroidDialogPickerManagerInterface Reviewed By: mdvacca Differential Revision: D20646343 fbshipit-source-id: a27587e0a48f5782bcf5ffddb604018218e65206
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9064c18376
commit
56b0f5cb6b
+1
-1
@@ -15,7 +15,7 @@ import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
public interface AndroidDialogPickerManagerInterface<T extends View> {
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setBackgroundColor(T view, @Nullable int value);
|
||||
void setBackgroundColor(T view, @Nullable Integer value);
|
||||
void setEnabled(T view, boolean value);
|
||||
void setItems(T view, @Nullable ReadableArray value);
|
||||
void setPrompt(T view, @Nullable String value);
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@ package com.facebook.react.views.picker;
|
||||
|
||||
import android.widget.Spinner;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate;
|
||||
@@ -44,7 +45,7 @@ public class ReactDialogPickerManager extends ReactPickerManager
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackgroundColor(@NonNull ReactPicker view, int backgroundColor) {
|
||||
public void setBackgroundColor(@NonNull ReactPicker view, @Nullable Integer backgroundColor) {
|
||||
view.setStagedBackgroundColor(backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user