public void cancelRequest(int senderWhat,Handler target,int targetWhat){
synchronized (this) {
    Registration start=mReg;
    Registration r=start;
    if (r == null) {
      return;
    }
    do {
      if (r.senderWhat >= senderWhat) {
        break;
      }
      r=r.next;
    }
 while (r != start);
    if (r.senderWhat == senderWhat) {
      Handler[] targets=r.targets;
      int[] whats=r.targetWhats;
      int oldLen=targets.length;
      for (int i=0; i < oldLen; i++) {
        if (targets[i] == target && whats[i] == targetWhat) {
          r.targets=new Handler[oldLen - 1];
          r.targetWhats=new int[oldLen - 1];
          if (i > 0) {
            System.arraycopy(targets,0,r.targets,0,i);
            System.arraycopy(whats,0,r.targetWhats,0,i);
          }
          int remainingLen=oldLen - i - 1;
          if (remainingLen != 0) {
            System.arraycopy(targets,i + 1,r.targets,i,remainingLen);
            System.arraycopy(whats,i + 1,r.targetWhats,i,remainingLen);
          }
          break;
        }
      }
    }
  }
}

public void cancelRequest ( int senderWhat , Handler target , int targetWhat ) { synchronized ( this ) { Registration start = mReg ; Registration r = start ; if ( r == null ) { return ; } do { if ( r . senderWhat >= senderWhat ) { break ; } r = r . next ; } while ( r != start ) ; if ( r . senderWhat == senderWhat ) { Handler [ ] targets = r . targets ; int [ ] whats = r . targetWhats ; int oldLen = targets . length ; for ( int i = 0 ; i < oldLen ; i ++ ) { if ( targets [ i ] == target && whats [ i ] == targetWhat ) { r . targets = new Handler [ oldLen - 1 ] ; r . targetWhats = new int [ oldLen - 1 ] ; if ( i > 0 ) { System . arraycopy ( targets , 0 , r . targets , 0 , i ) ; System . arraycopy ( whats , 0 , r . targetWhats , 0 , i ) ; } int remainingLen = oldLen - i - 1 ; if ( remainingLen != 0 ) { System . arraycopy ( targets , i + 1 , r . targets , i , remainingLen ) ; System . arraycopy ( whats , i + 1 , r . targetWhats , i , remainingLen ) ; } break ; } } } } }
unregister for notifications for this senderwhat / target / targetwhat tuple .
