Package lu.die.fozacompatibility
Class FozaExternalMethodObserverManager
java.lang.Object
lu.die.fozacompatibility.FozaExternalMethodObserverManager
- Version:
- 1.0
- Author:
- king@62v.net
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddOnObserver(String serviceName, String methodName, FozaMethodObserverEE observer) Hacky way to inject to the system servicesstatic voiddetectProcessTypeOnce(android.content.Context context) Calling this method will call theregisterProcessTypeCallback(IProcessCallback)againstatic voidredirectPath(String origin, String newPath) Deprecated.For cpu architecture compatible purpose, please do not use this method.static voidContainer app status callback, will be invoked when an internal app launch.static voidregisterProcessTypeCallback(IProcessCallback callback) Register a process type callback, you can detect if you are running in the host process or the container process by this callback.static voidwhiteListPath(String origin) Deprecated.
-
Constructor Details
-
FozaExternalMethodObserverManager
public FozaExternalMethodObserverManager()
-
-
Method Details
-
redirectPath
Deprecated.For cpu architecture compatible purpose, please do not use this method.- Parameters:
origin- Origin path like /data/user/0/[package]newPath- New path, origin path will be redirect by the seccomp.
-
whiteListPath
Deprecated.Add a specific path which won't be redirected,- Parameters:
origin- path to be white listed, like /dev/null
-
registerProcessTypeCallback
Register a process type callback, you can detect if you are running in the host process or the container process by this callback.- Parameters:
callback- process call back
-
detectProcessTypeOnce
public static void detectProcessTypeOnce(android.content.Context context) Calling this method will call theregisterProcessTypeCallback(IProcessCallback)again- Parameters:
context- application base context
-
addOnObserver
public static void addOnObserver(String serviceName, String methodName, FozaMethodObserverEE observer) Hacky way to inject to the system services- Parameters:
serviceName- like Context.ACTIVITY_SERVICEmethodName- system service interface method nameobserver- your injector
-
registerFozaActivityCallback
Container app status callback, will be invoked when an internal app launch.- Parameters:
observer- internal app observer, will get callback after the app launch.- See Also:
-
Instrumentation.newApplication(ClassLoader, String, Context)
-