Fix wifi AP backup
An OutputStream buffers only by explicit contract. OutputStreamWriter buffers internally, always. Do not get these behaviors confused. Bug 19341967 Change-Id: I0610ed625b0175620083dd286f3a73c24956b171
This commit is contained in:
@@ -942,6 +942,7 @@ public class SettingsBackupAgent extends BackupAgentHelper {
|
|||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
OutputStreamWriter out = new OutputStreamWriter(bos);
|
OutputStreamWriter out = new OutputStreamWriter(bos);
|
||||||
fromFile.write(out);
|
fromFile.write(out);
|
||||||
|
out.flush();
|
||||||
return bos.toByteArray();
|
return bos.toByteArray();
|
||||||
} else {
|
} else {
|
||||||
return EMPTY_DATA;
|
return EMPTY_DATA;
|
||||||
|
|||||||
Reference in New Issue
Block a user