⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fbstandbyinvocationhandler.java

📁 Sony Ericsson手机上的Facebook客户端全套代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   FbStandbyInvocationHandler.java

package com.sonyericsson.fb.content;

import com.sonyericsson.fb.api.FbSessionHandler;
import com.sonyericsson.fb.api.InvalidStateException;
import com.sonyericsson.fb.utils.Logger;
import javax.microedition.content.Invocation;
import se.southend.drops.screen.ScreenMidletHS;

// Referenced classes of package com.sonyericsson.fb.content:
//            IFbInvocationRequestHandler

public class FbStandbyInvocationHandler extends IFbInvocationRequestHandler
{

    private FbStandbyInvocationHandler()
    {
        init(ScreenMidletHS.getInstance().getClass().getName());
    }

    public static FbStandbyInvocationHandler getInstance()
    {
        if(_instance == null)
            _instance = new FbStandbyInvocationHandler();
        return _instance;
    }

    protected String[] handleRequest(String invoker, String url, String action, String type, String args[])
    {
        Logger.println("New invocation!");
        Logger.println("URL = '" + url + "'");
        Logger.println("Action = '" + action + "'");
        String a = "";
        for(int i = 0; i < args.length; i++)
            a = a + args[i] + ",";

        Logger.println("Args = '" + a + "'");
        Logger.println("Type = '" + type + "'");
        Logger.println("Invoker = '" + invoker + "'");
        if(url.startsWith("facebook://") && type.startsWith("facebook/action"))
        {
            String command = url.substring("facebook://".length());
            if(args.length > 0 && command.equals(args[0]))
            {
                Logger.println("We have an valid argument according to requirements.");
                if(command.equals("logged_in"))
                    notifyListeners(4, args);
                else
                if(command.equals("logged_out"))
                    notifyListeners(5, args);
                else
                if(command.equals("launch_standby"))
                    notifyListeners(6, args);
                else
                if(command.equals("settings_updated"))
                    notifyListeners(7, args);
                else
                if(command.equals("focus_from_main"))
                    notifyListeners(8, args);
                else
                if(command.equals("logging_in"))
                    notifyListeners(11, args);
                else
                if(command.equals("login_failed"))
                    notifyListeners(12, args);
                else
                if(command.equals("quit"))
                    notifyListeners(13, args);
            }
        }
        return null;
    }

    public boolean sendMessage(int message)
    {
        String url;
        String type;
        String action;
        url = "";
        type = "";
        action = "";
        message;
        JVM INSTR tableswitch 0 10: default 233
    //                   0 68
    //                   1 168
    //                   2 181
    //                   3 194
    //                   4 233
    //                   5 233
    //                   6 233
    //                   7 233
    //                   8 233
    //                   9 207
    //                   10 220;
           goto _L1 _L2 _L3 _L4 _L5 _L1 _L1 _L1 _L1 _L1 _L6 _L7
_L2:
        url = "facebook://logged_in";
        type = "facebook/action";
        Invocation invocation;
        invocation = new Invocation(url, type, "com.sonyericsson.fb.FbMIDlet", false, "send");
        invocation.setArgs(new String[] {
            "logged_in", FbSessionHandler.getInstance().getUid(), FbSessionHandler.getInstance().getSessionKey(), FbSessionHandler.getInstance().getSessionSecret()
        });
        return invoke(invocation);
        InvalidStateException e;
        e;
        Logger.printErrorln("FbStandbyInvocationHandler::sendMessage(ACTION_SEND_LOGGED_IN): " + e.toString());
        return false;
_L3:
        url = "facebook://logged_out";
        type = "facebook/action";
        action = "logged_out";
        break; /* Loop/switch isn't completed */
_L4:
        url = "facebook://focus_from_standby";
        type = "facebook/action";
        action = "focus_from_standby";
        break; /* Loop/switch isn't completed */
_L5:
        url = "facebook://settings_updated";
        type = "facebook/action";
        action = "settings_updated";
        break; /* Loop/switch isn't completed */
_L6:
        url = "facebook://logging_in";
        type = "facebook/action";
        action = "logging_in";
        break; /* Loop/switch isn't completed */
_L7:
        url = "facebook://login_failed";
        type = "facebook/action";
        action = "login_failed";
        break; /* Loop/switch isn't completed */
_L1:
        return false;
        e = new Invocation(url, type, "com.sonyericsson.fb.FbMIDlet", false, "send");
        e.setArgs(new String[] {
            action
        });
        return invoke(e);
    }

    public static final int ACTION_SEND_LOGGED_IN = 0;
    public static final int ACTION_SEND_LOGGED_OUT = 1;
    public static final int ACTION_SEND_FOCUS_FROM_STANDBY = 2;
    public static final int ACTION_SEND_SETTINGS_UPDATED = 3;
    public static final int ACTION_RECEIVED_LOGGED_IN = 4;
    public static final int ACTION_RECEIVED_LOGGED_OUT = 5;
    public static final int ACTION_RECEIVED_LAUNCH_STANDBY = 6;
    public static final int ACTION_RECEIVED_SETTINGS_UPDATED = 7;
    public static final int ACTION_RECEIVED_FOCUS_FROM_MAIN = 8;
    public static final int ACTION_SEND_LOGGING_IN = 9;
    public static final int ACTION_SEND_LOGIN_FAILED = 10;
    public static final int ACTION_RECEIVED_LOGGING_IN = 11;
    public static final int ACTION_RECEIVED_LOGIN_FAILED = 12;
    public static final int ACTION_RECEIVED_QUIT = 13;
    private static final String INVOCATION_PROTOCOL = "facebook://";
    private static final String INVOCATION_TYPE_ACTION = "facebook/action";
    private static final String INVOCATION_ACTION_LOGGED_IN = "logged_in";
    private static final String INVOCATION_ACTION_LOGGED_OUT = "logged_out";
    private static final String INVOCATION_ACTION_LAUNCH_STANDBY = "launch_standby";
    private static final String INVOCATION_ACTION_FOCUS_FROM_STANDBY = "focus_from_standby";
    private static final String INVOCATION_ACTION_FOCUS_FROM_MAIN = "focus_from_main";
    private static final String INVOCATION_ACTION_SETTINGS_UPDATED = "settings_updated";
    private static final String INVOCATION_ACTION_LOGGING_IN = "logging_in";
    private static final String INVOCATION_ACTION_LOGIN_FAILED = "login_failed";
    private static final String INVOCATION_ACTION_QUIT = "quit";
    private static final String MAIN_CONTENT_HANDLER_ID = "com.sonyericsson.fb.FbMIDlet";
    private static FbStandbyInvocationHandler _instance = null;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -