Omit inferred network policies from backup.
Inferred network policies might include carrier-protected data that we can't export per CDD. We continue to backup policies that have been explicitly set by the end user. Test: builds, boots Bug: 24786071 Change-Id: I9de3308dfde72435627e8042fee4bcbb480e92dc
This commit is contained in:
@@ -858,7 +858,10 @@ public class SettingsBackupAgent extends BackupAgentHelper {
|
||||
out.writeInt(NETWORK_POLICIES_BACKUP_VERSION);
|
||||
out.writeInt(policies.length);
|
||||
for (NetworkPolicy policy : policies) {
|
||||
if (policy != null) {
|
||||
// We purposefully only backup policies that the user has
|
||||
// defined; any inferred policies might include
|
||||
// carrier-protected data that we can't export.
|
||||
if (policy != null && !policy.inferred) {
|
||||
byte[] marshaledPolicy = policy.getBytesForBackup();
|
||||
out.writeByte(BackupUtils.NOT_NULL);
|
||||
out.writeInt(marshaledPolicy.length);
|
||||
|
||||
Reference in New Issue
Block a user