BlackFeather'S Blog

首页 | |

反编译的手机版飞信,但是不懂JAVA,贴出来玩玩吧

 

没事做了,用JAD反编译了手机版飞信想看看他的登陆时流程,结果弄出来却看不懂JAVA,非常不习惯面对对象这种思想。。。、

 

贴出来吧,有意者自己看看。。。

 

代码片段(登陆的这一段代码):

    public void on_Login(Vector vector)
        throws Exception
    {
        ht_BlackList.clear();
        ht_BuddyList.clear();
        ChatSession.unReadQueue.removeAllElements();
        ChatSession.total_UnReadMessageCount = 0;
        if(cancelLogin)
        {
            logout();
            cancelLogin = false;
            return;
        }
        long l = System.currentTimeMillis();
        String s = vector.elementAt(0).toString();
        Vector vector1 = StringParser.split(s, '\002');
        setUserInf(vector1);
        buddyNum = Integer.parseInt(vector.elementAt(1).toString().trim());
        ml_BuddyList = new MList();
        ml_BlackList = new MList();
        if(buddyNum != 0)
        {
            Vector vector2 = new Vector(10, 10);
            Vector vector3 = new Vector(20, 20);
            for(int k = 0; k < buddyNum; k++)
            {
                s = vector.elementAt(k + 2).toString();
                vector1 = StringParser.split(s, '\002');
                Buddy buddy1 = newBuddy(vector1);
                if((buddy1.flag & 2) == 2)
                    continue;
                ht_BuddyList.put(buddy1.uri, buddy1);
                MListItem mlistitem = new MListItem(buddy1);
                if(buddy1.isOnline())
                {
                    if(buddy1.isBlock())
                    {
                        ml_BlackList.addItem(mlistitem);
                        ht_BlackList.put(buddy1.uri, buddy1);
                    }
                    vector2.addElement(mlistitem);
                    continue;
                }
                if(buddy1.isBlock())
                {
                    ml_BlackList.appendItem(mlistitem);
                    ht_BlackList.put(buddy1.uri, buddy1);
                }
                vector3.addElement(mlistitem);
            }

            ml_BuddyList.addItems(vector2);
            ml_BuddyList.addItems(vector3);
        }
        s = vector.elementAt(buddyNum + 2).toString();
        vector1 = StringParser.split(s, '\002');
        if(vector1 != null)
        {
            for(Enumeration enumeration = vector1.elements(); enumeration.hasMoreElements();)
            {
                String s1 = enumeration.nextElement().toString();
                if(!ht_BuddyList.containsKey(s1))
                {
                    Buddy buddy = new Buddy(s1);
                    buddy.setBlock(true);
                    ht_BlackList.put(buddy.uri, buddy);
                } else
                {
                    ((Buddy)ht_BuddyList.get(s1)).setBlock(true);
                    ht_BlackList.put(s1, (Buddy)ht_BuddyList.get(s1));
                }
            }

        }
        int i = Integer.parseInt(vector.elementAt(buddyNum + 3).toString().trim());
        vec_Wpending = new Vector();
        vec_CancelWpendingPair = new Vector();
        if(i != 0)
        {
            for(int j = 0; j < i; j++)
                addWpending(vector.elementAt(buddyNum + 4 + j));

        }
        s = null;
        vector1 = null;
        vector = null;
        newStrangerList();
        if(backScreens != null)
            backScreens.removeAllElements();
        long l1 = System.currentTimeMillis() - l;
        ml_SessionList = new MList();
        isLogin = true;
        Transform.instance.autoPolling(true);
        if(mainList != null)
            mainList.setSelectedIndex(0, true);
        canvas.loginInit();
        if(vec_Wpending != null && vec_Wpending.size() > 0)
            showWpendingScreen((WpendingPair)vec_Wpending.firstElement(), canvas);
        else
            display.setCurrent(canvas);
        isFirstRegedit = false;
        form_LoginState = null;
        System.gc();
        canvas.stopAnimation(1);
        canvas.repaint();
    }

    private Displayable showWpendingScreen(WpendingPair wpendingpair, Displayable displayable)
    {
        Form form = new Form("\u786E\u8BA4\u6DFB\u52A0\u597D\u53CB");
        form.setCommandListener(this);
        form.addCommand(Setting.cmd_Cancel);
        form.addCommand(Setting.cmd_OK);
        form.setItemStateListener(this);
        form.append(wpendingpair.nickName + "\u6DFB\u52A0\u60A8\u4E3A\u5176\u597D\u53CB");
        cg_AddOption = new ChoiceGroup("\u8BF7\u9009\u62E9", 1, new String[] {
            "\u4E0B\u6B21\u518D\u8BF4", "\u540C\u610F", "\u62D2\u7EDD"
        }, null);
        form.append(cg_AddOption);
        cg_Addtoo = new ChoiceGroup("", 2, new String[] {
            "\u540C\u65F6\u6DFB\u52A0\u5BF9\u65B9\u4E3A\u597D\u53CB"
        }, null);
        form.append(cg_Addtoo);
        cg_Addtoo.setSelectedIndex(0, true);
        cg_AddOption.setSelectedIndex(1, true);
        pushBackScreen(displayable);
        display.setCurrent(form);
        return form;
    }

 

 

飞信手机版.gz

 

 

2009/6/22 | Tags:原创,工具 | 其他代码 | 查看评论(0)

相关文章:

Powered By Z-Blog  触屏版 | WAP版 | 电脑版