code: private synchronized boolean resolveAddresses() {
          boolean changed;
          try {
              InetAddress[] addresses = InetAddress.getAllByName(mHost);
              if (mResolutionResults instanceof UnknownHostException) {
                  changed = true;
              }
              else {
                  // Results may be ordered differently, so keep them sorted.
                  Arrays.sort(addresses, new Comparator() {
                      public int compare(Object a, Object b) {
                          return ((InetAddress)a).getHostAddress()
                              .compareTo(((InetAddress)b).getHostAddress());
                      }
                  });
  
                  changed = !Arrays.equals
                      (addresses, (InetAddress[])mResolutionResults);
              }
              mResolutionResults = addresses;
          }
          catch (UnknownHostException e) {
              changed = !(mResolutionResults instanceof UnknownHostException);
              mResolutionResults = e;
          }
  
          if (changed) {
              int size = mListeners.size();
              for (int i=0; i<size; i++) {
                  notifyListener((InetAddressListener)mListeners.get(i));
              }
          }
  
          return changed;
      }
docs: Returns true if anything changed from the last time this was invoked.