diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-05-11 14:22:59 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-17 10:23:56 -0700 |
commit | 9030d9235aabf7c45687f68801f9a4a09f9b776f (patch) | |
tree | 592aa3c30f01ccdd406b3584d8e4fdbeb2d3f0db /src | |
parent | d10f6950c4321409d35476b934f09241b4a1b345 (diff) | |
download | packages_apps_Settings-9030d9235aabf7c45687f68801f9a4a09f9b776f.zip packages_apps_Settings-9030d9235aabf7c45687f68801f9a4a09f9b776f.tar.gz packages_apps_Settings-9030d9235aabf7c45687f68801f9a4a09f9b776f.tar.bz2 |
Settings: Ignore process kill receiver events if activity is destroyed.
Following the logic for refresh ui attempts to getContext() from the
underlying activity which may have already been destroyed causing
an NPE.
Change-Id: Ibe110022ebedcc55a01f3bda66501580c8d92fed
TICKET: NIGHTLIES-2935
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/settings/applications/InstalledAppDetails.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index f2e6392..cc1b241 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -1019,8 +1019,10 @@ public class InstalledAppDetails extends AppInfoBase private final BroadcastReceiver mCheckKillProcessesReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - updateForceStopButton(getResultCode() != Activity.RESULT_CANCELED); - refreshUi(); + if (getActivity() != null && !getActivity().isDestroyed()) { + updateForceStopButton(getResultCode() != Activity.RESULT_CANCELED); + refreshUi(); + } } }; |