mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
Always run su requests in new tasks
This commit is contained in:
parent
fbdd72273e
commit
679db97209
@ -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 {
|
||||
app.startActivity(i);
|
||||
}
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||
app.startActivity(i);
|
||||
break;
|
||||
case "log":
|
||||
SU_LOGGER.handleLogs(intent);
|
||||
|
Loading…
Reference in New Issue
Block a user