Merge "Fix crash when rotating HighPowerDetail dialog"
diff --git a/src/com/android/settings/fuelgauge/HighPowerDetail.java b/src/com/android/settings/fuelgauge/HighPowerDetail.java
index 6946f62..daa72da 100644
--- a/src/com/android/settings/fuelgauge/HighPowerDetail.java
+++ b/src/com/android/settings/fuelgauge/HighPowerDetail.java
@@ -131,7 +131,7 @@
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
Fragment target = getTargetFragment();
- if (target != null) {
+ if (target != null && target.getActivity() != null) {
target.onActivityResult(getTargetRequestCode(), 0, null);
}
}