最右.apk(点击下载) / gd.java


package com.xiaomi.push;

import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

public class gd {

    /* renamed from: a  reason: collision with root package name */
    public XmlPullParser f25127a;

    public gd() {
        try {
            XmlPullParser newPullParser = XmlPullParserFactory.newInstance().newPullParser();
            this.f25127a = newPullParser;
            newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-namespaces", true);
        } catch (XmlPullParserException unused) {
        }
    }

    public ha a(byte[] bArr, gj gjVar) {
        this.f25127a.setInput(new InputStreamReader(new ByteArrayInputStream(bArr)));
        this.f25127a.next();
        int eventType = this.f25127a.getEventType();
        String name = this.f25127a.getName();
        if (eventType != 2) {
            return null;
        }
        if (name.equals("message")) {
            return hi.a(this.f25127a);
        }
        if (name.equals("iq")) {
            return hi.a(this.f25127a, gjVar);
        }
        if (name.equals("presence")) {
            return hi.m409a(this.f25127a);
        }
        if (this.f25127a.getName().equals("stream")) {
            return null;
        }
        if (this.f25127a.getName().equals("error")) {
            throw new gu(hi.m410a(this.f25127a));
        } else if (this.f25127a.getName().equals("warning")) {
            this.f25127a.next();
            this.f25127a.getName().equals("multi-login");
            return null;
        } else {
            this.f25127a.getName().equals("bind");
            return null;
        }
    }
}