Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00ea0679 authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am de72697b: Merge change 4524 into donut

Merge commit 'de72697b771d33738c5f9d6c28087504e0796622'

* commit 'de72697b771d33738c5f9d6c28087504e0796622':
  FileRestoreHelper and RestoreHelperDispatcher work.
parents 14b8f4cc e272cd8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ public:
    bool HasEntities();
    status_t ReadEntityHeader(String8* key, size_t* dataSize);
    status_t SkipEntityData(); // must be called with the pointer at the begining of the data.
    status_t ReadEntityData(void* data, size_t size);
    ssize_t ReadEntityData(void* data, size_t size);

private:
    explicit BackupDataReader();
+4 −4
Original line number Diff line number Diff line
@@ -281,16 +281,16 @@ BackupDataReader::SkipEntityData()
    }
}

status_t
ssize_t
BackupDataReader::ReadEntityData(void* data, size_t size)
{
    if (m_status != NO_ERROR) {
        return m_status;
    }
    int remaining = m_dataEndPos - m_pos;
    //LOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
    //        size, m_pos, m_dataEndPos, remaining);
    if (size > remaining) {
        printf("size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
                size, m_pos, m_dataEndPos, remaining);
        size = remaining;
    }
    if (remaining <= 0) {
@@ -299,7 +299,7 @@ BackupDataReader::ReadEntityData(void* data, size_t size)
    int amt = read(m_fd, data, size);
    CHECK_SIZE(amt, (int)size);
    m_pos += size;
    return NO_ERROR;
    return amt;
}

status_t