-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCallBlockActivity.java
43 lines (36 loc) · 1.31 KB
/
CallBlockActivity.java
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
package com.focus.callblock;
import android.app.TabActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TabHost;
import android.widget.Toast;
public class CallBlockActivity extends TabActivity {
Button serv;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
startService(new Intent(this, CallService.class));
Resources res = getResources();
TabHost tabhost = getTabHost();
TabHost.TabSpec spec;
spec = tabhost.newTabSpec("filters");
spec.setContent(new Intent().setClass(this, FiltersActivity.class));
spec.setIndicator("Filters");
tabhost.addTab(spec);
spec = tabhost.newTabSpec("Logs");
spec.setContent(new Intent().setClass(this, LogsActivity.class));
spec.setIndicator("Logs");
tabhost.addTab(spec);
DBHandle db = new DBHandle(this);
db.deleteAll();
Filter fil = new Filter("*123*", "1234567", 23*60, 2*60);
fil.write(this);
}
}