Fix NPE in BackupManagerService

If none of the requested packages are valid packages,
we'd run into this issue where PerformBackupTask#mQueue
is null but we try to iterate over it in finalizeBackup()
Fix is to use an empty queue as the default value instead
of null.

Bug: 35380067
Test: Manually tested by trying to backup a non-existent package.
Change-Id: Ibb2d03d5f8270bcb448ee083ee02964236aca92b
This commit is contained in:
Shreyas Basarge
2017-02-16 14:54:47 +00:00
parent 2c02bd1cf0
commit 2d096ee435

View File

@@ -2607,6 +2607,7 @@ public class BackupManagerService {
boolean userInitiated, boolean nonIncremental) {
mTransport = transport;
mOriginalQueue = queue;
mQueue = new ArrayList<>();
mJournal = journal;
mObserver = observer;
mMonitor = monitor;