protected static String getFamily ( ) { try { return Build . MODEL . split ( " " ) [ 0 ] ; } catch ( Exception e ) { Log . e ( TAG , "Error getting device family." , e ) ; return null ; } }
Fake the device family by using the first word in the Build . MODEL . Works well in most cases ... Nexus 6P - > Nexus Galaxy S7 - > Galaxy .