Loading cmds/bmgr/library/outputparser-src/com/android/commands/bmgr/outputparser/BmgrOutputParser.java +6 −7 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ public class BmgrOutputParser { private static final Pattern BACKUP_START_PATTERN = Pattern.compile("Running (.*?) backup for (.*?) packages."); private static final Pattern EVENT_PATTERN = Pattern.compile("=> Event\\{(.*?)/(.*?) : package = (.*?)\\(v(.*?)\\)\\}"); Pattern.compile("=> Event\\{(.*?)/(.*?) : package = (.*?)\\(v(.*?)\\).*\\}"); private static final Pattern PACKAGE_RESULT_PATTERN = Pattern.compile("Package (.*?) with result: (.*)"); private static final Pattern BACKUP_FINISHED_PATTERN = Loading Loading @@ -150,15 +150,14 @@ public class BmgrOutputParser { // ----------------------------------------------------------------------------------------- // Errors due to the size of backup // This isn’t treated as an error by BackupTransport. Here it is reported as an error to let // the user decide whether this is intented or not. // This isn’t treated as an error by BackupTransport. Here it is reported as an 'error' to // let the user decide whether this is intented or not. sErrorEventInfoMap.put("NO_DATA_TO_SEND", "App did not provide any backup data."); sErrorEventInfoMap.put( "ERROR_PREFLIGHT", "Backup Preflight check failed. Either the estimated backup size is over quota or" + " there is nothing to backup. Please ensure that backup size is within " + "allowed quota (25MB for Cloud backups, 2GB for device-to-device " + "backups)."); "Backup Preflight check failed. Either the estimated backup size is over quota. " + "Please ensure that backup size is within allowed quota (25MB for Cloud " + "backups, 2GB for device-to-device backups)."); sErrorEventInfoMap.put( "QUOTA_HIT_PREFLIGHT", "App hit quota limit for backup. Estimated backup size > quota (25MB for Cloud " Loading services/robotests/backup/src/com/android/commands/bmgr/outputparser/BmgrOutputParserTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public class BmgrOutputParserTest { String output = "Running non-incremental backup for 2 requested packages.\n" + "Package @pm@ with result: Success\n" + "=> Event{BACKUP_MANAGER_POLICY / ERROR_PREFLIGHT : package = com.example.backuprestore(v1)}\n" + "=> Event{BACKUP_MANAGER_POLICY / ERROR_PREFLIGHT : package = com.example.backuprestore(v1), other keys = android.app.backup.extra.LOG_PREFLIGHT_ERROR}\n" + "Package com.example.backuprestore with result: Transport rejected package because it wasn't able to process it at the time\n" + "Backup finished with result: Success"; Loading @@ -71,7 +71,7 @@ public class BmgrOutputParserTest { + "=> Event{TRANSPORT / UNKNOWN_ID : package = @pm@(v0)}\n" + "Package @pm@ with result: Success\n" + "=> Event{AGENT / AGENT_LOGGING_RESULTS : package = com.example.backuprestore(v1), results = []}\n" + "=> Event{BACKUP_MANAGER_POLICY / NO_DATA_TO_SEND : package = com.example.backuprestore(v1)}\n" + "=> Event{BACKUP_MANAGER_POLICY / NO_DATA_TO_SEND : package = com.example.backuprestore(v1), other keys = some.random.key}\n" + "Package com.example.backuprestore with result: Success\n" + "Backup finished with result: Success"; Loading Loading
cmds/bmgr/library/outputparser-src/com/android/commands/bmgr/outputparser/BmgrOutputParser.java +6 −7 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ public class BmgrOutputParser { private static final Pattern BACKUP_START_PATTERN = Pattern.compile("Running (.*?) backup for (.*?) packages."); private static final Pattern EVENT_PATTERN = Pattern.compile("=> Event\\{(.*?)/(.*?) : package = (.*?)\\(v(.*?)\\)\\}"); Pattern.compile("=> Event\\{(.*?)/(.*?) : package = (.*?)\\(v(.*?)\\).*\\}"); private static final Pattern PACKAGE_RESULT_PATTERN = Pattern.compile("Package (.*?) with result: (.*)"); private static final Pattern BACKUP_FINISHED_PATTERN = Loading Loading @@ -150,15 +150,14 @@ public class BmgrOutputParser { // ----------------------------------------------------------------------------------------- // Errors due to the size of backup // This isn’t treated as an error by BackupTransport. Here it is reported as an error to let // the user decide whether this is intented or not. // This isn’t treated as an error by BackupTransport. Here it is reported as an 'error' to // let the user decide whether this is intented or not. sErrorEventInfoMap.put("NO_DATA_TO_SEND", "App did not provide any backup data."); sErrorEventInfoMap.put( "ERROR_PREFLIGHT", "Backup Preflight check failed. Either the estimated backup size is over quota or" + " there is nothing to backup. Please ensure that backup size is within " + "allowed quota (25MB for Cloud backups, 2GB for device-to-device " + "backups)."); "Backup Preflight check failed. Either the estimated backup size is over quota. " + "Please ensure that backup size is within allowed quota (25MB for Cloud " + "backups, 2GB for device-to-device backups)."); sErrorEventInfoMap.put( "QUOTA_HIT_PREFLIGHT", "App hit quota limit for backup. Estimated backup size > quota (25MB for Cloud " Loading
services/robotests/backup/src/com/android/commands/bmgr/outputparser/BmgrOutputParserTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public class BmgrOutputParserTest { String output = "Running non-incremental backup for 2 requested packages.\n" + "Package @pm@ with result: Success\n" + "=> Event{BACKUP_MANAGER_POLICY / ERROR_PREFLIGHT : package = com.example.backuprestore(v1)}\n" + "=> Event{BACKUP_MANAGER_POLICY / ERROR_PREFLIGHT : package = com.example.backuprestore(v1), other keys = android.app.backup.extra.LOG_PREFLIGHT_ERROR}\n" + "Package com.example.backuprestore with result: Transport rejected package because it wasn't able to process it at the time\n" + "Backup finished with result: Success"; Loading @@ -71,7 +71,7 @@ public class BmgrOutputParserTest { + "=> Event{TRANSPORT / UNKNOWN_ID : package = @pm@(v0)}\n" + "Package @pm@ with result: Success\n" + "=> Event{AGENT / AGENT_LOGGING_RESULTS : package = com.example.backuprestore(v1), results = []}\n" + "=> Event{BACKUP_MANAGER_POLICY / NO_DATA_TO_SEND : package = com.example.backuprestore(v1)}\n" + "=> Event{BACKUP_MANAGER_POLICY / NO_DATA_TO_SEND : package = com.example.backuprestore(v1), other keys = some.random.key}\n" + "Package com.example.backuprestore with result: Success\n" + "Backup finished with result: Success"; Loading