-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppScreen.java
More file actions
executable file
·93 lines (80 loc) · 2.09 KB
/
AppScreen.java
File metadata and controls
executable file
·93 lines (80 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package com.killmalware.bbsec;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Keypad;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.container.VerticalFieldManager;
public class AppScreen extends MainScreen
{
private SMSHook sh;
private Bitmap back;
public AppScreen()
{
super();
back = Bitmap.getBitmapResource("screen2.png");
VerticalFieldManager base = new VerticalFieldManager(Manager.USE_ALL_HEIGHT|Manager.USE_ALL_WIDTH)
{
protected void paint( Graphics g )
{
g.drawBitmap( 0, 0, back.getWidth(), back.getHeight(), back, 0, 0 );
super.paint( g );
}
};
sh = new SMSHook();
ButtonField hook = new ButtonField("Hook SMSs",ButtonField.CONSUME_CLICK)
{
protected boolean keyDown(int keycode, int time)
{
if(Keypad.key (keycode) == Keypad.KEY_ENTER)
{
if(!sh.isHooked())
{
sh.HookSMS();
Helpers.alertMsg("SMSs Hooked");
}
return true;
}
return super.keyDown(keycode, time);
}
protected boolean navigationClick(int status, int time)
{
if(!sh.isHooked())
{
sh.HookSMS();
Helpers.alertMsg("SMSs Hooked");
}
return true;
}
};
ButtonField unhook = new ButtonField("Unhook SMSs",ButtonField.CONSUME_CLICK)
{
protected boolean keyDown(int keycode, int time)
{
if(Keypad.key (keycode) == Keypad.KEY_ENTER)
{
if(sh.isHooked())
{
sh.unHookSMS();
Helpers.alertMsg("SMSs Unhooked");
}
return true;
}
return super.keyDown(keycode, time);
}
protected boolean navigationClick(int status, int time)
{
if(sh.isHooked())
{
sh.unHookSMS();
Helpers.alertMsg("SMSs Unhooked");
}
return true;
}
};
base.add(hook);
base.add(unhook);
add(base);
}
}