()
| 544 | } |
| 545 | |
| 546 | public String getTipString() { |
| 547 | int nm = getNewMsgsCount(); |
| 548 | if (nm != 0) { |
| 549 | return String.valueOf(nm); |
| 550 | } |
| 551 | StringBuffer mess = new StringBuffer(); |
| 552 | |
| 553 | //#ifndef WMUC |
| 554 | boolean isMucContact = (this instanceof MucContact); |
| 555 | if (isMucContact) { |
| 556 | MucContact mucContact = (MucContact) this; |
| 557 | |
| 558 | if (mucContact.origin != Contact.ORIGIN_GROUPCHAT) { |
| 559 | mess.append((mucContact.realJid == null) ? "" : "jid: " + mucContact.realJid + "\n"); |
| 560 | |
| 561 | if (mucContact.affiliationCode > MucContact.AFFILIATION_NONE) { |
| 562 | mess.append(MucContact.getAffiliationLocale(mucContact.affiliationCode)); |
| 563 | } |
| 564 | |
| 565 | if (!(mucContact.roleCode == MucContact.ROLE_PARTICIPANT && mucContact.affiliationCode == MucContact.AFFILIATION_MEMBER)) { |
| 566 | if (mucContact.affiliationCode > MucContact.AFFILIATION_NONE) { |
| 567 | mess.append(SR.MS_AND); |
| 568 | } |
| 569 | mess.append(MucContact.getRoleLocale(mucContact.roleCode)); |
| 570 | } |
| 571 | } |
| 572 | } else { |
| 573 | //#endif |
| 574 | mess.append("jid: ").append(jid.toString()).append("\n").append(SR.MS_SUBSCRIPTION).append(": ").append(subscr); |
| 575 | //#ifdef PEP |
| 576 | if (hasMood()) { |
| 577 | mess.append("\n").append(SR.MS_USERMOOD).append(": ").append(getMoodString()); |
| 578 | } |
| 579 | //#ifdef PEP_ACTIVITY |
| 580 | if (hasActivity()) { |
| 581 | mess.append("\n").append(SR.MS_USERACTIVITY).append(": ").append(activity); |
| 582 | } |
| 583 | //#endif |
| 584 | //#ifdef PEP_LOCATION |
| 585 | if (hasLocation()) { |
| 586 | mess.append("\n").append(SR.MS_USERLOCATION).append(": ").append(location); |
| 587 | } |
| 588 | //#endif |
| 589 | |
| 590 | //#ifdef PEP_TUNE |
| 591 | if (pepTune) { |
| 592 | mess.append("\n").append(SR.MS_USERTUNE); |
| 593 | if (!pepTuneText.equals("")) { |
| 594 | mess.append(": ").append(pepTuneText); |
| 595 | } |
| 596 | } |
| 597 | //#endif |
| 598 | //#endif |
| 599 | //#ifndef WMUC |
| 600 | } |
| 601 | //#endif |
| 602 | if (origin != Contact.ORIGIN_GROUPCHAT) { |
| 603 | mess.append((j2j != null) ? "\nJ2J: " + j2j : ""); |
nothing calls this directly
no test coverage detected