content: package top.niunaijun.blackbox.fake.service;
  
  import java.lang.reflect.Method;
  
  import black.android.os.BRServiceManager;
  import black.android.view.BRIGraphicsStatsStub;
  import top.niunaijun.blackbox.fake.hook.BinderInvocationStub;
  import top.niunaijun.blackbox.fake.hook.MethodHook;
  import top.niunaijun.blackbox.fake.hook.ProxyMethod;
  import top.niunaijun.blackbox.utils.MethodParameterUtils;
  
  /**
   * updated by alex5402 on 4/13/21.
   * * ∧＿∧
   * (`･ω･∥
   * 丶　つ０
   * しーＪ
   * TFNQw5HgWUS33Ke1eNmSFTwoQySGU7XNsK (USDT TRC20)
   */
  public class IGraphicsStatsProxy extends BinderInvocationStub {
  
      public IGraphicsStatsProxy() {
          super(BRServiceManager.get().getService("graphicsstats"));
      }
  
      @Override
      protected Object getWho() {
          return BRIGraphicsStatsStub.get().asInterface(BRServiceManager.get().getService("graphicsstats"));
      }
  
      @Override
      protected void inject(Object baseInvocation, Object proxyInvocation) {
          replaceSystemService("graphicsstats");
      }
  
      @Override
      public boolean isBadEnv() {
          return false;
      }
  
      @ProxyMethod("requestBufferForProcess")
      public static class RequestBufferForProcess extends MethodHook {
          @Override
          protected Object hook(Object who, Method method, Object[] args) throws Throwable {
              MethodParameterUtils.replaceFirstAppPkg(args);
              return method.invoke(who, args);
          }
      }
  }
  