From c9e584b4228512173224900219cb71b3f7e21151 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 12 Apr 2016 12:36:47 -0700 Subject: [PATCH] Only invoke k/v helpers during k/v operations In particular, don't try to call the k/v wallpaper restore helper's onRestoreFinished() if we are actually doing a full-data restore. Bug 28132784 Change-Id: I2eaf748f6d54601f0ca195ae2781aa177daf0b93 --- core/java/com/android/server/backup/SystemBackupAgent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/server/backup/SystemBackupAgent.java b/core/java/com/android/server/backup/SystemBackupAgent.java index 3e4530944b9e..9d296fa19400 100644 --- a/core/java/com/android/server/backup/SystemBackupAgent.java +++ b/core/java/com/android/server/backup/SystemBackupAgent.java @@ -183,6 +183,9 @@ public class SystemBackupAgent extends BackupAgentHelper { @Override public void onRestoreFinished() { - mWallpaperHelper.onRestoreFinished(); + // helper will be null following 'adb restore' or other full-data operation + if (mWallpaperHelper != null) { + mWallpaperHelper.onRestoreFinished(); + } } } -- 2.11.0