Log.e(TAG, "launcher backup has failed", e);
}
- out.key = keys.toArray(BackupProtos.Key.EMPTY_ARRAY);
+ out.key = keys.toArray(new BackupProtos.Key[keys.size()]);
writeJournal(newState, out);
Log.v(TAG, "onBackup: wrote " + out.bytes + "b in " + out.rows + " rows.");
}
// will catch any changes the restore process might have made
Journal out = new Journal();
out.t = 0;
- out.key = mKeys.toArray(BackupProtos.Key.EMPTY_ARRAY);
+ out.key = mKeys.toArray(new BackupProtos.Key[mKeys.size()]);
writeJournal(newState, out);
Log.v(TAG, "onRestore: read " + mKeys.size() + " rows");
mKeys.clear();