VisibilityAwareImageButton.setVisibility can only be called from within the same library group


floatingActionButtonを

floatingActionButton.visibility = View.INVISIBLE

のようなことをすると、

VisibilityAwareImageButton.setVisibility can only be called from within the same library group (groupId=com.android.support) less... (⌘F1) 
Inspection info:This API has been flagged with a restriction that has not been met.  Examples of API restrictions: * Method can only be invoked by a subclass * Method can only be accessed from within the same library (defined by the Gradle library group id) * Method can only be accessed from tests.  You can add your own API restrictions with the @RestrictTo annotation.  Issue id: RestrictedApi

と叱られます。コード上からfloatingActionButtonの表示制御を行う場合、

floatingActionButton.show()
floatingActionButton.hide()

とするようです。