Set preference visible to false when there is no keyboard.
1. Physical keyboard settings should only show up if at least one PK is connected. 2. Update tests. 3. Fix NullPointerException. Bug: 269983475 Bug: 270109384 Bug: 271357910 Test: atest and manual Change-Id: If7798587fb386dbf669fc249cab304d91a26879b
This commit is contained in:
@@ -27,13 +27,11 @@ import com.android.settings.R;
|
||||
|
||||
public class NewKeyboardLayoutPickerFragment extends Fragment {
|
||||
|
||||
private ViewGroup mFragmentView;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
mFragmentView = (ViewGroup) inflater.inflate(
|
||||
ViewGroup fragmentView = (ViewGroup) inflater.inflate(
|
||||
R.layout.keyboard_layout_picker, container, false);
|
||||
getActivity().getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
@@ -47,6 +45,6 @@ public class NewKeyboardLayoutPickerFragment extends Fragment {
|
||||
.replace(R.id.keyboard_layouts, fragment)
|
||||
.commit();
|
||||
|
||||
return mFragmentView;
|
||||
return fragmentView;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user