Exemplo n.º 1
0
  public void showConnectionInfo() {
    if (rfbconn == null) return;

    String msg = null;
    int idx = rfbconn.desktopName().indexOf("(");
    if (idx > 0) {
      // Breakup actual desktop name from IP addresses for improved
      // readability
      String dn = rfbconn.desktopName().substring(0, idx).trim();
      String ip = rfbconn.desktopName().substring(idx).trim();
      msg = dn + "\n" + ip;
    } else msg = rfbconn.desktopName();
    msg += "\n" + rfbconn.framebufferWidth() + "x" + rfbconn.framebufferHeight();
    String enc = rfbconn.getEncoding();
    // Encoding might not be set when we display this message
    if (decoder.getColorModel() != null) {
      if (enc != null && !enc.equals(""))
        msg += ", " + rfbconn.getEncoding() + " encoding, " + decoder.getColorModel().toString();
      else msg += ", " + decoder.getColorModel().toString();
    }
    Toast.makeText(getContext(), msg, Toast.LENGTH_SHORT).show();
  }
Exemplo n.º 2
0
 public boolean isColorModel(COLORMODEL cm) {
   return (decoder.getColorModel() != null) && decoder.getColorModel().equals(cm);
 }