mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Add DirectBoot support to receivers and SuRequestActivity
Close #1032, courtesy of @vvb2060
This commit is contained in:
@@ -6,6 +6,7 @@ import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.topjohnwu.magisk.components.BaseActivity;
|
||||
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
|
||||
import com.topjohnwu.magisk.tasks.UpdateRepos;
|
||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
||||
import com.topjohnwu.magisk.uicomponents.Shortcuts;
|
||||
@@ -67,6 +68,9 @@ public class SplashActivity extends BaseActivity {
|
||||
// Setup shortcuts
|
||||
Shortcuts.setup(this);
|
||||
|
||||
// Create repo database
|
||||
app.repoDB = new RepoDatabaseHelper(this);
|
||||
|
||||
// Magisk working as expected
|
||||
if (Shell.rootAccess() && Config.magiskVersionCode > 0) {
|
||||
// Load modules
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.topjohnwu.magisk.components.BaseActivity;
|
||||
import com.topjohnwu.magisk.container.Policy;
|
||||
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
||||
import com.topjohnwu.magisk.utils.SuConnector;
|
||||
import com.topjohnwu.magisk.utils.Utils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -75,7 +76,7 @@ public class SuRequestActivity extends BaseActivity {
|
||||
|
||||
PackageManager pm = getPackageManager();
|
||||
app.mDB.clearOutdated();
|
||||
timeoutPrefs = getSharedPreferences("su_timeout", 0);
|
||||
timeoutPrefs = Utils.getDEContext().getSharedPreferences("su_timeout", 0);
|
||||
|
||||
// Get policy
|
||||
Intent intent = getIntent();
|
||||
|
||||
Reference in New Issue
Block a user