code: @Override
      public void onConnect(final int rst, final HuaweiApiClient client) {
          //需要在子线程中执行获取push状态的操作
          ThreadUtil.INST.excute(new Runnable() {
              @Override
              public void run() {
                  if (client == null || !ApiClientMgr.INST.isConnect(client)) {
                      HMSAgentLog.e("client not connted");
                      onGetPushStateResult(rst);
                  } else {
                      HuaweiPush.HuaweiPushApi.getPushState(client);
                      onGetPushStateResult(HMSAgent.AgentResultCode.HMSAGENT_SUCCESS);
                  }
              }
          });
      }
docs: HuaweiApiClient 连接结果回调
  
  @param rst    结果码
  @param client HuaweiApiClient 实例