Enable resources hook if necessary (#1351)

This commit is contained in:
LoveSy 2021-11-02 21:56:14 +08:00 committed by GitHub
parent 449b48e77f
commit a160bdca9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 12 additions and 149 deletions

View File

@ -137,25 +137,6 @@ public class ConfigManager {
return list;
}
public static boolean isResourceHookEnabled() {
try {
return LSPManagerServiceHolder.getService().isResourceHook();
} catch (RemoteException e) {
Log.e(App.TAG, Log.getStackTraceString(e));
return false;
}
}
public static boolean setResourceHookEnabled(boolean enabled) {
try {
LSPManagerServiceHolder.getService().setResourceHook(enabled);
return true;
} catch (RemoteException e) {
Log.e(App.TAG, Log.getStackTraceString(e));
return false;
}
}
public static boolean isAddShortcut() {
try {
return LSPManagerServiceHolder.getService().isAddShortcut();

View File

@ -152,13 +152,6 @@ public class SettingsFragment extends BaseFragment {
ConfigManager.setVerboseLogEnabled(!(boolean) newValue));
}
SwitchPreference prefEnableResources = findPreference("enable_resources");
if (prefEnableResources != null) {
prefEnableResources.setEnabled(installed);
prefEnableResources.setChecked(installed && ConfigManager.isResourceHookEnabled());
prefEnableResources.setOnPreferenceChangeListener((preference, newValue) -> ConfigManager.setResourceHookEnabled((boolean) newValue));
}
SwitchPreference prefEnableShortcut = findPreference("enable_auto_add_shortcut");
if (prefEnableShortcut != null) {
prefEnableShortcut.setEnabled(installed);

View File

@ -149,8 +149,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\n لا شيء هنا</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">إطار العمل</string>
<string name="settings_enable_resources">تمكين روابط المصادر</string>
<string name="settings_enable_resources_summary"><b>تحذير:</b> روابط المصادر تجريبية</string>
<string name="pref_title_disable_verbose_log">تعطيل السجلات المفصّلة</string>
<string name="pure_black_dark_theme">السمة السوداء المظلمة</string>
<string name="pure_black_dark_theme_summary">استخدام السمة السوداء الخالصة إذا تم تمكين السمة المظلمة</string>

View File

@ -146,8 +146,6 @@ Gerät wird nach dem Update neu gestartet</string>
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNichts hier</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Aktivieren Sie die Ressourcen-Hooks</string>
<string name="settings_enable_resources_summary"><b>Warnung:</b> Ressourcen-Hooks sind experimentell</string>
<string name="pref_title_disable_verbose_log">Deaktivieren Sie ausführliche Protokolle</string>
<string name="pure_black_dark_theme">Verwenden Sie das dunkelschwarze Thema</string>
<string name="pure_black_dark_theme_summary">Das schwarze Thema verwenden, wenn dunkles Thema aktiviert ist</string>

View File

@ -141,8 +141,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNo hay nada por aquí</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Activar hooks de recursos</string>
<string name="settings_enable_resources_summary"><b>ADVERTENCIA:</b> los hooks de recursos son experimentales</string>
<string name="pref_title_disable_verbose_log">Desactivar registros detallados</string>
<string name="pure_black_dark_theme">Tema negro oscuro</string>
<string name="pure_black_dark_theme_summary">Usar el tema negro puro si el tema oscuro está activado</string>

View File

@ -135,8 +135,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nهیچی اینجا نیس</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">فریمورک</string>
<string name="settings_enable_resources">قلاب منابع (ریسورس هوک) را فعال کنید</string>
<string name="settings_enable_resources_summary"><b>هشدار:</b> قلاب منابع آزمایشی است</string>
<string name="pref_title_disable_verbose_log">غیرفعال کردن سیاهه دقیق</string>
<string name="pure_black_dark_theme">تم مشکی تیره</string>
<string name="pure_black_dark_theme_summary">استفاده از مشکی خالص در صورت فعال بودن تم سیاه</string>

View File

@ -145,8 +145,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nIl n\y a rien ici</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Sous-système</string>
<string name="settings_enable_resources">Activer les crochets de ressources</string>
<string name="settings_enable_resources_summary"><b>AVERTISSEMENT:</b> Les crochets de ressources sont expérimentaux</string>
<string name="pref_title_disable_verbose_log">Désactiver les journaux détaillés</string>
<string name="pure_black_dark_theme">Thème noir et sombre</string>
<string name="pure_black_dark_theme_summary">Utiliser le thème noir pûre si le thème noir est activé</string>

View File

@ -100,7 +100,6 @@
<!-- ModulesActivity and AppListActivity -->
<string name="module_app_info">מידע על האפליקציה</string>
<!-- SettingsActivity -->
<string name="settings_enable_resources_summary"><b>אזהרה:</b> Resource hooks are experimental</string>
<string name="pref_title_disable_verbose_log">בטל verbose logs</string>
<string name="pure_black_dark_theme">ערכת נושא שחור כהה</string>
<string name="settings_group_theme">ערכת נושא</string>

View File

@ -139,8 +139,6 @@
<string name="list_empty">\"\\\\_(ツ)_\/¯\nTidak ada apa-apa di sini</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Kerangka</string>
<string name="settings_enable_resources">Aktifkan kait sumber daya</string>
<string name="settings_enable_resources_summary"><b>PERINGATAN:</b> Kait sumber daya bersifat eksperimental</string>
<string name="pref_title_disable_verbose_log">Nonaktifkan log lengkap</string>
<string name="pure_black_dark_theme">Tema hitam gelap</string>
<string name="pure_black_dark_theme_summary">Gunakan tema hitam murni jika tema gelap diaktifkan</string>

View File

@ -132,8 +132,6 @@
<string name="list_empty">\"\\\\_(ツ)_\/¯\nTidak ada apa-apa di sini</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Kerangka</string>
<string name="settings_enable_resources">Aktifkan kait sumber daya</string>
<string name="settings_enable_resources_summary"><b>PERINGATAN:</b> Kait sumber daya bersifat eksperimental</string>
<string name="pref_title_disable_verbose_log">Nonaktifkan log lengkap</string>
<string name="pure_black_dark_theme">Tema hitam gelap</string>
<string name="pure_black_dark_theme_summary">Gunakan tema hitam murni jika tema gelap diaktifkan</string>

View File

@ -145,8 +145,6 @@
<string name="list_empty">¯\\\\_(ツ)_\\/¯\nNon c\'è nulla qui</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Abilita gli hook delle risorse</string>
<string name="settings_enable_resources_summary"><b>ATTENZIONE:</b> Gli hook delle risorse sono una funzionalità sperimentale</string>
<string name="pref_title_disable_verbose_log">Disabilita il log verboso</string>
<string name="pure_black_dark_theme">Tema nero scuro</string>
<string name="pure_black_dark_theme_summary">Usa il tema nero puro quando è abilitato il tema scuro</string>

View File

@ -101,7 +101,6 @@
<!-- ModulesActivity and AppListActivity -->
<string name="module_app_info">מידע על האפליקציה</string>
<!-- SettingsActivity -->
<string name="settings_enable_resources_summary"><b>אזהרה:</b> Resource hooks are experimental</string>
<string name="pref_title_disable_verbose_log">בטל verbose logs</string>
<string name="pure_black_dark_theme">ערכת נושא שחור כהה</string>
<string name="pure_black_dark_theme_summary">השתמש בערכת נושא שחור טהור אם ערכת נושא כהה מופעלת</string>

View File

@ -134,8 +134,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nリストは空です</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">フレームワーク</string>
<string name="settings_enable_resources">リソースフックを有効化</string>
<string name="settings_enable_resources_summary"><b>警告:</b> リソースフックは実験的機能です</string>
<string name="pref_title_disable_verbose_log">詳細ログの無効化</string>
<string name="pure_black_dark_theme">ブラックダークテーマ</string>
<string name="pure_black_dark_theme_summary">ダークテーマ有効時にピュアブラックのテーマを使用</string>

View File

@ -124,8 +124,6 @@
<string name="module_app_info">앱 정보</string>
<string name="list_empty">¯\\\\_(ツ)_\/¯\n아무것도 없음</string>
<!-- SettingsActivity -->
<string name="settings_enable_resources">리소스 후크 사용</string>
<string name="settings_enable_resources_summary"><b>경고:</b> 리소스 후크가 실험적입니다. </string>
<string name="pref_title_disable_verbose_log">상세 로그 사용 안 함</string>
<string name="pure_black_dark_theme">블랙 다크 테마</string>
<string name="pure_black_dark_theme_summary">다크 테마가 활성화된 경우 순수 검은색 테마를 사용합니다.</string>

View File

@ -145,8 +145,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNiets hier</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Schakel resource-hooks in</string>
<string name="settings_enable_resources_summary"><b>WAARSCHUWING:</b> Resource-hooks zijn experimenteel</string>
<string name="pref_title_disable_verbose_log">Schakel uitgebreide logboeken uit</string>
<string name="pure_black_dark_theme">Zwarte donkere thema</string>
<string name="pure_black_dark_theme_summary">Gebruik het pure zwarte thema als het donkere thema is ingeschakeld</string>

View File

@ -142,8 +142,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNic tu nie ma</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Włącz podpinanie zasobów</string>
<string name="settings_enable_resources_summary"><b>OSTRZEŻENIE:</b> Podpinanie zasobów jest funkcją eksperymentalną</string>
<string name="pref_title_disable_verbose_log">Wyłącz logi</string>
<string name="pure_black_dark_theme">Czarny ciemny motyw</string>
<string name="pure_black_dark_theme_summary">Użyj czarnego motywu, jeśli ciemny motyw jest włączony</string>

View File

@ -140,8 +140,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNada encontrado</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Ativar hooks de recursos</string>
<string name="settings_enable_resources_summary"><b>AVISO:</b> Hooks de recursos são experimentais</string>
<string name="pref_title_disable_verbose_log">Desativar registros detalhados</string>
<string name="pure_black_dark_theme">Tema preto puro</string>
<string name="pure_black_dark_theme_summary">Use o tema preto puro se o tema noturno estiver ativo</string>

View File

@ -79,8 +79,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNada aqui</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Ativar injeção de recursos</string>
<string name="settings_enable_resources_summary"><b>AVISO:</b> Injeção de recursos é experimental</string>
<string name="pref_title_disable_verbose_log">Desativar logs detalhados</string>
<string name="pure_black_dark_theme">Tema preto</string>
<string name="pure_black_dark_theme_summary">Usar o tema preto puro se o tema escuro estiver ativado</string>

View File

@ -97,8 +97,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nNada aqui</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Ativar injeção de recursos</string>
<string name="settings_enable_resources_summary"><b>AVISO:</b> Injeção de recursos é experimental</string>
<string name="pref_title_disable_verbose_log">Desativar logs detalhados</string>
<string name="pure_black_dark_theme">Tema preto</string>
<string name="pure_black_dark_theme_summary">Usar o tema preto puro se o tema escuro estiver ativado</string>

View File

@ -147,8 +147,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nЗдесь ничего нет</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Фреймворк</string>
<string name="settings_enable_resources">Включить перехват ресурсов</string>
<string name="settings_enable_resources_summary"><b>ВНИМАНИЕ:</b> Перехват ресурсов работает в экспериментальном режиме</string>
<string name="pref_title_disable_verbose_log">Выключить подробные логи</string>
<string name="pure_black_dark_theme">Черная тема</string>
<string name="pure_black_dark_theme_summary">Использовать черную тему, когда включена темная тема</string>

View File

@ -141,8 +141,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nModül bulunamadı</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Çerçeve</string>
<string name="settings_enable_resources">Kaynak kancalarını etkinleştir</string>
<string name="settings_enable_resources_summary"><b>UYARI:</b> Kaynak kancaları deneyseldir</string>
<string name="pref_title_disable_verbose_log">Ayrıntılı günlükleri devre dışı bırak</string>
<string name="pure_black_dark_theme">Siyah koyu tema</string>
<string name="pure_black_dark_theme_summary">Koyu tema etkinse saf siyah temayı kullanın</string>

View File

@ -139,8 +139,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nТут нічого немає</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Фреймворк</string>
<string name="settings_enable_resources">Увімкнути хуки ресурсів</string>
<string name="settings_enable_resources_summary"><b>УВАГА:</b> Хуки ресурсів є експериментальним</string>
<string name="pref_title_disable_verbose_log">Вимкнути детальні журнали</string>
<string name="pure_black_dark_theme">Чорна темна тема</string>
<string name="pure_black_dark_theme_summary">Використовувати чисту чорну тему, якщо темна тема включена</string>

View File

@ -144,8 +144,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\nKhông có gì ở đây cả</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Kích hoạt can thiệp vào tài nguyên</string>
<string name="settings_enable_resources_summary"><b>CẢNH BÁO:</b> Can thiệp vào tài nguyên chỉ là thử nghiệm</string>
<string name="pref_title_disable_verbose_log">Vô hiệu hoá nhật ký chi tiết</string>
<string name="pure_black_dark_theme">Chủ đề Đen - Tối</string>
<string name="pure_black_dark_theme_summary">Sử dụng chủ đề đen nếu chủ đề tối được bật</string>

View File

@ -148,8 +148,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\n空空如也</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">框架</string>
<string name="settings_enable_resources">启用资源钩子</string>
<string name="settings_enable_resources_summary"><b>警告: </b> 资源钩子为实验性的特性</string>
<string name="pref_title_disable_verbose_log">禁用详细日志</string>
<string name="pure_black_dark_theme">黑色主题</string>
<string name="pure_black_dark_theme_summary">当深色主题启用时使用纯黑色主题</string>

View File

@ -146,8 +146,6 @@
<string name="list_empty">¯\\\\_(ツ)_\/¯\n這裡甚麼都沒有</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">框架</string>
<string name="settings_enable_resources">啟用資源鈎子</string>
<string name="settings_enable_resources_summary"><b>警告: </b> 資源鈎子為實驗性質</string>
<string name="pref_title_disable_verbose_log">禁用詳細紀錄檔</string>
<string name="pure_black_dark_theme">黑色主題</string>
<string name="pure_black_dark_theme_summary">使用純黑色背景當深色模式已啟用</string>

View File

@ -144,8 +144,6 @@
<string name="list_empty">¯\_(ツ)_/¯\n空空如也</string>
<!-- SettingsActivity -->
<string name="settings_group_framework">框架</string>
<string name="settings_enable_resources">啟用資源鉤子</string>
<string name="settings_enable_resources_summary"><b>警告:</b> 資源鉤子為試驗性功能</string>
<string name="pref_title_disable_verbose_log">停用詳細日誌</string>
<string name="pure_black_dark_theme">黑色主題</string>
<string name="pure_black_dark_theme_summary">當深色主題啟用時使用純黑色主題</string>

View File

@ -156,8 +156,6 @@
<!-- SettingsActivity -->
<string name="settings_group_framework">Framework</string>
<string name="settings_enable_resources">Enable resource hooks</string>
<string name="settings_enable_resources_summary"><b>WARNING:</b> Resource hooks are experimental</string>
<string name="pref_title_disable_verbose_log">Disable verbose logs</string>
<string name="pure_black_dark_theme">Black dark theme</string>
<string name="pure_black_dark_theme_summary">Use the pure black theme if dark theme is enabled</string>

View File

@ -78,15 +78,6 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_group_framework">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_outline_science_24"
android:key="enable_resources"
android:persistent="false"
android:summary="@string/settings_enable_resources_summary"
android:title="@string/settings_enable_resources" />
<SwitchPreference
android:defaultValue="false"
android:key="disable_verbose_log"

View File

@ -79,15 +79,6 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_group_framework">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_outline_science_24"
android:key="enable_resources"
android:persistent="false"
android:summary="@string/settings_enable_resources_summary"
android:title="@string/settings_enable_resources" />
<SwitchPreference
android:defaultValue="false"
android:key="disable_verbose_log"

View File

@ -5,8 +5,6 @@ import org.lsposed.lspd.models.Module;
interface ILSPApplicationService {
IBinder requestModuleBinder(String name);
boolean isResourcesHookEnabled();
List<Module> getModulesList(String processName);
String getPrefsPath(String packageName);

View File

@ -21,6 +21,7 @@
package de.robv.android.xposed;
import static org.lsposed.lspd.config.LSPApplicationServiceClient.serviceClient;
import static org.lsposed.lspd.deopt.PrebuiltMethodsDeopter.deoptResourceMethods;
import static de.robv.android.xposed.XposedBridge.hookAllMethods;
import static de.robv.android.xposed.XposedBridge.sInitPackageResourcesCallbacks;
import static de.robv.android.xposed.XposedBridge.sInitZygoteCallbacks;
@ -53,7 +54,6 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
@ -68,12 +68,15 @@ public final class XposedInit {
public static boolean startsSystemServer = false;
public static volatile boolean disableResources = false;
public static AtomicBoolean resourceInit = new AtomicBoolean(false);
public static void hookResources() throws Throwable {
if (!serviceClient.isResourcesHookEnabled() || disableResources) {
if (disableResources || !resourceInit.compareAndSet(false, true)) {
return;
}
deoptResourceMethods();
if (!ResourcesHook.initXResourcesNative()) {
Log.e(TAG, "Cannot hook resources");
disableResources = true;
@ -308,9 +311,6 @@ public final class XposedInit {
if (!IXposedMod.class.isAssignableFrom(moduleClass)) {
Log.e(TAG, " This class doesn't implement any sub-interface of IXposedMod, skipping it");
continue;
} else if (disableResources && IXposedHookInitPackageResources.class.isAssignableFrom(moduleClass)) {
Log.e(TAG, " This class requires resource-related hooks (which are disabled), skipping it.");
continue;
}
final Object moduleInstance = moduleClass.newInstance();
@ -333,6 +333,7 @@ public final class XposedInit {
}
if (moduleInstance instanceof IXposedHookInitPackageResources) {
hookResources();
XposedBridge.hookInitPackageResources(new IXposedHookInitPackageResources.Wrapper(
(IXposedHookInitPackageResources) moduleInstance, apk));
count++;

View File

@ -1,7 +1,6 @@
package org.lsposed.lspd.config;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import org.lsposed.lspd.models.Module;
import org.lsposed.lspd.service.ILSPApplicationService;
@ -15,9 +14,6 @@ abstract public class ApplicationServiceClient implements ILSPApplicationService
@Override
abstract public IBinder requestModuleBinder(String name);
@Override
abstract public boolean isResourcesHookEnabled();
@Override
abstract public List<Module> getModulesList(String processName);

View File

@ -69,15 +69,6 @@ public class LSPApplicationServiceClient extends ApplicationServiceClient {
return null;
}
@Override
public boolean isResourcesHookEnabled() {
try {
return service.isResourcesHookEnabled();
} catch (RemoteException | NullPointerException ignored) {
}
return false;
}
@Override
public List<Module> getModulesList(String processName) {
try {

View File

@ -69,7 +69,6 @@ public class Main {
// Initialize the Xposed framework
try {
startBootstrapHook(isSystem, appDataDir);
XposedInit.hookResources();
} catch (Throwable t) {
Utils.logE("error during Xposed initialization", t);
}

View File

@ -60,8 +60,11 @@ public class PrebuiltMethodsDeopter {
public static void deoptBootMethods() {
// todo check if has been done before
deoptMethods(KEY_BOOT_IMAGE, null);
if (Utils.isMIUI && serviceClient.isResourcesHookEnabled()) {
//deopt these only for MIUI with resources hook enabled
}
public static void deoptResourceMethods() {
if (Utils.isMIUI) {
//deopt these only for MIUI
deoptMethods(KEY_BOOT_IMAGE_MIUI_RES, null);
}
}

View File

@ -81,7 +81,6 @@ public class ConfigManager {
private final SQLiteDatabase db =
SQLiteDatabase.openOrCreateDatabase(ConfigFileManager.dbPath, null);
private boolean resourceHook = false;
private boolean verboseLog = true;
private boolean autoAddShortcut = true;
private String miscPath = null;
@ -207,10 +206,7 @@ public class ConfigManager {
private synchronized void updateConfig() {
Map<String, Object> config = getModulePrefs("lspd", 0, "config");
Object bool = config.get("enable_resources");
resourceHook = bool != null && (boolean) bool;
bool = config.get("enable_verbose_log");
Object bool = config.get("enable_verbose_log");
verboseLog = bool == null || (boolean) bool;
bool = config.get("enable_auto_add_shortcut");
@ -787,11 +783,6 @@ public class ConfigManager {
cacheScopes();
}
public void setResourceHook(boolean resourceHook) {
updateModulePrefs("lspd", 0, "config", "enable_resources", resourceHook);
this.resourceHook = resourceHook;
}
public void setVerboseLog(boolean on) {
if (BuildConfig.DEBUG) return;
var logcatService = ServiceManager.getLogcatService();
@ -813,10 +804,6 @@ public class ConfigManager {
this.autoAddShortcut = on;
}
public boolean resourceHook() {
return resourceHook;
}
public boolean verboseLog() {
return BuildConfig.DEBUG || verboseLog;
}

View File

@ -66,12 +66,6 @@ public class LSPApplicationService extends ILSPApplicationService.Stub {
}
}
@Override
public boolean isResourcesHookEnabled() throws RemoteException {
ensureRegistered();
return ConfigManager.getInstance().resourceHook();
}
@Override
public List<Module> getModulesList(String processName) throws RemoteException {
ensureRegistered();

View File

@ -553,16 +553,6 @@ public class LSPManagerService extends ILSPManagerService.Stub {
return ConfigManager.getInstance().disableModule(packageName);
}
@Override
public boolean isResourceHook() {
return ConfigManager.getInstance().resourceHook();
}
@Override
public void setResourceHook(boolean enabled) {
ConfigManager.getInstance().setResourceHook(enabled);
}
@Override
public boolean isAddShortcut() {
return ConfigManager.getInstance().isAddShortcut();

View File

@ -20,10 +20,6 @@ interface ILSPManagerService {
ParceledListSlice<Application> getModuleScope(String packageName) = 7;
boolean isResourceHook() = 9;
void setResourceHook(boolean enabled) = 10;
boolean isVerboseLog() = 11;
void setVerboseLog(boolean enabled) = 12;