From 01f78f708a60bbbe1e3e916f112d14cbab9abdf6 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Wed, 26 Sep 2018 19:40:01 +0200 Subject: [PATCH] Daydream restart crash in store builds fix (#571) --- .../shared/org/mozilla/vrbrowser/ui/RestartDialogWidget.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/RestartDialogWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/RestartDialogWidget.java index b7870ed18..30febb606 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/RestartDialogWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/RestartDialogWidget.java @@ -13,6 +13,7 @@ import android.view.View; import android.widget.TextView; import org.mozilla.vrbrowser.R; +import org.mozilla.vrbrowser.VRBrowserActivity; import org.mozilla.vrbrowser.WidgetPlacement; import org.mozilla.vrbrowser.audio.AudioEngine; @@ -87,11 +88,9 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { } private void handleRestartApp() { - Intent i = getContext().getApplicationContext().getPackageManager() - .getLaunchIntentForPackage(getContext().getApplicationContext().getPackageName()); + Intent i = new Intent(getContext(), VRBrowserActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - getContext().startActivity(i); PendingIntent mPendingIntent = PendingIntent.getActivity(getContext(), 0, i, PendingIntent.FLAG_CANCEL_CURRENT);