MtpCursor: Fix long to int truncation bug
BUG: 2978335 Change-Id: I2491a2ce3b65afa272540090cabace52067b8534 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -399,8 +399,7 @@ bool MtpCursor::prepareRow(CursorWindow* window) {
|
||||
}
|
||||
|
||||
|
||||
bool MtpCursor::putLong(CursorWindow* window, int value, int row, int column) {
|
||||
|
||||
bool MtpCursor::putLong(CursorWindow* window, int64_t value, int row, int column) {
|
||||
if (!window->putLong(row, column, value)) {
|
||||
window->freeLastRow();
|
||||
LOGE("Failed allocating space for a long in column %d", column);
|
||||
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
MtpObjectHandle objectID, int row);
|
||||
|
||||
bool prepareRow(CursorWindow* window);
|
||||
bool putLong(CursorWindow* window, int value, int row, int column);
|
||||
bool putLong(CursorWindow* window, int64_t value, int row, int column);
|
||||
bool putString(CursorWindow* window, const char* text, int row, int column);
|
||||
bool putThumbnail(CursorWindow* window, MtpObjectHandle objectID,
|
||||
MtpObjectFormat format, int row, int column);
|
||||
|
||||
Reference in New Issue
Block a user