2011-02-06 131 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

相关问题