From 3a5a774954d28911bbf9eaa7dfd8329a085fbdc5 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 1 Apr 2013 16:04:28 -0700 Subject: [PATCH] Fixing NPE on screenshot error. (Bug 8328886) Change-Id: Id47b8429c512c02e63d86de2ce37bd8e3ee02359 --- .../systemui/screenshot/GlobalScreenshot.java | 31 +++++----------------- .../systemui/screenshot/TakeScreenshotService.java | 3 --- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index b49836840c15..5041617fb718 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -76,11 +76,13 @@ class SaveImageInBackgroundData { int result; void clearImage() { - context = null; image = null; imageUri = null; iconSize = 0; } + void clearContext() { + context = null; + } } /** @@ -172,8 +174,6 @@ class SaveImageInBackgroundTask extends AsyncTask