📄 ai.java
字号:
// pica客户端J2ME源码,100%可运行可修改,J2ME逆向工程经典作品
// 作者:fangji999
// QQ:57979471 Email:fangji999@163.com
// 博客:http://hi.baidu.com/ccall_net
// QQ群:51719370
// 如用此源码重新改写的软件或转载,请保留本人联系方式,作品原创作者
package pica;
import java.util.Vector;
import javax.microedition.lcdui.*;
// Referenced classes of package pica:
// aa, Pica, c, h,
// i, o, q, t,
// v, w, y
public final class ai extends aa
{
y a;
public ai(String s)
{
super(Pica.l);
super.q = s;
super.r = Pica.A;
super.si = 0;
}
public final void a(v v1)
{
v1.e = "消息列表";
if (!Pica.L)
{
v1.a("加为好友");
if (Pica.S)
{
v1.a("踢出聊天室");
v1.a("放入聊天室黑名单");
return;
}
} else
if (Pica.L)
{
v1.a("群操作");
v1.a("我的群名片");
if (Pica.S)
v1.a("修改群资料");
if (Pica.U || Pica.S)
{
v1.a("设置群公告");
v1.a("增加群成员");
}
}
}
public final void a(String s)
{
o o1;
if ((o1 = (o)o()) == null)
return;
if (o1.j.substring(0, o1.j.indexOf('%')).equals(w.ls) && s != "消息列表" && s != "我的群名片" && s != "修改群资料" && s != "设置群公告" && s != "增加群成员")
return;
if (s == "踢出聊天室")
{
w.al("提示", "你确定要踢出" + o1.i + "吗?", o1.j, 10);
return;
}
if (s == "放入聊天室黑名单")
{
w.al("提示", "你确定要将" + o1.i + "放入聊天室黑名单吗?", o1.j, 11);
return;
}
if (s == "消息列表")
if (!Pica.l.d.contains(Pica.f))
{
return;
} else
{
Pica.l.a(Pica.l.d.size() - 2);
return;
}
if (s == "加为好友")
{
String s1;
d(s1 = o1.j.substring(0, o1.j.indexOf('%')) + '@' + "pica");
return;
}
if (s == "我的群名片")
{
String s2;
w.c(s2 = w.ls + "%" + i.b);
return;
}
if (s == "修改群资料")
if (Pica.aw == null || Pica.aw.length() <= 0)
{
return;
} else
{
w.o();
return;
}
if (s == "设置群公告")
{
w.l();
return;
}
if (s == "增加群成员")
{
Pica.ab = true;
Pica.l.a(0);
w.a("请选择PICA好友", 2000, Pica.l);
return;
} else
{
a.a(s);
return;
}
}
public final synchronized void b(String s)
{
if (q() == 0)
return;
for (int j = 0; j < q(); j++)
{
if (!s.equals(((o)b(j)).j))
continue;
a(j);
if (super.p >= q())
super.p--;
}
Pica.l.a(this);
}
private static void d(String s)
{
c c1;
if ((c1 = Pica.m.c(s)) != null && c1.c != 8)
{
if (c1.c == 3 || c1.c == 2)
{
Pica.j.setCurrent(new Alert("提示", "该联系人已存在于 '" + c1.b + "' 分组里!", null, AlertType.INFO), Pica.l);
return;
}
if (c1.c == 4)
Pica.j.setCurrent(new Alert("提示", "该联系人在黑名单里!", null, AlertType.INFO), Pica.l);
return;
}
Pica.ae = s;
try
{
Pica.h.c(s, null, null, null);
Pica.h.a(s, "subscribe", null, "你好", 0);
w.a("正在发送请求,请稍候...", 3000, Pica.l);
return;
}
catch (Exception e)
{
w.a("添加为好友失败,请稍后再试!", 2, Pica.l);
}
}
public final synchronized void a(boolean flag, String s, String s1, byte byte0, String s2, String s3, String s4)
{
if (flag)
{
o o1;
(o1 = new o()).i = s2;
o1.p = byte0;
o1.j = s;
o1.k = s1;
o1.l = s3;
o1.m = s4;
if (s3 != null && s3.equals("unavailable"))
{
o1.oo = 2;
o1.p = 9;
} else
if (s4 != null && s4.equals("leave") || s4 == null && s1.equals("member") && s3.equals("available") || s4 != null && s4.equals("online") && s3.equals("available"))
o1.oo = 1;
else
o1.oo = 0;
a(o1);
} else
{
String s5 = "";
if (s.indexOf('%') > 0)
s5 = s.substring(0, s.indexOf('%'));
if (s5 != null && s5.equals(w.ls) && s4 != null && s4.equals("online"))
return;
o o2 = null;
int j = 0;
do
{
if (j >= Pica.K.q())
break;
o2 = (o)Pica.K.b(j);
if (s.equals(o2.j))
break;
j++;
} while (true);
if (o2.p == 0 || byte0 != 0)
o2.p = byte0;
o2.l = s3;
if (o2.l != null && o2.l.equals("unavailable"))
o2.p = 9;
if (o2.p == 9 && s4 != null && s4.equals("online"))
o2.p = 0;
if (s2 != null && s2.length() > 0)
o2.i = s2;
o2.m = s4;
if (!s4.equals("online"))
o2.k = s1;
if (s3 != null && s3.equals("unavailable"))
{
o2.oo = 2;
o2.p = 9;
} else
if (s4 != null && s4.equals("leave") || s4 == null && s1.equals("member") && s3.equals("available") || s4 != null && s4.equals("online") && s3.equals("available"))
o2.oo= 1;
else
o2.oo = 0;
}
a();
Pica.l.a(this);
}
public final String c(String s)
{
for (int j = 0; j < q(); j++)
if (s.equals(((o)b(j)).j))
return ((o)b(j)).i;
return null;
}
public final synchronized void a(String s, String s1, String s2)
{
o o1;
(o1 = new o()).i = s2;
o1.p = 9;
o1.j = s;
o1.k = s1;
a(o1);
Pica.l.a(this);
}
private void a()
{
a(0, q() - 1);
}
private void a(int j, int k)
{
if (j < k)
{
int l = b(j, k);
a(j, l - 1);
a(l + 1, k);
}
}
private int b(int j, int k)
{
o o1 = (o)p().elementAt(k);
int l = j - 1;
for (int i1 = j; i1 <= k - 1; i1++)
if (((o)p().elementAt(i1)).a(o1) <= 0)
{
l++;
o o3 = (o)p().elementAt(l);
p().setElementAt(p().elementAt(i1), l);
p().setElementAt(o3, i1);
}
o o2 = (o)p().elementAt(l + 1);
p().setElementAt(p().elementAt(k), l + 1);
p().setElementAt(o2, k);
return l + 1;
}
public final void d()
{
if (!Pica.L && !Pica.Q)
return;
o o1;
if ((o1 = (o)o()) == null)
return;
if (o1.j.substring(0, o1.j.indexOf('%')).equals(w.ls))
return;
if (!Pica.L)
{
String s = null;
String s1 = o1.j;
String s2 = o1.i;
s = "发给:" + s2;
Pica.j.setCurrent(new h(s, s1, s2, "chat", true, Pica.l));
return;
}
if (Pica.J.a == null)
{
return;
} else
{
Pica.l.b(0);
return;
}
}
public final void h()
{
o o1;
if ((o1 = (o)o()).j.substring(0, o1.j.indexOf('%')).equals(w.ls))
{
Pica.l.a(0, "群操作", null);
return;
}
if (Pica.L && Pica.J.a != null)
a = new y(o1);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -