code: public static void setHMSReceiveNotifyMsg(final boolean enable) {
      com.huawei.android.hms.agent.HMSAgent.Push.enableReceiveNotifyMsg(enable,
          new com.huawei.android.hms.agent.push.handler.EnableReceiveNotifyMsgHandler() {
            @Override
            public void onResult(int rst) {
              LOGGER.d("[HMS] enableReceiveNotifyMsg(flag=" + enable + ") returnCode=" + rst);
            }
          });
    }
docs: 打开/关闭通知栏消息
  Turn on/off notification bar messages
  @param enable 打开/关闭（默认为打开）
  Turn ON/off