2011-02-06 85 views

回答

9

文檔說:

如果你想重複,通過索引處開始重複的模式。

表示REPEAT只允許爲0或1。

這是實現:

public void vibrate(long[] pattern, int repeat) 
{ 
    // catch this here because the server will do nothing. pattern may 
    // not be null, let that be checked, because the server will drop it 
    // anyway 
    if (repeat < pattern.length) { 
     try { 
      mService.vibratePattern(pattern, repeat, mToken); 
     } catch (RemoteException e) { 
     } 
    } else { 
     throw new ArrayIndexOutOfBoundsException(); 
    } 
} 
+0

REPEAT可以是0或1。 – Thomas 2011-02-06 19:09:08

相關問題