-
Notifications
You must be signed in to change notification settings - Fork 149
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
7 changed files
with
130 additions
and
119 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
5 changes: 3 additions & 2 deletions
5
app/src/main/java/com/sevtinge/hyperceiler/module/app/Demo.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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package com.sevtinge.hyperceiler.module.app; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseModule; | ||
import com.sevtinge.hyperceiler.module.hook.demo.CrashDemo; | ||
import com.sevtinge.hyperceiler.module.hook.demo.ColorTest; | ||
import com.sevtinge.hyperceiler.module.hook.demo.ToastTest; | ||
|
||
public class Demo extends BaseModule { | ||
@Override | ||
public void handleLoadPackage() { | ||
initHook(new ToastTest(), true); | ||
initHook(new CrashDemo(), true); | ||
// initHook(new CrashDemo(), true); | ||
initHook(new ColorTest(), true); | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/sevtinge/hyperceiler/module/hook/demo/ColorTest.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,19 @@ | ||
package com.sevtinge.hyperceiler.module.hook.demo; | ||
|
||
import android.graphics.Color; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseHook; | ||
|
||
public class ColorTest extends BaseHook { | ||
@Override | ||
public void init() throws NoSuchMethodException { | ||
findAndHookMethod("com.hchen.demo.MainActivity", "setColor", | ||
new MethodHook() { | ||
@Override | ||
protected void before(MethodHookParam param) { | ||
mResHook.setObjectReplacement("com.hchen.demo", "color", "my_test_color", Color.RED); | ||
} | ||
} | ||
); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.../main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.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,23 @@ | ||
package com.sevtinge.hyperceiler.module.hook.systemui.navigation; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseHook; | ||
|
||
public class HandleLineCustom extends BaseHook { | ||
@Override | ||
public void init() throws NoSuchMethodException { | ||
float mNavigationHandleRadius = (float) mPrefsMap.getInt("system_ui_navigation_handle_custom_thickness", 185) / 100; | ||
try { | ||
mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_handle_radius", mNavigationHandleRadius); | ||
} catch (Exception e) { | ||
logE(TAG, e.toString()); | ||
} | ||
int mNavigationHandleLightColor = | ||
mPrefsMap.getInt("system_ui_navigation_handle_custom_color", -872415232); | ||
int mNavigationHandleDarkColor = | ||
mPrefsMap.getInt("system_ui_navigation_handle_custom_color_dark", -1); | ||
mResHook.setObjectReplacement("com.android.systemui", "color", | ||
"navigation_bar_home_handle_dark_color", mNavigationHandleDarkColor); | ||
mResHook.setObjectReplacement("com.android.systemui", "color", | ||
"navigation_bar_home_handle_light_color", mNavigationHandleLightColor); | ||
} | ||
} |
103 changes: 0 additions & 103 deletions
103
...rc/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.kt
This file was deleted.
Oops, something went wrong.