()
| 514 | } |
| 515 | |
| 516 | public String getDescription(){ |
| 517 | if(mType == Type.NETWORK) |
| 518 | return System.getContext().getString(R.string.network_subnet_mask); |
| 519 | |
| 520 | else if(mType == Type.ENDPOINT){ |
| 521 | String vendor = System.getMacVendor(mEndpoint.getHardware()), |
| 522 | desc = mEndpoint.getHardwareAsString(); |
| 523 | |
| 524 | if(vendor != null) desc += " - " + vendor; |
| 525 | |
| 526 | if(mEndpoint.getAddress().equals(System.getNetwork().getGatewayAddress())) |
| 527 | desc += "\n" + System.getContext().getString(R.string.gateway_router); |
| 528 | |
| 529 | else if(mEndpoint.getAddress().equals(System.getNetwork().getLocalAddress())) |
| 530 | desc += System.getContext().getString(R.string.this_device); |
| 531 | |
| 532 | return desc.trim(); |
| 533 | } else if(mType == Type.REMOTE) |
| 534 | return mAddress.getHostAddress(); |
| 535 | |
| 536 | return ""; |
| 537 | } |
| 538 | |
| 539 | public String getCommandLineRepresentation(){ |
| 540 | if(mType == Type.NETWORK) |
no test coverage detected