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

Commit 9856aae

Browse files
MortimerGorobluemarvin
authored andcommitted
Fix package name when the activities are restarted (#1502)
1 parent 6f68a9a commit 9856aae

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/src/common/shared/org/mozilla/vrbrowser/crashreporting/CrashReporterService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ protected void onHandleWork(@NonNull Intent intent) {
7373

7474
if (!otherProcessesFound) {
7575
intent.setClass(CrashReporterService.this, VRBrowserActivity.class);
76+
intent.setPackage(BuildConfig.APPLICATION_ID);
7677
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
7778
startActivity(intent);
7879
break;

app/src/common/shared/org/mozilla/vrbrowser/utils/SystemUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77

88
import androidx.annotation.NonNull;
99

10+
import org.mozilla.vrbrowser.BuildConfig;
1011
import org.mozilla.vrbrowser.VRBrowserActivity;
1112

1213
public class SystemUtils {
1314

1415
public static final void restart(@NonNull Context context) {
1516
Intent i = new Intent(context, VRBrowserActivity.class);
17+
i.setPackage(BuildConfig.APPLICATION_ID);
1618
context.startActivity(i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK));
1719
}
1820

1921
public static final void scheduleRestart(@NonNull Context context, long delay) {
2022
Intent i = new Intent(context, VRBrowserActivity.class);
23+
i.setPackage(BuildConfig.APPLICATION_ID);
2124
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
2225
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
2326

0 commit comments

Comments
 (0)