()
| 1033 | } |
| 1034 | |
| 1035 | public String getDeviceName() { |
| 1036 | String manufacturer = Build.MANUFACTURER; |
| 1037 | String model = Build.BRAND + " - " + Build.MODEL; |
| 1038 | if (model.toLowerCase().startsWith(manufacturer.toLowerCase())) { |
| 1039 | return capitalize(model); |
| 1040 | } else { |
| 1041 | return capitalize(manufacturer) + " " + model; |
| 1042 | } |
| 1043 | } |
| 1044 | |
| 1045 | private String capitalize(String s) { |
| 1046 | if (s == null || s.length() == 0) { |
no test coverage detected