// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.shuame.rootgenius.sdk.a;

import android.util.Xml;
import java.io.IOException;
import java.io.StringWriter;
import java.util.*;
import org.xmlpull.v1.XmlSerializer;

// Referenced classes of package com.shuame.rootgenius.sdk.a:
//            Class100001, Class100015, Class100007, Class100004, 
//            Class100005, Class100002, Class100013, Class100012

public class Class100017 extends Class100001
{

    private Class100017()
    {
    }

    private static String b(Class100007 class100007, Map map)
    {
        StringWriter stringwriter;
        XmlSerializer xmlserializer;
        stringwriter = new StringWriter();
        xmlserializer = Xml.newSerializer();
        xmlserializer.setOutput(stringwriter);
        xmlserializer.startDocument(null, Boolean.valueOf(true));
        xmlserializer.startTag(null, "report");
        Class100015.a(xmlserializer, "version_name", "version_mask");
        Class100015.a(xmlserializer, "mac_address", class100007.a.f);
        Class100015.a(xmlserializer, "imei", class100007.a.c);
        Class100015.a(xmlserializer, "imsi", class100007.a.d);
        Class100015.a(xmlserializer, "qimei", class100007.a.e);
        Class100015.a(xmlserializer, "adb_device", class100007.b.n.c);
        Class100015.a(xmlserializer, "rid", class100007.a.b);
        Class100015.a(xmlserializer, "package_name", class100007.a.g);
        Class100015.a(xmlserializer, "product_id", class100007.b.a);
        Class100015.a(xmlserializer, "ro_product_model", class100007.b.c);
        Class100015.a(xmlserializer, "cpu_hardware", class100007.b.k);
        Class100015.a(xmlserializer, "kernel_version", class100007.b.l);
        Class100015.a(xmlserializer, "android_version", class100007.b.h);
        Class100015.a(xmlserializer, "ro_build_id", class100007.b.i);
        Class100015.a(xmlserializer, "ro_product_device", class100007.b.b);
        Class100015.a(xmlserializer, "ro_product_board", class100007.b.e);
        Class100015.a(xmlserializer, "ro_product_brand", class100007.b.f);
        Class100015.a(xmlserializer, "ro_product_manufacturer", class100007.b.g);
        Class100015.a(xmlserializer, "ro_product_model", class100007.b.c);
        Class100015.a(xmlserializer, "ro_hardware", class100007.b.d);
        Class100015.a(xmlserializer, "ro_build_description", class100007.b.j);
        Class100015.a(xmlserializer, "ro_build_version_sdk", class100007.b.q);
        Class100015.a(xmlserializer, "VID", class100007.b.n.a);
        Class100015.a(xmlserializer, "PID", class100007.b.n.b);
        Class100015.a(xmlserializer, "PROT", class100007.b.n.d);
        Class100015.a(xmlserializer, "SN", class100007.b.n.c);
        Class100015.a(xmlserializer, "time_used", String.valueOf(class100007.c));
        class100007.d;
        Class100015.a(xmlserializer, "rooted", String.valueOf(false));
        Class100015.a(xmlserializer, "result", String.valueOf(class100007.e));
        if(class100007.f != null)
            Class100015.a(xmlserializer, "description", class100007.f);
        Class100015.a(xmlserializer, "flag", String.valueOf(class100007.g));
        int i = 0;
_L2:
        if(i >= class100007.d.a.size())
            break; /* Loop/switch isn't completed */
        Class100012 class100012 = (Class100012)class100007.d.a.get(i);
        xmlserializer.startTag(null, "tried");
        Class100015.a(xmlserializer, "id", String.valueOf(class100012.a));
        Class100015.a(xmlserializer, "result", String.valueOf(class100012.b));
        if(class100012.c.length() > 4096)
            class100012.c = class100012.c.substring(-4096 + class100012.c.length());
        Class100015.a(xmlserializer, "desc", class100012.c);
        Class100015.a(xmlserializer, "time_used", String.valueOf(class100012.d));
        xmlserializer.endTag(null, "tried");
        i++;
        if(true) goto _L2; else goto _L1
_L1:
        if(map == null)
            break MISSING_BLOCK_LABEL_714;
        xmlserializer.startTag(null, "su");
        String s;
        for(Iterator iterator = map.keySet().iterator(); iterator.hasNext(); Class100015.a(xmlserializer, s, (String)map.get(s)))
            s = (String)iterator.next();

        break MISSING_BLOCK_LABEL_704;
        Exception exception1;
        exception1;
        com/shuame/rootgenius/sdk/a/Class100017.getSimpleName();
        exception1.toString();
        try
        {
            stringwriter.close();
        }
        catch(IOException ioexception1)
        {
            ioexception1.printStackTrace();
        }
        return stringwriter.toString();
        xmlserializer.endTag(null, "su");
        xmlserializer.endTag(null, "report");
        xmlserializer.endDocument();
        xmlserializer.flush();
        try
        {
            stringwriter.close();
        }
        catch(IOException ioexception2)
        {
            ioexception2.printStackTrace();
        }
        if(false)
            ;
        else
            break MISSING_BLOCK_LABEL_699;
        Exception exception;
        exception;
        try
        {
            stringwriter.close();
        }
        catch(IOException ioexception)
        {
            ioexception.printStackTrace();
        }
        throw exception;
    }

    public static Class100017 d()
    {
        return a;
    }

    public final int a(Class100007 class100007, Map map)
    {
        String s = b(class100007, map);
        a.a a1 = Class100001.a(c(), s, null);
        int i = a1.a;
        String s1;
        if(a1.b == null)
            s1 = "";
        else
            s1 = new String(a1.b);
        a(i, s1);
        return a1.a;
    }

    public final void a(int i, String s)
    {
    }

    public final String c()
    {
        return a(true, "/root/report/tmp");
    }

    private static Class100017 a = new Class100017();

}
