Code example for Method

Methods: invoke

0
      return; 
    } 
    boolean released = false;
    if (wakelockParameterizedRelease != null) {
      try { 
        wakelockParameterizedRelease.invoke(proximityLock, new Integer(WAIT_FOR_PROXIMITY_NEGATIVE));
        released = true;
      } catch (IllegalAccessException e) {
        Log.d("LockManager", "Failed to invoke release method", e);
      } catch (InvocationTargetException e) {
        Log.d("LockManager", "Failed to invoke release method", e);
      } 
    } 
 
    if(!released) {
      proximityLock.release();
    } 
    Log.d("LockManager", "Released proximity lock:" + proximityLock.isHeld());
  } 
 
  private static Method getWakelockParamterizedReleaseMethod() {