Commit 679db972 authored by topjohnwu's avatar topjohnwu

Always run su requests in new tasks

parent fbdd7227
......@@ -41,10 +41,9 @@
<activity
android:name="a.m"
android:exported="false"
android:directBootAware="true"
android:excludeFromRecents="true"
android:launchMode="singleTask"
android:taskAffinity="a.m"
android:theme="@style/SuRequest" />
<!-- Receiver -->
......
......@@ -3,7 +3,6 @@ package com.topjohnwu.magisk.components;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.ClassMap;
......@@ -15,7 +14,6 @@ import com.topjohnwu.magisk.container.Policy;
import com.topjohnwu.magisk.uicomponents.Notifications;
import com.topjohnwu.magisk.uicomponents.Shortcuts;
import com.topjohnwu.magisk.utils.DownloadApp;
import com.topjohnwu.magisk.utils.RootUtils;
import com.topjohnwu.magisk.utils.SuLogger;
import com.topjohnwu.superuser.Shell;
......@@ -51,12 +49,9 @@ public class GeneralReceiver extends BroadcastReceiver {
case "request":
Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class))
.putExtra("socket", intent.getStringExtra("socket"))
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (Build.VERSION.CODENAME.equals("Q")) {
RootUtils.startActivity(i);
} else {
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
app.startActivity(i);
}
break;
case "log":
SU_LOGGER.handleLogs(intent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment