Always run su requests in new tasks
This commit is contained in:
parent
fbdd72273e
commit
679db97209
@ -41,10 +41,9 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="a.m"
|
android:name="a.m"
|
||||||
|
android:exported="false"
|
||||||
android:directBootAware="true"
|
android:directBootAware="true"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:taskAffinity="a.m"
|
|
||||||
android:theme="@style/SuRequest" />
|
android:theme="@style/SuRequest" />
|
||||||
|
|
||||||
<!-- Receiver -->
|
<!-- Receiver -->
|
||||||
|
@ -3,7 +3,6 @@ package com.topjohnwu.magisk.components;
|
|||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
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.Notifications;
|
||||||
import com.topjohnwu.magisk.uicomponents.Shortcuts;
|
import com.topjohnwu.magisk.uicomponents.Shortcuts;
|
||||||
import com.topjohnwu.magisk.utils.DownloadApp;
|
import com.topjohnwu.magisk.utils.DownloadApp;
|
||||||
import com.topjohnwu.magisk.utils.RootUtils;
|
|
||||||
import com.topjohnwu.magisk.utils.SuLogger;
|
import com.topjohnwu.magisk.utils.SuLogger;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
@ -51,12 +49,9 @@ public class GeneralReceiver extends BroadcastReceiver {
|
|||||||
case "request":
|
case "request":
|
||||||
Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class))
|
Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class))
|
||||||
.putExtra("socket", intent.getStringExtra("socket"))
|
.putExtra("socket", intent.getStringExtra("socket"))
|
||||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
if (Build.VERSION.CODENAME.equals("Q")) {
|
.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||||
RootUtils.startActivity(i);
|
app.startActivity(i);
|
||||||
} else {
|
|
||||||
app.startActivity(i);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "log":
|
case "log":
|
||||||
SU_LOGGER.handleLogs(intent);
|
SU_LOGGER.handleLogs(intent);
|
||||||
|
Loading…
Reference in New Issue
Block a user