Android EditText的问题

图片说明
为什么第一次启动程序可以为mes正常设置显示内容,退出程序再运行时,mes怎么都不显示内容,前面的log.i和后面的sendmessage都能正常运行,且val不为空

handler是在哪里发的消息?

Thread thread = new Thread() {
    public void run() {
        try {

            ServerSocket ss = new ServerSocket(Port);
            while (true) {          
                Socket s = ss.accept();
                BufferedReader in = null;
                in = new BufferedReader(new InputStreamReader(
                        s.getInputStream(), "GBK"));
                String msg = "";
                msg = in.readLine();
                Message m = new Message();
                Bundle data = new Bundle();
                data.putString("value", msg);
                m.setData(data);
                handler.sendMessage(m);
                in.close();
                s.close();
            }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
        }
    };
};