Fix the BasePreferenceController.createInstance's IllegalStateException

When the settings search do BasePreferenceController.createInstance,
it get the the IllegalStateException, and then the search ignore this
controller. It causes the indexing can not filter this controller via
the PreferenceController's getAvailabilityStatus.

Bug: 335509130
Test: Build pass. Do search and no crash
Change-Id: Icaff8ca690ca3e3a46c2f21a5fbde0bbd99fd92e
6 files changed