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 fo { /* renamed from: a reason: collision with root package name */ private XmlPullParser f30773a; public fo() { try { XmlPullParser newPullParser = XmlPullParserFactory.newInstance().newPullParser(); this.f30773a = 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.f30773a.setInput(new InputStreamReader(new ByteArrayInputStream(bArr))); this.f30773a.next(); int eventType = this.f30773a.getEventType(); String name = this.f30773a.getName(); if (eventType != 2) { return null; } if (name.equals("message")) { return gt.a(this.f30773a); } if (name.equals("iq")) { return gt.a(this.f30773a, fuVar); } if (name.equals("presence")) { return gt.m466a(this.f30773a); } if (this.f30773a.getName().equals("stream")) { return null; } if (!this.f30773a.getName().equals("error")) { if (this.f30773a.getName().equals("warning")) { this.f30773a.next(); str2 = this.f30773a.getName(); str = "multi-login"; } else { str2 = this.f30773a.getName(); str = "bind"; } str2.equals(str); return null; } throw new gf(gt.m467a(this.f30773a)); } }