From d1f301e05993fefc17a5beadd8b60378dce70901 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 14 Jun 2018 02:31:31 +0800 Subject: [PATCH] Improve stub manager --- src/full/AndroidManifest.xml | 2 +- src/main/AndroidManifest.xml | 2 +- src/stub/AndroidManifest.xml | 8 +++++++- .../topjohnwu/magisk/receivers/BootLauncher.java | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/stub/java/com/topjohnwu/magisk/receivers/BootLauncher.java diff --git a/src/full/AndroidManifest.xml b/src/full/AndroidManifest.xml index 2e2f59434..089a603e0 100644 --- a/src/full/AndroidManifest.xml +++ b/src/full/AndroidManifest.xml @@ -3,8 +3,8 @@ package="com.topjohnwu.magisk"> + - - + + + + + + + - \ No newline at end of file + diff --git a/src/stub/java/com/topjohnwu/magisk/receivers/BootLauncher.java b/src/stub/java/com/topjohnwu/magisk/receivers/BootLauncher.java new file mode 100644 index 000000000..8f7060bea --- /dev/null +++ b/src/stub/java/com/topjohnwu/magisk/receivers/BootLauncher.java @@ -0,0 +1,16 @@ +package com.topjohnwu.magisk.receivers; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +import com.topjohnwu.magisk.NoUIActivity; + +public class BootLauncher extends BroadcastReceiver { + @Override + public void onReceive(Context context, Intent intent) { + Intent i = new Intent(context, NoUIActivity.class); + i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(i); + } +}