Merge changes I2491a2ce,Ie1c88bd8

* changes:
  MtpCursor: Fix long to int truncation bug
  MtpCursor: Remove some unused variables