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

Commit 78a7f120 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Fix settings restore"

parents c1ba416a 28cdb9e1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -285,7 +285,8 @@ BackupDataReader::ReadNextHeader(bool* done, int* type)
            break;
        }
        default:
            LOGD("Chunk header at %d has invalid type: 0x%08x", (int)m_pos, (int)m_header.type);
            LOGD("Chunk header at %d has invalid type: 0x%08x",
                    (int)(m_pos - sizeof(m_header)), (int)m_header.type);
            m_status = EINVAL;
    }
    
+6 −1
Original line number Diff line number Diff line
@@ -589,7 +589,12 @@ public class SettingsBackupAgent extends BackupAgentHelper {
    private void restoreWifiSupplicant(String filename, BackupDataInput data) {
        byte[] bytes = new byte[data.getDataSize()];
        if (bytes.length <= 0) return;
        try {
            data.readEntityData(bytes, 0, data.getDataSize());
            restoreWifiSupplicant(filename, bytes, bytes.length);
        } catch (IOException e) {
            Log.w(TAG, "Unable to read supplicant data");
        }
    }

    private void restoreWifiSupplicant(String filename, byte[] bytes, int size) {