-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemsettings/RunningServices.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.sevtinge.hyperceiler.module.hook.systemsettings; | ||
|
||
import android.content.ComponentName; | ||
import android.content.Intent; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseHook; | ||
|
||
public class RunningServices extends BaseHook { | ||
@Override | ||
public void init() throws NoSuchMethodException { | ||
findAndHookMethod("com.android.settings.SettingsActivity", | ||
"getStartingFragmentClass", Intent.class, | ||
new MethodHook() { | ||
@Override | ||
protected void before(MethodHookParam param) { | ||
Intent intent = (Intent) param.args[0]; | ||
ComponentName componentName = intent.getComponent(); | ||
if (componentName != null) { | ||
String className = componentName.getClassName(); | ||
if ("com.android.settings.RunningServices".equals(className)) { | ||
param.setResult("com.android.settings.applications.RunningServices"); | ||
} | ||
} | ||
} | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<PreferenceCategory> | ||
<Preference | ||
android:title="@string/various_open_aosp_extremely_dark_title"> | ||
<Preference android:title="@string/various_open_aosp_extremely_dark_title"> | ||
<intent | ||
android:targetPackage="com.android.settings" | ||
android:targetClass="com.android.settings.Settings$ReduceBrightColorsSettingsActivity" /> | ||
android:targetClass="com.android.settings.Settings$ReduceBrightColorsSettingsActivity" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
<Preference | ||
android:title="@string/various_open_aosp_battery_title"> | ||
|
||
<Preference android:title="@string/various_open_aosp_battery_title"> | ||
<intent | ||
android:targetPackage="com.android.settings" | ||
android:targetClass="com.android.settings.Settings$HighPowerApplicationsActivity" /> | ||
android:targetClass="com.android.settings.Settings$HighPowerApplicationsActivity" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
<Preference | ||
android:title="@string/various_open_aosp_notification_title"> | ||
|
||
<Preference android:title="@string/various_open_aosp_running_services"> | ||
<intent | ||
android:targetPackage="com.android.settings" | ||
android:targetClass="com.android.settings.Settings$ConfigureNotificationSettingsActivity" /> | ||
android:targetClass="com.android.settings.RunningServices" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
<Preference | ||
android:title="@string/various_open_aosp_app_manage_title"> | ||
|
||
<Preference android:title="@string/various_open_aosp_notification_title"> | ||
<intent | ||
android:targetPackage="com.android.settings" | ||
android:targetClass="com.android.settings.applications.ManageApplications" /> | ||
android:targetClass="com.android.settings.Settings$ConfigureNotificationSettingsActivity" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
<Preference | ||
android:title="@string/various_open_aosp_language_title"> | ||
|
||
<Preference android:title="@string/various_open_aosp_app_manage_title"> | ||
<intent | ||
android:targetPackage="com.android.settings" | ||
android:targetClass="com.android.settings.LanguageSettings" /> | ||
android:targetClass="com.android.settings.applications.ManageApplications" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
|
||
<Preference android:title="@string/various_open_aosp_language_title"> | ||
<intent | ||
android:targetClass="com.android.settings.LanguageSettings" | ||
android:targetPackage="com.android.settings" /> | ||
</Preference> | ||
|
||
</PreferenceCategory> | ||
<Preference android:enabled="false" /> | ||
</PreferenceScreen> |