1 package de
.ub0r
.android
.adBlock
;
3 import android
.app
.Activity
;
4 import android
.content
.Intent
;
5 import android
.os
.Bundle
;
6 import android
.view
.View
;
7 import android
.view
.View
.OnClickListener
;
8 import android
.widget
.Button
;
11 * Main Activity to controle ad blocking proxy.
15 public class AdBlock
extends Activity
implements OnClickListener
{
17 * Called when the activity is first created.
19 * @param savedInstanceState
23 public final void onCreate(final Bundle savedInstanceState
) {
24 super.onCreate(savedInstanceState
);
25 this.setContentView(R
.layout
.main
);
27 ((Button
) this.findViewById(R
.id
.start_service
))
28 .setOnClickListener(this);
29 ((Button
) this.findViewById(R
.id
.stop_service
))
30 .setOnClickListener(this);
39 public final void onClick(final View v
) {
41 case R
.id
.start_service
:
42 this.startService(new Intent(this, Proxy
.class));
44 case R
.id
.stop_service
:
45 this.stopService(new Intent(this, Proxy
.class));