home *** CD-ROM | disk | FTP | other *** search
- import java.util.Vector;
- import javax.microedition.lcdui.Canvas;
- import javax.microedition.lcdui.Command;
- import javax.microedition.lcdui.Graphics;
-
- // $FF: renamed from: p
- public class class_0 extends Canvas {
- // $FF: renamed from: a int
- private int field_0;
- // $FF: renamed from: j int
- private int field_1;
- // $FF: renamed from: s j
- private j field_2;
- // $FF: renamed from: q java.util.Vector
- private Vector field_3 = new Vector();
- // $FF: renamed from: u x
- private x field_4;
- // $FF: renamed from: p int
- private int field_5;
- // $FF: renamed from: d javax.microedition.lcdui.Command
- private static final Command field_6 = new Command("Invite", 1, 1);
- // $FF: renamed from: l javax.microedition.lcdui.Command
- private static final Command field_7 = new Command("Email", 1, 2);
- // $FF: renamed from: v javax.microedition.lcdui.Command
- private static final Command field_8 = new Command("Open group", 1, 3);
- // $FF: renamed from: i javax.microedition.lcdui.Command
- private static final Command field_9 = new Command("Close group", 1, 3);
- // $FF: renamed from: r javax.microedition.lcdui.Command
- private static final Command field_10 = new Command("Exit", 7, 7);
- // $FF: renamed from: t javax.microedition.lcdui.Command
- private static final Command field_11 = new Command("Back to chat", 1, 4);
- // $FF: renamed from: f javax.microedition.lcdui.Command
- private static final Command field_12 = new Command("Delete MSN contact", 1, 6);
- // $FF: renamed from: c javax.microedition.lcdui.Command
- private static final Command field_13 = new Command("Add MSN contact", 1, 5);
- // $FF: renamed from: n javax.microedition.lcdui.Command
- private static final Command field_14 = new Command("Show all contacts", 1, 7);
- // $FF: renamed from: o javax.microedition.lcdui.Command
- private static final Command field_15 = new Command("Show online contacts", 1, 8);
- // $FF: renamed from: k boolean
- private boolean field_16;
- // $FF: renamed from: b aa
- private aa field_17;
- // $FF: renamed from: m aa
- private aa field_18;
- // $FF: renamed from: g ac
- private ac field_19;
- // $FF: renamed from: e w
- private w field_20;
- // $FF: renamed from: h int
- private volatile int field_21;
-
- public class_0(ac var1, w var2) throws Exception {
- this.field_4 = ad.b;
- this.field_5 = 0;
- this.field_16 = true;
- this.field_17 = new aa();
- this.field_18 = new aa();
- this.field_21 = -1;
- this.field_20 = var2;
- this.field_19 = var1;
- this.field_0 = ad.g;
- this.field_1 = ad.l;
- this.method_0();
- this.setCommandListener(var1);
- }
-
- // $FF: renamed from: g () void
- private void method_0() throws Exception {
- this.field_2 = new j(false, this.field_1);
- if (this.field_16) {
- Vector var1 = this.field_4.a();
-
- for(int var2 = 0; var2 < var1.size(); ++var2) {
- r var3 = (r)var1.elementAt(var2);
- var3.a(100);
- if (var3.e.size() > 0) {
- this.field_2.a(var3);
- }
- }
- } else {
- for(int var4 = 0; var4 < this.field_4.b(); ++var4) {
- m var5 = this.field_4.a(var4);
- if (var5.e() != 2) {
- this.field_2.a(var5);
- }
- }
- }
-
- }
-
- // $FF: renamed from: b () void
- private void method_1() {
- this.field_17.removeAllElements();
- if (this.method_4() != null) {
- if (this.method_4().c() == 0) {
- this.method_2((r)this.method_4());
- } else {
- this.method_3((m)this.method_4());
- }
-
- if (ad.i.w != null) {
- this.field_17.addElement(field_11);
- }
- }
-
- this.field_17.addElement(field_13);
- this.field_17.addElement(field_10);
- if (this.field_16) {
- this.field_17.addElement(field_15);
- } else {
- this.field_17.addElement(field_14);
- }
-
- if (!this.field_17.a(this.field_18)) {
- for(int var1 = 0; var1 < this.field_18.size(); ++var1) {
- this.removeCommand((Command)this.field_18.elementAt(var1));
- }
-
- for(int var2 = 0; var2 < this.field_17.size(); ++var2) {
- this.addCommand((Command)this.field_17.elementAt(var2));
- }
-
- this.field_18.b(this.field_17);
- }
-
- }
-
- // $FF: renamed from: a (r) void
- private void method_2(r var1) {
- if (var1.e() == 101) {
- this.field_17.addElement(field_9);
- } else {
- this.field_17.addElement(field_8);
- }
-
- }
-
- // $FF: renamed from: a (m) void
- private void method_3(m var1) {
- if (var1.e() != 2) {
- this.field_17.addElement(field_6);
- }
-
- this.field_17.addElement(field_7);
- this.field_17.addElement(field_12);
- }
-
- // $FF: renamed from: e () l
- public l method_4() {
- return (l)this.field_2.h();
- }
-
- // $FF: renamed from: a () void
- public void method_5() throws Exception {
- l var1 = (l)this.field_2.h();
- if (var1.e() == 100) {
- r var2 = (r)var1;
-
- for(int var3 = 0; var3 < var2.e.size(); ++var3) {
- if (this.field_16 || !this.field_16 && ((m)var2.e.elementAt(var3)).e() != 2) {
- this.field_2.b((s)var2.e.elementAt(var3));
- this.field_2.d();
- }
- }
-
- var2.a(101);
- }
-
- this.repaint();
- }
-
- // $FF: renamed from: f () void
- public void method_6() throws Exception {
- l var1 = (l)this.field_2.h();
- if (var1.e() == 101) {
- r var2 = (r)var1;
- this.field_2.d();
-
- while(((l)this.field_2.h()).c() == 1) {
- this.field_2.a();
- this.field_2.d();
- }
-
- var2.a(100);
- }
-
- this.repaint();
- }
-
- public void paint(Graphics var1) {
- var1.setColor(16777215);
- var1.fillRect(0, 0, this.field_0, this.field_1);
- this.field_2.c(var1);
- this.method_1();
- }
-
- public void keyPressed(int var1) {
- this.field_21 = var1;
- }
-
- public void keyRepeated(int var1) {
- this.field_21 = var1;
- }
-
- // $FF: renamed from: a (int) int
- public int method_7(int var1) {
- int var2 = 0;
-
- try {
- var2 = this.getGameAction(var1);
- } catch (Exception var4) {
- }
-
- return var2;
- }
-
- // $FF: renamed from: k () int
- private int method_8() {
- if (this.field_21 == 9999) {
- return 9999;
- } else {
- int var1 = this.method_7(this.field_21);
- this.field_21 = 9999;
- return var1;
- }
- }
-
- // $FF: renamed from: d () void
- private void method_9() throws Exception {
- l var1 = (l)this.field_2.h();
- if (var1.c() == 1) {
- m var2 = (m)var1;
- if (ad.a("Delete " + var2.d() + "?")) {
- this.field_2.a();
- ad.i.a(var2);
- }
- }
-
- }
-
- // $FF: renamed from: h () boolean
- private boolean method_10() throws Exception {
- boolean var1 = true;
- l var2 = (l)this.field_2.h();
- if (var2.c() == 1) {
- m var3 = (m)var2;
- c var4 = new c(var3.f());
- var1 = var4.a();
- ad.a(this);
- }
-
- return var1;
- }
-
- // $FF: renamed from: i () boolean
- public boolean method_11() throws Exception {
- while(true) {
- Command var1 = this.field_19.b();
- if (var1 == field_10 || ad.a.a() == 0) {
- return false;
- }
-
- if (var1 == field_8) {
- ad.i.b((String)null);
- this.method_5();
- }
-
- if (var1 == field_9) {
- this.method_6();
- }
-
- if (var1 == field_6 && this.method_13()) {
- return true;
- }
-
- if (var1 == field_7 && !this.method_10()) {
- return false;
- }
-
- if (var1 == field_12) {
- this.method_9();
- }
-
- if (var1 == field_11) {
- return true;
- }
-
- if (var1 == field_13) {
- this.method_12();
- }
-
- if (var1 == field_14) {
- this.field_16 = true;
- this.field_4.e = true;
- }
-
- if (var1 == field_15) {
- this.field_16 = false;
- this.field_4.e = true;
- }
-
- int var2 = this.method_8();
- if (var2 == 1) {
- this.field_2.i();
- this.repaint();
- }
-
- if (var2 == 6) {
- this.field_2.d();
- this.repaint();
- }
-
- ad.i.l();
- ad.i.k();
- if (ad.i.f()) {
- return true;
- }
-
- if (this.field_4.e) {
- this.method_0();
- this.repaint();
- this.field_4.e = false;
- }
-
- if (this.field_4.b) {
- if (!this.field_16) {
- this.method_0();
- }
-
- this.repaint();
- this.field_4.b = false;
- }
-
- Thread.sleep(200L);
- }
- }
-
- // $FF: renamed from: j () void
- private void method_12() throws Exception {
- StringBuffer var1 = new StringBuffer();
- b var2 = new b("Input email address of new contact", "", 256, 4);
- int var3 = var2.a(var1);
- if (var3 == 2) {
- ad.i.d(var1.toString());
- }
-
- }
-
- // $FF: renamed from: c () boolean
- private boolean method_13() throws Exception {
- l var1 = this.method_4();
- if (var1 != null) {
- if (var1.c() == 1) {
- m var2 = (m)var1;
- if (var2.e() == 2) {
- ad.b(var2.d() + " is offline.");
- this.method_1();
- return false;
- } else if (ad.i.w == null && !ad.i.i()) {
- ad.b("Creating new chat-session failed");
- this.method_1();
- return false;
- } else if (ad.i.b(var2)) {
- return true;
- } else {
- ad.i.a();
- this.method_1();
- return false;
- }
- } else {
- this.method_1();
- return false;
- }
- } else {
- return false;
- }
- }
- }
-