accelforce / DevOptsHide

Shows enabled developer options as disabled per app
135 stars 4 forks source link

Add override of getString method #19

Closed vlakoff closed 1 year ago

vlakoff commented 1 year ago

As pointed out on https://github.com/accelforce/DevOptsHide/issues/16. This should make DevOptsHide work with more apps.

Thankfully, the MethodHookParam object has a method property (see in XC_MethodHook.java), so we can make use of [java.lang.reflect.Member.getName()](https://docs.oracle.com/en/java/javase/17/docs/api//java.base/java/lang/reflect/Member.html#getName()).

(there are other ways to write this code, so maybe someone could think of a more factorized/performant implementation)

kyori19 commented 1 year ago

Sorry for delay, I had many things to do this week. Please update code according to my review, then I will merge this.

vlakoff commented 1 year ago

No worries!

I have force-pushed the branch to implement this when expression.

kyori19 commented 1 year ago

thanks @vlakoff