MCPcopy Create free account
hub / github.com/Card-Forge/forge / getDeviceName

Method getDeviceName

forge-gui-android/src/forge/app/Main.java:1035–1043  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 2

onCreateMethod · 0.95
initForgeMethod · 0.95

Calls 2

capitalizeMethod · 0.95
startsWithMethod · 0.80

Tested by

no test coverage detected