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 fq { /* renamed from: a reason: collision with root package name */ private XmlPullParser f36614a; public fq() { try { XmlPullParser newPullParser = XmlPullParserFactory.newInstance().newPullParser(); this.f36614a = newPullParser; newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-namespaces", true); } catch (XmlPullParserException unused) { } } public gl a(byte[] bArr, fu fuVar) { String str; String str2; this.f36614a.setInput(new InputStreamReader(new ByteArrayInputStream(bArr))); this.f36614a.next(); int eventType = this.f36614a.getEventType(); String name = this.f36614a.getName(); if (eventType != 2) { return null; } if (name.equals("message")) { return gt.a(this.f36614a); } if (name.equals("iq")) { return gt.a(this.f36614a, fuVar); } if (name.equals("presence")) { return gt.m472a(this.f36614a); } if (this.f36614a.getName().equals("stream")) { return null; } if (!this.f36614a.getName().equals("error")) { if (this.f36614a.getName().equals("warning")) { this.f36614a.next(); str2 = this.f36614a.getName(); str = "multi-login"; } else { str2 = this.f36614a.getName(); str = "bind"; } str2.equals(str); return null; } throw new gf(gt.m473a(this.f36614a)); } }