gt:     		{	// When choose not to open GPS, give a notice of disability
context: package com.example.mcbp;
  
  import org.apache.log4j.Level;
  import org.apache.log4j.LogManager;
  import org.apache.log4j.Logger;
  
  import com.example.mcbp.log.ConfigureLog4J;
  
  import android.os.Bundle;
  import android.os.CountDownTimer;
  import android.os.PowerManager;
  import android.os.Vibrator;
  import android.os.PowerManager.WakeLock;
  import android.app.Activity;
  import android.app.AlertDialog;
  import android.app.KeyguardManager;
  import android.app.Notification;
  import android.app.NotificationManager;
  import android.app.PendingIntent;
  import android.app.KeyguardManager.KeyguardLock;
  import android.content.Context;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.graphics.Color;
  import android.util.Log;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class FeedbackActivity extends Activity {
  
  	private Button btn00, btn01; //, btn10, btn11;
  	private TextView tv;
  	Logger log;
  	//private PrefManager pM;
  	private CountDownTimer timer;
  	private WakeLock wakeLock;
  	private KeyguardLock keyguardLock;
  	
  	private boolean event = false, decision = false, cancel = false;
  	private String ts;
  	
  	@Override
  	protected void onCreate(Bundle savedInstanceState) {
  		super.onCreate(savedInstanceState);
  		setContentView(R.layout.activity_feedback);
  		
  		log = Logger.getLogger(FeedbackActivity.class);  
          ConfigureLog4J.configure(this);  
          LogManager.getRootLogger().setLevel((Level)Level.DEBUG);   
          log.info("Entered feedback activity.");
          
          btn00 = (Button) findViewById(R.id.yesevent1);
  		btn01 = (Button) findViewById(R.id.noevent1);
  		//btn10 = (Button) findViewById(R.id.yesevent2);
  		//btn11 = (Button) findViewById(R.id.noevent2);
  		tv = (TextView) findViewById(R.id.event);
  		//btn00.setBackgroundColor(Color.GREEN);
  		//btn01.setBackgroundColor(Color.RED);
  		//btn10.setBackgroundColor(Color.RED);
  		//btn11.setBackgroundColor(Color.GREEN);
  		
          PowerManager pm = (PowerManager) getApplicationContext().getSystemService(Context.POWER_SERVICE);
          wakeLock = pm.newWakeLock((PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "TAG");
          wakeLock.acquire();
          KeyguardManager keyguardManager = (KeyguardManager) getApplicationContext().getSystemService(Context.KEYGUARD_SERVICE); 
          keyguardLock = keyguardManager.newKeyguardLock("TAG");
          keyguardLock.disableKeyguard();
          
          Intent intent = getIntent();
          Bundle extras = getIntent().getExtras();        
  		if(extras != null){
  			if(extras.containsKey("event")){
  				event = extras.getBoolean("event");
  			}
          	if(extras.containsKey("decision")){
          		decision = extras.getBoolean("decision");
          	}
          	if(extras.containsKey("ts")){
          		ts = extras.getString("ts");
          	}
          	if(extras.containsKey("cancel")){
          		cancel = extras.getBoolean("cancel");
          	}
          }
  		
  		if(event){
  			tv.setText("unlocked");
  			btn00.setText("Yes");
  			btn01.setText("No, Lock my PC");
  			btn00.setBackgroundColor(Color.GREEN);
  			btn01.setBackgroundColor(Color.RED);
  			//btn10.setVisibility(View.INVISIBLE);
  			//btn11.setVisibility(View.INVISIBLE);
  		}else{
  			tv.setText("locked");
  			btn00.setText("Yes, Unlock my PC");
  			btn01.setText("No");
  			btn00.setBackgroundColor(Color.RED);
  			btn01.setBackgroundColor(Color.GREEN);
  			//btn00.setVisibility(View.INVISIBLE);
  			//btn01.setVisibility(View.INVISIBLE);
  		}
  		
  		//pM = new PrefManager(getApplicationContext());
  		
  		btn00.setOnClickListener(new Button.OnClickListener(){
  
  			@Override
  			public void onClick(View v) {
  				// TODO Auto-generated method stub
  				log.info("TP button clicked");	
  				cancelNotification();
  				if(event){
  					// TP
  					DaemonService.mConsumer.sendFeedback("1", ts);
  				}else{
  					// FN
  					DaemonService.mConsumer.sendFeedback("4", ts);
  				}
  				
  				FeedbackActivity.this.finish();
  			}
  			
  		});
  		
  		btn01.setOnClickListener(new Button.OnClickListener(){
  
  			@Override
  			public void onClick(View v) {
  				// TODO Auto-generated method stub
  				log.info("FP button clicked");
  				cancelNotification();
  				if(event){
  					// FP
  					DaemonService.mConsumer.sendFeedback("2", ts);
  				}else{
  					// TN
  					DaemonService.mConsumer.sendFeedback("3", ts);
  				}
  				
  				FeedbackActivity.this.finish();
  			}
  			
  		});
  		
  		/*btn10.setOnClickListener(new Button.OnClickListener(){
  
  			@Override
  			public void onClick(View v) {
  				// TODO Auto-generated method stub
  				log.info("FN button clicked");	
  				cancelNotification();
  				DaemonService.mConsumer.sendFeedback("4", ts);
  				FeedbackActivity.this.finish();
  			}
  			
  		});
  		
  		btn11.setOnClickListener(new Button.OnClickListener(){
  
  			@Override
  			public void onClick(View v) {
  				// TODO Auto-generated method stub
  				log.info("TN button clicked");
  				cancelNotification();
  				DaemonService.mConsumer.sendFeedback("3", ts);
  				FeedbackActivity.this.finish();
  			}
  			
  		});*/
  		
  		timer = new CountDownTimer(10000, 1000) {
  
  			@Override
  			public void onFinish() {
  				// TODO Auto-generated method stub
  				//showNotification();
  				finish();
  			}
  
  			@Override
  			public void onTick(long millisUntilFinished) {
  				// TODO Auto-generated method stub
  			}
  			
  		};
  				
  		
  	    if(!cancel){
  	    	Vibrator vib = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
  		    vib.vibrate(1000);
  	    	showNotification();
  		    try {
  				DaemonService.mConsumer.notificationTimeout(0);
  			} catch (InterruptedException e) {
  				// TODO Auto-generated catch block
  				e.printStackTrace();
  			}
  	    }	    
  		
  	}
  
  	@Override
  	public boolean onCreateOptionsMenu(Menu menu) {
  		// Inflate the menu; this adds items to the action bar if it is present.
  		getMenuInflater().inflate(R.menu.feedback, menu);
  		return true;
  	}
  	
  	@Override
      public boolean onOptionsItemSelected(MenuItem item) {
      	switch (item.getItemId()) {
      		case R.id.stat:
      		/*	int fn = pM.getFalseEventCounter();
      			int tn = pM.getEventCounter();
      			
      		new AlertDialog.Builder(this).setTitle("Statistics").setMessage("Total unlock: "+tn+"\nFalse unlock: "+fn)
      		.setCancelable(false).setNegativeButton("Got it", new DialogInterface.OnClickListener()
  