|
@@ -44,25 +44,31 @@ public class ContextHome extends Activity {
|
44
|
44
|
|
45
|
45
|
private LinearLayout layout, fixedLayout;
|
46
|
46
|
|
47
|
|
- private final ContextType[] contexts = new ContextType[]{
|
48
|
|
- new GlobalContext(), new HourContext(), new PeriodContext()
|
49
|
|
- };
|
|
47
|
+ private ContextType[] contexts;
|
50
|
48
|
|
51
|
|
- private final DataHelper helper = new DataHelper(this, Arrays.asList(contexts));
|
|
49
|
+ private DataHelper helper;
|
52
|
50
|
|
53
|
|
- private final Module[] fixedModules = new Module[] {
|
54
|
|
- new ContactsModule(helper), new AppsModule(helper)
|
55
|
|
- };
|
56
|
|
-
|
57
|
|
- private final Module[] modules = new Module[]{
|
58
|
|
- new EmailModule(helper), new SmsModule(helper),
|
59
|
|
- };
|
|
51
|
+ private Module[] modules, fixedModules;
|
60
|
52
|
|
61
|
53
|
/** Called when the activity is first created. */
|
62
|
54
|
@Override
|
63
|
55
|
public void onCreate(Bundle icicle) {
|
64
|
56
|
super.onCreate(icicle);
|
65
|
57
|
|
|
58
|
+ contexts = new ContextType[]{
|
|
59
|
+ new GlobalContext(), new HourContext(), new PeriodContext()
|
|
60
|
+ };
|
|
61
|
+
|
|
62
|
+ helper = new DataHelper(this, Arrays.asList(contexts));
|
|
63
|
+
|
|
64
|
+ fixedModules = new Module[] {
|
|
65
|
+ new ContactsModule(helper), new AppsModule(helper)
|
|
66
|
+ };
|
|
67
|
+
|
|
68
|
+ modules = new Module[]{
|
|
69
|
+ new EmailModule(helper), new SmsModule(helper),
|
|
70
|
+ };
|
|
71
|
+
|
66
|
72
|
setContentView(R.layout.container);
|
67
|
73
|
|
68
|
74
|
layout = (LinearLayout) findViewById(R.id.content);
|