DO NOT MERGE. Use resolved path for both checking and opening. am: 8a2e551874 am...
Jeff Sharkey [Thu, 21 Jan 2016 05:05:05 +0000 (05:05 +0000)]
am: 8814493bfd

* commit '8814493bfdf1dc52d8aebe848e28b7f0652af18d':
  DO NOT MERGE. Use resolved path for both checking and opening.

ui/src/com/android/providers/downloads/ui/TrampolineActivity.java

index f96c04e..104f144 100644 (file)
@@ -152,7 +152,10 @@ public class TrampolineActivity extends Activity {
         @Override
         public void onDismiss(DialogInterface dialog) {
             super.onDismiss(dialog);
-            getActivity().finish();
+            final Activity activity = getActivity();
+            if (activity != null) {
+                activity.finish();
+            }
         }
     }
 
@@ -221,7 +224,10 @@ public class TrampolineActivity extends Activity {
         @Override
         public void onDismiss(DialogInterface dialog) {
             super.onDismiss(dialog);
-            getActivity().finish();
+            final Activity activity = getActivity();
+            if (activity != null) {
+                activity.finish();
+            }
         }
     }
 }