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

Commit 55a3fe78 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent d0f517b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);