Fix testcase error

Fixes: 125604750
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.wifi.AddNetworkFragmentTest"
Change-Id: Id787c5715d0f60491f123fab58e2b0ca3093bcd9
This commit is contained in:
Raff Tsai
2019-02-22 16:59:37 +08:00
parent 1a7de076ca
commit 3055df31a0

View File

@@ -61,7 +61,11 @@ public class AddNetworkFragment extends InstrumentedFragment implements WifiConf
Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.wifi_add_network_view, container, false);
rootView.findViewById(android.R.id.button3).setVisibility(View.GONE);
final Button neutral = rootView.findViewById(android.R.id.button3);
if (neutral != null) {
neutral.setVisibility(View.GONE);
}
mSubmitBtn = rootView.findViewById(SUBMIT_BUTTON_ID);
mCancelBtn = rootView.findViewById(CANCEL_BUTTON_ID);
final ImageButton scannerButton = rootView.findViewById(SCANNER_BUTTON_ID);