Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Daydream restart crash in store builds fix (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored and bluemarvin committed Sep 26, 2018
1 parent f864438 commit 01f78f7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 01f78f7

Please sign in to comment.