# Need help implementing logic or a delay of some kind. Arduino + Android = WiFi Garage Door opener.



## dl_evans (Dec 13, 2011)

EDIT: Got the code to work with the help of JBirdVegas. Final code is on the third page of this thread. If you've got any questions let me know. Thanks.

I've posted this on Phandroid.com and HackADay.com's forums as well as StackOverflow.com to no avail so far. On Stack Overflow someone suggested I use a timed task like this:


```
<br />
new CountDownTimer(3000, 1000) { //30 seconds count-down<br />
public void onTick(long millisUntilFinished) {<br />
	 //no need to do anything here<br />
}<br />
public void onFinish() {<br />
	 turnOffCircuit();<br />
}<br />
}.start();<br />
```
but in my testing I couldn't get it to stop and so every 3 seconds it pushed the button when it only should have pushed it once. I know how it should work I just can't wrap my head around how to do it.

Thanks for taking a look and offering any suggestions you might have.

Right now it works like this:
-------------------------------------------------------------------
Door	| Circuit
closed | off -- default: door closed circuit off
open | on -- button pushed 1st time: door open circuit on
open | off -- button pushed 2nd time: door open circuit off
closed | on -- button pushed 3rd time: door closed circuit on
closed | off -- button pushed 4th time: door closed circuit off

It should work like this:

---------------------------------------------------------------------
Door	| Circuit
closed | off -- default: door closed circuit off
open | on -- button pushed 1st time: door open circuit on
open | off -- after a set delay the app automatically closes circuit
closed | on -- button pushed 2nd time: door closed circuit on
closed | off -- after a set delay the app automatically closes circuit

For the Android code you'll need JSOUP from http://jsoup.org/download
and to add it to your Eclipse project you'll need to:

Download the library to your host development system.
Create a new folder, libs, in your Eclipse/Android project.
Right-click libs and choose Import -> General -> File System, then Next, Browse in the filesystem to find the library's parent directory (i.e.: where you downloaded it to).
Click OK, then click the directory name (not the checkbox) in the left pane, then check the relevant JAR in the right pane. This puts the library into your project (physically).
Right-click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then Add JARs..., navigate to your new JAR in the libs directory and add it. (This, incidentally, is the moment at which your new JAR is converted for use on Android.)

Install instructions from: http://stackoverflow...3643015#3643015

Arduino Code:



```
<br />
#include <WiServer.h><br />
#include <string.h><br />
#define WIRELESS_MODE_INFRA 1<br />
#define WIRELESS_MODE_ADHOC 2<br />
#define ledPin1 5  //extra pin<br />
#define ledPin2 6  //pin wired to the garage door remote<br />
#define ledPin3 9  //pin that turns off the red LED on the WiShield<br />
// Wireless configuration parameters -----------<br />
unsigned char local_ip[] = {192,168,1,225}; // IP address of WiShield<br />
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address<br />
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network<br />
char ssid[] = {"Linksys"}; // max 32 bytes<br />
unsigned char security_type = 0; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2<br />
// WPA/WPA2 passphrase<br />
const prog_char security_passphrase[] PROGMEM = {"password"};<br />
// max 64 characters<br />
// WEP 128-bit keys<br />
prog_uchar wep_keys[] PROGMEM = {<br />
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0<br />
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1<br />
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2<br />
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3<br />
};<br />
// setup the wireless mode; infrastructure -<br />
//connect to AP; adhoc - connect to another WiFi device<br />
#define WIRELESS_MODE_INFRA 1<br />
#define WIRELESS_MODE_ADHOC 2<br />
unsigned char wireless_mode = WIRELESS_MODE_INFRA;<br />
unsigned char ssid_len;<br />
unsigned char security_passphrase_len;<br />
// End of wireless configuration parameters ------------------<br />
boolean states[3]; //holds led states<br />
char stateCounter; //used as a temporary variable<br />
char tmpStrCat[100]; //used in processing the web page<br />
char stateBuff[4]; //used in text processing around boolToString()<br />
char numAsCharBuff[2];<br />
char ledChange;<br />
void boolToString (boolean test, char returnBuffer[4])<br />
{<br />
returnBuffer[0] = '\0';<br />
if (test)<br />
{<br />
strcat(returnBuffer, "Open");<br />
}<br />
else<br />
{<br />
strcat(returnBuffer, "Closed");<br />
}<br />
}<br />
void printStates()<br />
{<br />
for (stateCounter = 0 ; stateCounter < 3; stateCounter++)<br />
{<br />
boolToString(states[stateCounter], stateBuff);<br />
Serial.print("State of ");<br />
Serial.print(stateCounter);<br />
Serial.print(": ");<br />
Serial.println(stateBuff);<br />
}<br />
}<br />
void writeStates()<br />
{<br />
//set led states<br />
digitalWrite(ledPin1, states[0]);<br />
digitalWrite(ledPin2, states[1]);<br />
digitalWrite(ledPin3, states[2]);<br />
}<br />
// This is our page serving function that generates web pages<br />
boolean sendPage(char* URL) {<br />
Serial.println("Page printing begun");<br />
printStates();<br />
writeStates();<br />
//check whether we need to change the led state<br />
if (URL[1] == '?' && URL[2] == 'L' && URL[3] == 'E' && URL[4] == 'D')<br />
//url has a leading /<br />
{<br />
ledChange = (int)(URL[5] - 48); //get the led to change.<br />
for (stateCounter = 0 ; stateCounter < 3; stateCounter++)<br />
{<br />
if (ledChange == stateCounter)<br />
{<br />
states[stateCounter] = !states[stateCounter];<br />
Serial.print("Have changed ");<br />
Serial.println(ledChange);<br />
}<br />
}<br />
//after having change state, return the user to the index page.<br />
WiServer.print("<HTML><HEAD><meta http-equiv='REFRESH' content='0;url=/'></HEAD></HTML>");<br />
return true;<br />
}<br />
if (strcmp(URL, "/") == false) //why is this not true?<br />
{<br />
WiServer.print("<html><head><title>Door Opener</title></head>");<br />
WiServer.print("<body><center>GARAGE DOOR OPENER<center>\n<center><BR><BR>");<br />
for (stateCounter = 0; stateCounter < 3; stateCounter++) //for each led<br />
{<br />
numAsCharBuff[0] = (char)(stateCounter + 49); //as this is displayed use 1 - 3 rather than 0 - 2<br />
numAsCharBuff[1] = '\0'; //strcat expects a string (array of chars) rather than a single character.<br />
//This string is a character plus string terminator.<br />
tmpStrCat[0] = '\0'; //initialise string<br />
strcat(tmpStrCat, "<input type=\"submit\" onclick=\"location=\'/?LED \'\" value=\"Opener \""); //start the string<br />
tmpStrCat[45] = (char)(stateCounter + 48); //add the led number<br />
tmpStrCat[63] = (char)(stateCounter + 49);<br />
tmpStrCat[66] = '\0'; //terminate the string properly for later.<br />
strcat(tmpStrCat, ">");<br />
boolToString(states[stateCounter], stateBuff);<br />
strcat(tmpStrCat, "Door ");<br />
strcat(tmpStrCat, stateBuff);<br />
strcat(tmpStrCat, "<br>");<br />
//strcat(tmpStrCat, "</a> ");<br />
//we now have something in the range of <a href=?LED0>Led 0: Off</a><br />
WiServer.print(tmpStrCat);<br />
}<br />
WiServer.print("</html> ");<br />
return true;<br />
}<br />
}<br />
void setup() {<br />
// Initialize WiServer and have it use the sendMyPage function to serve pages<br />
pinMode(ledPin1, OUTPUT);<br />
pinMode(ledPin2, OUTPUT);<br />
pinMode(ledPin3, OUTPUT);<br />
Serial.begin(9600);<br />
WiServer.init(sendPage);<br />
states[0] = false;<br />
states[1] = false;<br />
states[2] = false;<br />
}<br />
void loop(){<br />
// Run WiServer<br />
WiServer.server_task();<br />
delay(10);<br />
}<br />
```
Android Code:



```
<br />
package com.garagedoor.opener;<br />
import java.io.BufferedReader;<br />
import java.io.InputStreamReader;<br />
import java.net.URI;[/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,]import org.apache.http.HttpEntity;<br />
import org.apache.http.HttpResponse;<br />
import org.apache.http.client.HttpClient;<br />
import org.apache.http.client.methods.HttpGet;<br />
import org.apache.http.impl.client.DefaultHttpClient;[/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,]import android.app.Activity;<br />
import android.app.ProgressDialog;<br />
import android.content.Intent;<br />
import android.content.SharedPreferences;<br />
import android.os.AsyncTask;<br />
import android.os.Bundle;<br />
import android.view.Menu;<br />
import android.view.MenuInflater;<br />
import android.view.MenuItem;<br />
import android.view.View;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.Toast;[/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,]public class GarageDoorOpenerActivity extends Activity {<br />
<br />
		//external ip holder<br />
public String publicIP = "";<br />
		//whatever your arduino ip address was set to holder<br />
public String localIP = "";<br />
public String readURL = "";<br />
public String portNumber = "";<br />
public String readpublicIP = "";<br />
public String readlocalIP = "";<br />
public String readportNumber = "";<br />
public String URL = "";<br />
public String garagestate = "";<br />
public String pin = "";<br />
public String pinName = "";<br />
public String networkName = "";<br />
<br />
public int pinCheck = 0;<br />
boolean useExternal;<br />
private static final int REQUEST_CODE = 100;<br />
public String customURL[] = {"http://","/"};<br />
private AsyncTask<?, ?, ?> mTask;<br />
private ProgressDialog dialog = null;<br />
boolean viewLocal = true;<br />
boolean viewPublic = true;<br />
boolean viewPort = true;<br />
boolean viewPin = true;<br />
int buttondDefault = R.drawable.buttondefault;<br />
int doorClosed = R.drawable.doorclosed;<br />
int doorOpen = R.drawable.dooropen;<br />
int option1On = R.drawable.option1on;<br />
int option1Off = R.drawable.option1off;<br />
int arduinoOn = R.drawable.arduinoon;<br />
int arduinoOff = R.drawable.arduinooff;<br />
int option1default = R.drawable.option1default;<br />
int doorDefault = R.drawable.doordefault;<br />
int arduinoDefault = R.drawable.arduinodefault;<br />
<br />
int saved_button = R.drawable.buttondefault;<br />
<br />
public String data = null;<br />
String publicIPpart1 = "";<br />
String publicIPpart2 = "";<br />
String publicIPpart3 = "";<br />
	HttpResponse responseGet = null;[/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,]  @Override<br />
	 public void onCreate(Bundle savedInstanceState) {<br />
		 super.onCreate(savedInstanceState);<br />
		 setContentView(R.layout.main);<br />
		<br />
		 SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
		 publicIP = settings.getString("public_ip", publicIP);<br />
   localIP = settings.getString("local_ip",localIP);<br />
   useExternal = settings.getBoolean("use_external", useExternal);<br />
   pin = settings.getString("arduino_pin",pin);<br />
   portNumber = settings.getString("port_number", portNumber);<br />
   URL = settings.getString("passed_url", URL);<br />
   publicIPpart1 = settings.getString("publicIP_part1", publicIPpart1);<br />
   publicIPpart3 = settings.getString("publicIP_part3", publicIPpart3);<br />
   pinName = settings.getString("pin_name", pinName);<br />
   networkName = settings.getString("network_name", networkName);<br />
   pinCheck = settings.getInt("pin_check",pinCheck);<br />
  <br />
   saved_button = settings.getInt("saved_button",saved_button);<br />
   findViewById(R.id.button1).setBackgroundResource(saved_button);<br />
  <br />
		 EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		 EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		 EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		 displayInternal.setText(localIP);<br />
		 displayExternal.setText(publicIPpart1);<br />
		 displayPort.setText(publicIPpart3);<br />
		 EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		 displayPin.setText(pinName);<br />
		 EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		<br />
		 if(networkName == "External"){<br />
	URL = publicIP;<br />
   }<br />
   if(networkName == "Local"){<br />
	URL = localIP;<br />
   }<br />
		<br />
		 displayNetwork.setText(networkName);<br />
				<br />
		 final Button button = (Button) findViewById(R.id.button1);<br />
		 button.setOnClickListener(new View.OnClickListener() {<br />
			 public void onClick(View v) {<br />
			   // Perform action on click<br />
		   mTask = new httpTask().execute();<br />
		}<br />
		 });<br />
	 }<br />
//OPTIONS MENU INFLATER - FILLS THE OPTIONS MENU<br />
public boolean onCreateOptionsMenu(Menu menu) {<br />
	 MenuInflater inflater = getMenuInflater();<br />
	 inflater.inflate(R.menu.menu, menu);<br />
	 return true;<br />
}<br />
//OPTIONS MENU<br />
public boolean onOptionsItemSelected(MenuItem item) {<br />
		EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
	 switch (item.getItemId()) {<br />
	   case R.id.save:<br />
		Toast.makeText(getBaseContext(), "Settings saved.", Toast.LENGTH_SHORT).show();<br />
		save();<br />
		break;<br />
	   case R.id.pins:<br />
		break;<br />
		case R.id.pin1:<br />
		 pin = "?LED0";<br />
		 pinCheck = 1;<br />
			   pinName = "Option 1";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.option1default);<br />
		 saved_button = R.drawable.option1default;<br />
			   save();<br />
		 break;<br />
		case R.id.pin2:<br />
		 pin = "?LED1";<br />
		 pinCheck = 2;<br />
			   pinName = "Garage Door";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.doordefault);<br />
			   saved_button = R.drawable.doordefault;<br />
			   save();<br />
		 break;<br />
		case R.id.pin3:<br />
		 pin = "?LED2";<br />
		 pinCheck = 3;<br />
		 pinName = "Arduino LED";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinodefault);<br />
			   saved_button = R.drawable.arduinodefault;<br />
			   save();<br />
		 break;<br />
	   case R.id.useExternal:<br />
		if(useExternal == false){<br />
		 URL = localIP;<br />
		 useExternal = true;<br />
		 networkName = "Local";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
		}<br />
		else if(useExternal == true){<br />
		 URL = publicIP;<br />
		 useExternal = false;<br />
		 networkName = "External";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
		}else {<br />
		break;<br />
		}<br />
	   case R.id.inputIP:<br />
		enterIP();<br />
		break;<br />
	   case R.id.clear:<br />
		publicIP = "";<br />
		readURL = "";<br />
		portNumber = "";<br />
		readpublicIP = "";<br />
		readlocalIP = "";<br />
		readportNumber = "";<br />
		URL = "";<br />
		garagestate = "";<br />
		pin = "";<br />
		publicIPpart2 = "";<br />
		networkName = "";<br />
		pinName = "";<br />
		localIP = "";<br />
		publicIPpart1 = "";<br />
		publicIPpart3 = "";<br />
		displayNetwork.setText(networkName);<br />
			  displayPin.setText(pinName);<br />
			  displayInternal.setText(localIP);<br />
			  displayExternal.setText(publicIPpart1);<br />
			  displayPort.setText(publicIPpart3);<br />
			  findViewById(R.id.button1).setBackgroundResource(R.drawable.buttondefault);<br />
			  saved_button = R.drawable.buttondefault;<br />
		save();<br />
		break;	  <br />
	 }<br />
	 return true;<br />
}<br />
//Http Task<br />
private class httpTask extends AsyncTask<Void, Void, Void> {<br />
	HttpEntity resEntityGet = null;[/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,]  @Override<br />
  protected void onPreExecute() {<br />
	  GetMethod test = new GetMethod();<br />
		String returned;<br />
   try {<br />
	returned = test.getInternetData();<br />
	if (pinCheck == 1){<br />
	 //Toast.makeText(getBaseContext(), "pinCheck = 1.", Toast.LENGTH_SHORT).show();<br />
	  if(returned.toString().contains("\"Opener 1\">Door Closed")){  //"\"Opener 1\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Option 1 on.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
	 }<br />
	 if(returned.toString().contains("\"Opener 1\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Option 1 off.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 2){<br />
		//Toast.makeText(getBaseContext(), "pinCheck = 2.", Toast.LENGTH_SHORT).show();<br />
	 if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Opening the door.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 2\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Closing the door.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 3){<br />
		//Toast.makeText(getBaseContext(), "pinCheck = 3.", Toast.LENGTH_SHORT).show();<br />
	 if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Turning on the LED.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 3\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Turning off the LED.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);	  <br />
	 }<br />
	 }<br />
   } catch (Exception e) {<br />
	// TODO Auto-generated catch block<br />
	e.printStackTrace();<br />
   }<br />
   dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
   dialog.setMessage("Working");<br />
   dialog.show();<br />
  }<br />
  @Override<br />
  protected Void doInBackground(Void... params) {<br />
	try {<br />
		HttpClient client = new DefaultHttpClient();<br />
		HttpGet get = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		responseGet = client.execute(get);<br />
		resEntityGet = responseGet.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
  return null;<br />
  }<br />
  @Override<br />
  protected void onPostExecute(Void params) {<br />
   if(dialog.isShowing())<br />
	dialog.dismiss();<br />
		if (resEntityGet != null) {<br />
		 Toast.makeText(getBaseContext(), "Done. ", Toast.LENGTH_SHORT).show();<br />
		 resEntityGet = null;<br />
		}<br />
  }<br />
}<br />
	public class GetMethod {<br />
	 public String getInternetData() throws Exception{<br />
	  BufferedReader in = null;<br />
	  String data = null;<br />
	  try{<br />
	   HttpClient client = new DefaultHttpClient();<br />
	   URI url = new URI(customURL[0] + URL + customURL[1]); //customURL[0] + URL + customURL[1]<br />
	   HttpGet request = new HttpGet();<br />
	   request.setURI(url);<br />
	   HttpResponse response = client.execute(request);<br />
	   in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));<br />
	   StringBuffer sb = new StringBuffer("");<br />
	   String l = "";<br />
	   String nl = System.getProperty("line.separator");<br />
	   while ((l = in.readLine()) !=null){<br />
		sb.append(l + nl);  <br />
	   }<br />
	   in.close();<br />
	   data = sb.toString();<br />
	   return data;<br />
	  } finally{<br />
	   if (in !=null){<br />
		try{<br />
		 in.close();<br />
		 return data;<br />
		} catch (Exception e){<br />
		 e.printStackTrace();<br />
		}<br />
	   }<br />
	  }<br />
	 }<br />
	}<br />
//Local / Public IP Address Entry<br />
public void enterIP(){<br />
		Intent j = new Intent(this, enterIP.class);<br />
		j.putExtra("public_ip", publicIP);<br />
		j.putExtra("local_ip", localIP);<br />
		j.putExtra("port_number", portNumber);<br />
  startActivityForResult(j, REQUEST_CODE);<br />
}<br />
//Activity Result<br />
public void onActivityResult(int requestCode, int resultCode, Intent data) {<br />
  if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {<br />
   if (data.hasExtra("public_ip")){<br />
	readpublicIP = data.getExtras().getString("public_ip");<br />
	publicIPpart1 = String.valueOf(readpublicIP);<br />
   }<br />
   if (data.hasExtra("local_ip")){<br />
	readlocalIP = data.getExtras().getString("local_ip");<br />
	localIP = String.valueOf(readlocalIP);<br />
   }<br />
   if (data.hasExtra("port_number")){<br />
	readportNumber = data.getExtras().getString("port_number");<br />
	publicIPpart3 = String.valueOf(readportNumber);<br />
   }<br />
	publicIPpart2 = ":";<br />
	publicIP = (publicIPpart1 + publicIPpart2 + publicIPpart3);<br />
   }<br />
  EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		displayInternal.setText(localIP);<br />
		displayExternal.setText(publicIPpart1);<br />
		displayPort.setText(publicIPpart3);<br />
  save();<br />
  }<br />
//SAVE FUNCTION<br />
private void save() {<br />
  SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
  SharedPreferences.Editor prefEditor = settings.edit();<br />
  prefEditor.putString("publicIP_part1", publicIPpart1);<br />
  prefEditor.putString("publicIP_part3", publicIPpart3);<br />
  prefEditor.putString("public_ip", publicIP);<br />
  prefEditor.putString("local_ip",localIP);<br />
  prefEditor.putBoolean("use_external", useExternal);<br />
  prefEditor.putString("arduino_pin",pin);<br />
  prefEditor.putString("port_number", portNumber);<br />
  prefEditor.putString("passed_url", URL);<br />
  prefEditor.putString("pin_name", pinName);<br />
  prefEditor.putString("network_name", networkName);<br />
  prefEditor.putInt("pin_check",pinCheck);<br />
  prefEditor.putInt("saved_button",saved_button);<br />
  prefEditor.commit();  <br />
}<br />
//On Pause<br />
@Override<br />
protected void onPause() {<br />
  super.onPause();<br />
  if(dialog != null && dialog.isShowing())<br />
   dialog.dismiss();<br />
  if(mTask != null && mTask.getStatus() == AsyncTask.Status.RUNNING)<br />
   mTask.cancel(true);<br />
}<br />
}<br />
```
[background=rgb(245, 245, 255)]enterIP class:[/background]

[background=rgb(245, 245, 255)]

```
<br />
package com.garagedoor.opener;[/background][/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,][background=rgb(245, 245, 255)]import android.app.Activity;<br />
import android.content.Intent;<br />
import android.os.Bundle;<br />
import android.view.View;<br />
import android.view.View.OnClickListener;<br />
import android.widget.Button;<br />
import android.widget.EditText;[/background][/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,][background=rgb(245, 245, 255)]public class enterIP extends Activity {<br />
String publicIP = "";<br />
String localIP = "";<br />
String portNumber = "";<br />
private EditText publicIpText;<br />
private EditText localIpText;<br />
private EditText portNumberText;<br />
<br />
  @Override<br />
  protected void onCreate(final Bundle savedInstanceState) {<br />
   super.onCreate(savedInstanceState);<br />
   setContentView(R.layout.enterip);[/background][/font][/color]<br />
[color=#000000][font=verdana, geneva, lucida,][background=rgb(245, 245, 255)]   //Button to set the user's upc code<br />
   final Button button1 = (Button) findViewById(R.id.savebutton);<br />
	  button1.setOnClickListener(new OnClickListener() {<br />
			public void onClick(View v) {<br />
			<br />
			localIpText = (EditText) findViewById(R.id.editText1);<br />
			localIP = localIpText.getText().toString();<br />
		  <br />
			publicIpText = (EditText) findViewById(R.id.editText2);<br />
			publicIP = publicIpText.getText().toString();<br />
		  <br />
			portNumberText = (EditText) findViewById(R.id.editText3);<br />
			portNumber = portNumberText.getText().toString();<br />
		  finish();<br />
		   }<br />
	 });<br />
	 }<br />
  public void finish() {<br />
   //Returns the user's code back to the main app<br />
	Intent data = new Intent();<br />
	// Return some hard-coded values<br />
	data.putExtra("public_ip", publicIP);<br />
	data.putExtra("local_ip", localIP);<br />
	data.putExtra("port_number", portNumber);<br />
	setResult(RESULT_OK, data);<br />
	//Finish is what is called whenever you hit Back on your phone<br />
	super.finish();<br />
   }<br />
}<br />
```
[/background]

[background=rgb(245, 245, 255)]enterIP allows the user input their IP addresses for local and external. The app takes the IP addresses and adds http:// to the beginning and / to the end. The menu option about the LEDs adds ?LED0 ?LED1 or ?LED2 to the end of the / that was added to the end of the URL. If the ip being used is on the external network a port number that was provided is added after the IP address before the / (8080 is what is port forwarded on the router as port 80 doesn't work with my service provider)[/background]

So when you configure everything and press the button the app sends either:

http://192.168.1.100/?LED2 or http://74.125.224.72/?LED2 depending on your network. 

Video of the Arduino side of things:


----------



## JBirdVegas (Jun 11, 2011)

Perhaps you cod post some code? Not sure how to delay without more details ie are you delaying an intent firing the use postDelayed(Intent,int)

Or if your in a handler use sleep(int) or you could use a timer.

More info or some code examples are needed to help.


----------



## dl_evans (Dec 13, 2011)

JBirdVegas said:


> Perhaps you cod post some code? Not sure how to delay without more details ie are you delaying an intent firing the use postDelayed(Intent,int)
> 
> Or if your in a handler use sleep(int) or you could use a timer.
> 
> More info or some code examples are needed to help.


Are you joking? The code for the Arduino, the main app, and the second class, are all in the original post. There is not one piece of code (besides the .xml layouts) that is NOT posted. Here is a .zip of everything: http://dl.dropbox.com/u/3675342/GarageDoor.zip

The user pushes a button and it turns on an LED or opens the garage door. The app reads the state of the LED and garage door and changes the button's image accordingly. After a few seconds I want the button to be "pushed" again closing the circuit but leaving the garage door open or the LED on and leaving the button's image the way it is.


----------



## JBirdVegas (Jun 11, 2011)

Sorry man when I loaded this thread in tapatalk none of the code showed. I'm looking it over now I can't help with the c but I'll look over the java when I get home I'm sure we can figure something out.


----------



## JBirdVegas (Jun 11, 2011)

Could you just use the SystemClock?

it seems like an almost too simple answer but you may want to try

//http://developer.android.com/reference/android/os/SystemClock.html#sleep(long)
SystemClock.sleep(1000*3);

and I know I just butchered your code but I wanted to show what I was thinking clearly

```
<br />
		  //Toast.makeText(getBaseContext(), "pinCheck = 1.", Toast.LENGTH_SHORT).show();<br />
		  if(returned.toString().contains("\"Opener 1\">Door Closed")){  //"\"Opener 1\">Door Closed"<br />
		  //Toast.makeText(getBaseContext(), "Option 1 on.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
<br />
/* SLEEP HERE */<br />
		  //http://developer.android.com/reference/android/os/SystemClock.html#sleep(long)<br />
		  SystemClock.sleep(1000*3);<br />
<br />
		  //Toast.makeText(getBaseContext(), "Option 1 off.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);  <br />
<br />
		 }<br />
		 if (pinCheck == 2){<br />
			//Toast.makeText(getBaseContext(), "pinCheck = 2.", Toast.LENGTH_SHORT).show();<br />
		 if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
		  //Toast.makeText(getBaseContext(), "Opening the door.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);		  <br />
<br />
/* SLEEP HERE */<br />
		  SystemClock.sleep(1000*3);<br />
<br />
		  //Toast.makeText(getBaseContext(), "Closing the door.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);		<br />
		 }<br />
		 }<br />
		 if (pinCheck == 3){<br />
			//Toast.makeText(getBaseContext(), "pinCheck = 3.", Toast.LENGTH_SHORT).show();<br />
		 if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
		  //Toast.makeText(getBaseContext(), "Turning on the LED.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);		  <br />
<br />
/* SLEEP HERE */<br />
		  SystemClock.sleep(1000*3);<br />
<br />
		  //Toast.makeText(getBaseContext(), "Turning off the LED.", Toast.LENGTH_SHORT).show();<br />
		  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);		<br />
		 }
```


----------



## dl_evans (Dec 13, 2011)

JBirdVegas said:


> Sorry man when I loaded this thread in tapatalk none of the code showed. I'm looking it over now I can't help with the c but I'll look over the java when I get home I'm sure we can figure something out.


You're fine... I notice the website added some formatting and text colorizations I thought maybe it made the code disappear. As far as "butchering" anything feel free. I'm no expert by any means so I have right to complain.

Thanks for taking time to give it a look. I'll try your suggestion.


----------



## dl_evans (Dec 13, 2011)

Well actually


```
<br />
   try {<br />
	returned = test.getInternetData();<br />
	if (pinCheck == 1){<br />
	 //Toast.makeText(getBaseContext(), "pinCheck = 1.", Toast.LENGTH_SHORT).show();<br />
	  if(returned.toString().contains("Google")){  //"\"Opener 1\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Option 1 on.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
	 }<br />
	 if(returned.toString().contains("\"Opener 1\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Option 1 off.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 2){<br />
		//Toast.makeText(getBaseContext(), "pinCheck = 2.", Toast.LENGTH_SHORT).show();<br />
	 if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Opening the door.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 2\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Closing the door.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 3){<br />
		//Toast.makeText(getBaseContext(), "pinCheck = 3.", Toast.LENGTH_SHORT).show();<br />
	 if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
	  //Toast.makeText(getBaseContext(), "Turning on the LED.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 3\">Door Open")){<br />
	  //Toast.makeText(getBaseContext(), "Turning off the LED.", Toast.LENGTH_SHORT).show();<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);	  <br />
	 }<br />
	 }<br />
   } catch (Exception e) {<br />
	// TODO Auto-generated catch block<br />
	e.printStackTrace();<br />
   }<br />
```
Is the feedback to the user.

It reads the state of the buttons from the Arduino's website to change the background of the button in the Android app so the user knows that it actually worked. Before I had the background change when you pressed the button in the app without checking the actual state. This worked, but wasn't reliable. His wife would push the button, too, and he wouldn't know the true state of the Arduino and always had to reset everything. I changed this so that it gets the data from the site _and then_ updates the Android app. If you push close and the door is already closed the button will display this correctly.

I tried


```
<br />
		 final Button button = (Button) findViewById(R.id.button1);<br />
		 button.setOnClickListener(new View.OnClickListener() {<br />
			 public void onClick(View v) {<br />
			   // Perform action on click<br />
			  test2++;<br />
			  if(test2 == 1){<br />
		   mTask = new httpTask().execute();<br />
		   test2++;<br />
			  }<br />
			  SystemClock.sleep(1000*3);<br />
			  if(test2 == 2){<br />
			mTask = new httpTask().execute();<br />
			  test2 = 0;<br />
			  }<br />
		}<br />
		 });<br />
```
but all I got was the spinning dialog that said "working" I think the app hung.


----------



## JBirdVegas (Jun 11, 2011)

humm ok then what about making an new class that just turns off the circut then fire a postDelayed(MyNewAwesomeClass.class, int) right after you execute(), or you could scheadule the new intent within the async pending successful circuit on

EDIT: derpy derpa derp that would be postDelayed(mMyNewAwesomeIntentToKillCircut, int)

yea sometimes I like to over qualify things lol


----------



## dl_evans (Dec 13, 2011)

That *sounds* like it will work... but I've never done a postDelayed class/intent before (I'm not too bad with Google, though). Like I said before I'm no expert. What I've learned so far I've found from having a problem and then Googling it and searching Stack Overflow for an answer then referring to it in future projects. I'll look into it. Thanks.


----------



## dl_evans (Dec 13, 2011)

While Googling you're suggestion I found this post http://stackoverflow...us-in-asynctask and the suggested executing a new AsyncTask as soon as the first one was done.

Well I haven't tried it yet (I'm at work and can't access the Arduino's webserver) but the app doesn't hang...do you think you could look at it to make sure it looks right?

Code:

```
<br />
<br />
package com.garagedoor.opener;<br />
import java.io.BufferedReader;<br />
import java.io.InputStreamReader;<br />
import java.net.URI;<br />
import java.util.Timer;<br />
import java.util.TimerTask;<br />
<br />
import org.apache.http.HttpEntity;<br />
import org.apache.http.HttpResponse;<br />
import org.apache.http.client.HttpClient;<br />
import org.apache.http.client.methods.HttpGet;<br />
import org.apache.http.impl.client.DefaultHttpClient;<br />
<br />
import android.app.Activity;<br />
import android.app.ProgressDialog;<br />
import android.content.Intent;<br />
import android.content.SharedPreferences;<br />
import android.os.AsyncTask;<br />
import android.os.Bundle;<br />
import android.os.Handler;<br />
import android.view.Menu;<br />
import android.view.MenuInflater;<br />
import android.view.MenuItem;<br />
import android.view.View;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.Toast;<br />
<br />
public class GarageDoorOpenerActivity extends Activity {<br />
		//external ip holder<br />
public String publicIP = "";<br />
		//whatever your arduino ip address was set to holder<br />
public String localIP = "";<br />
public String readURL = "";<br />
public String portNumber = "";<br />
public String readpublicIP = "";<br />
public String readlocalIP = "";<br />
public String readportNumber = "";<br />
public String URL = "";<br />
public String garagestate = "";<br />
public String pin = "";<br />
public String pinName = "";<br />
public String networkName = "";<br />
<br />
public int pinCheck = 0;<br />
boolean useExternal;<br />
private static final int REQUEST_CODE = 100;<br />
public String customURL[] = {"http://","/"};<br />
private AsyncTask<?, ?, ?> mTask;<br />
private AsyncTask<?, ?, ?>circuitOffTask;<br />
private ProgressDialog dialog = null;<br />
boolean viewLocal = true;<br />
boolean viewPublic = true;<br />
boolean viewPort = true;<br />
boolean viewPin = true;<br />
int buttondDefault = R.drawable.buttondefault;<br />
int doorClosed = R.drawable.doorclosed;<br />
int doorOpen = R.drawable.dooropen;<br />
int option1On = R.drawable.option1on;<br />
int option1Off = R.drawable.option1off;<br />
int arduinoOn = R.drawable.arduinoon;<br />
int arduinoOff = R.drawable.arduinooff;<br />
int option1default = R.drawable.option1default;<br />
int doorDefault = R.drawable.doordefault;<br />
int arduinoDefault = R.drawable.arduinodefault;<br />
int saved_button = R.drawable.buttondefault;<br />
public String data = null;<br />
String publicIPpart1 = "";<br />
String publicIPpart2 = "";<br />
String publicIPpart3 = "";<br />
	HttpResponse responseGet = null;<br />
<br />
@Override<br />
   public void onCreate(Bundle savedInstanceState) {<br />
	   super.onCreate(savedInstanceState);<br />
	   setContentView(R.layout.main);<br />
<br />
	   SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
	   publicIP = settings.getString("public_ip", publicIP);<br />
localIP = settings.getString("local_ip",localIP);<br />
useExternal = settings.getBoolean("use_external", useExternal);<br />
pin = settings.getString("arduino_pin",pin);<br />
portNumber = settings.getString("port_number", portNumber);<br />
URL = settings.getString("passed_url", URL);<br />
publicIPpart1 = settings.getString("publicIP_part1", publicIPpart1);<br />
publicIPpart3 = settings.getString("publicIP_part3", publicIPpart3);<br />
pinName = settings.getString("pin_name", pinName);<br />
networkName = settings.getString("network_name", networkName);<br />
pinCheck = settings.getInt("pin_check",pinCheck);<br />
saved_button = settings.getInt("saved_button",saved_button);<br />
<br />
findViewById(R.id.button1).setBackgroundResource(saved_button);<br />
	   EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
	   EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
	   EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
	   displayInternal.setText(localIP);<br />
	   displayExternal.setText(publicIPpart1);<br />
	   displayPort.setText(publicIPpart3);<br />
	   EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
	   displayPin.setText(pinName);<br />
	   EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
	   displayNetwork.setText(networkName);<br />
	   if(networkName == "External"){<br />
URL = publicIP;<br />
}<br />
if(networkName == "Local"){<br />
URL = localIP;<br />
}<br />
<br />
	   final Button button = (Button) findViewById(R.id.button1);<br />
			button.setOnClickListener(new View.OnClickListener() {<br />
					public void onClick(View v) {<br />
						 mTask = new httpTask().execute();<br />
					}<br />
			});<br />
   }<br />
<br />
//OPTIONS MENU INFLATER - FILLS THE OPTIONS MENU<br />
public boolean onCreateOptionsMenu(Menu menu) {<br />
   MenuInflater inflater = getMenuInflater();<br />
   inflater.inflate(R.menu.menu, menu);<br />
   return true;<br />
}<br />
<br />
//OPTIONS MENU<br />
public boolean onOptionsItemSelected(MenuItem item) {<br />
		EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
   switch (item.getItemId()) {<br />
	case R.id.save:<br />
	Toast.makeText(getBaseContext(), "Settings saved.", Toast.LENGTH_SHORT).show();<br />
	save();<br />
	break;<br />
	case R.id.pins:<br />
	break;<br />
	case R.id.pin1:<br />
	pin = "?LED0";<br />
	pinCheck = 1;<br />
			pinName = "Option 1";<br />
			displayPin.setText(pinName);<br />
			findViewById(R.id.button1).setBackgroundResource(R.drawable.option1default);<br />
	saved_button = R.drawable.option1default;<br />
			save();<br />
	break;<br />
	case R.id.pin2:<br />
	pin = "?LED1";<br />
	pinCheck = 2;<br />
			pinName = "Garage Door";<br />
			displayPin.setText(pinName);<br />
			findViewById(R.id.button1).setBackgroundResource(R.drawable.doordefault);<br />
			saved_button = R.drawable.doordefault;<br />
			save();<br />
	break;<br />
	case R.id.pin3:<br />
	pin = "?LED2";<br />
	pinCheck = 3;<br />
	pinName = "Arduino LED";<br />
			displayPin.setText(pinName);<br />
			findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinodefault);<br />
			saved_button = R.drawable.arduinodefault;<br />
			save();<br />
	break;<br />
	case R.id.useExternal:<br />
	if(useExternal == false){<br />
	URL = localIP;<br />
	useExternal = true;<br />
	networkName = "Local";<br />
	displayNetwork.setText(networkName);<br />
	save();<br />
	break;<br />
	}<br />
	else if(useExternal == true){<br />
	URL = publicIP;<br />
	useExternal = false;<br />
	networkName = "External";<br />
	displayNetwork.setText(networkName);<br />
	save();<br />
	break;<br />
	}else {<br />
	break;<br />
	}<br />
	case R.id.inputIP:<br />
	enterIP();<br />
	break;<br />
	case R.id.clear:<br />
	publicIP = "";<br />
	readURL = "";<br />
	portNumber = "";<br />
	readpublicIP = "";<br />
	readlocalIP = "";<br />
	readportNumber = "";<br />
	URL = "";<br />
	garagestate = "";<br />
	pin = "";<br />
	publicIPpart2 = "";<br />
	networkName = "";<br />
	pinName = "";<br />
	localIP = "";<br />
	publicIPpart1 = "";<br />
	publicIPpart3 = "";<br />
	 displayNetwork.setText(networkName);<br />
			 displayPin.setText(pinName);<br />
			 displayInternal.setText(localIP);<br />
			 displayExternal.setText(publicIPpart1);<br />
			 displayPort.setText(publicIPpart3);<br />
			 findViewById(R.id.button1).setBackgroundResource(R.drawable.buttondefault);<br />
			 saved_button = R.drawable.buttondefault;<br />
	save();<br />
	break;	  <br />
   }<br />
   return true;<br />
}<br />
<br />
//Http Task<br />
private class httpTask extends AsyncTask<Void, Void, Void> {<br />
	HttpEntity resEntityGet = null;<br />
<br />
@Override<br />
protected void onPreExecute() {<br />
   GetMethod test = new GetMethod();<br />
	  String returned;<br />
try {<br />
returned = test.getInternetData();<br />
if (pinCheck == 1){<br />
if(returned.toString().contains("Google")){  //"\"Opener 1\">Door Closed"<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
}<br />
if(returned.toString().contains("\"Opener 1\">Door Open")){<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);	  <br />
}<br />
}<br />
if (pinCheck == 2){<br />
if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);	  <br />
}<br />
if(returned.toString().contains("\"Opener 2\">Door Open")){<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);	  <br />
}<br />
}<br />
if (pinCheck == 3){<br />
if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);	  <br />
}<br />
if(returned.toString().contains("\"Opener 3\">Door Open")){<br />
findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);	  <br />
}<br />
}<br />
} catch (Exception e) {<br />
e.printStackTrace();<br />
}<br />
dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
dialog.setMessage("Working");<br />
dialog.show();<br />
}<br />
@Override<br />
protected Void doInBackground(Void... params) {<br />
try {<br />
		HttpClient client = new DefaultHttpClient();<br />
		HttpGet get = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		responseGet = client.execute(get);  <br />
		resEntityGet = responseGet.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
return null;<br />
}<br />
@Override<br />
protected void onPostExecute(Void params) {<br />
if(dialog.isShowing())<br />
dialog.dismiss();<br />
		if (resEntityGet != null) {  <br />
		 Toast.makeText(getBaseContext(), "Done. ", Toast.LENGTH_SHORT).show();<br />
		 resEntityGet = null;<br />
		}<br />
<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
//3 second delay before closing the circuit to allow the Arduino page to refresh<br />
        final Handler handler = new Handler();<br />
		Timer t = new Timer();<br />
		t.schedule(new TimerTask() {<br />
				public void run() {<br />
						handler.post(new Runnable() {<br />
								public void run() {<br />
									circuitOffTask = new circuitOff().execute();<br />
								}<br />
						});<br />
				}<br />
		}, 3000);<br />
}<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
//circuitOFf Task<br />
private class circuitOff extends AsyncTask<Void, Void, Void> {<br />
	HttpEntity resEntityGet = null;<br />
<br />
@Override<br />
protected void onPreExecute() {<br />
dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
dialog.setMessage("Closing circuit...");<br />
dialog.show();<br />
}<br />
@Override<br />
protected Void doInBackground(Void... params) {<br />
try {<br />
		HttpClient client = new DefaultHttpClient();<br />
		HttpGet get = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		responseGet = client.execute(get);  <br />
		resEntityGet = responseGet.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
return null;<br />
}<br />
@Override<br />
protected void onPostExecute(Void params) {<br />
if(dialog.isShowing())<br />
dialog.dismiss();<br />
		if (resEntityGet != null) {  <br />
		 Toast.makeText(getBaseContext(), "Circuit closed.", Toast.LENGTH_SHORT).show();<br />
		 resEntityGet = null;<br />
		}<br />
}<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
	public class GetMethod {<br />
	 public String getInternetData() throws Exception{<br />
	 BufferedReader in = null;<br />
	 String data = null;<br />
	 try{<br />
	 HttpClient client = new DefaultHttpClient();<br />
	 URI url = new URI(customURL[0] + URL + customURL[1]); //customURL[0] + URL + customURL[1]<br />
	 HttpGet request = new HttpGet();<br />
	 request.setURI(url);<br />
	 HttpResponse response = client.execute(request);<br />
	 in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));<br />
	 StringBuffer sb = new StringBuffer("");<br />
	 String l = "";<br />
	 String nl = System.getProperty("line.separator");<br />
	 while ((l = in.readLine()) !=null){<br />
	 sb.append(l + nl);<br />
	 }<br />
	 in.close();<br />
	 data = sb.toString();<br />
	 return data;<br />
	 } finally{<br />
	 if (in !=null){<br />
	 try{<br />
	 in.close();<br />
	 return data;<br />
	 } catch (Exception e){<br />
	 e.printStackTrace();<br />
	 }<br />
	 }<br />
	 }<br />
	 }<br />
	}<br />
//Local / Public IP Address Entry<br />
public void enterIP(){<br />
		Intent j = new Intent(this, enterIP.class);<br />
		j.putExtra("public_ip", publicIP);<br />
		j.putExtra("local_ip", localIP);<br />
		j.putExtra("port_number", portNumber);<br />
startActivityForResult(j, REQUEST_CODE);<br />
}<br />
//Activity Result<br />
public void onActivityResult(int requestCode, int resultCode, Intent data) {<br />
if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {<br />
if (data.hasExtra("public_ip")){<br />
readpublicIP = data.getExtras().getString("public_ip");<br />
publicIPpart1 = String.valueOf(readpublicIP);<br />
}<br />
if (data.hasExtra("local_ip")){<br />
readlocalIP = data.getExtras().getString("local_ip");<br />
localIP = String.valueOf(readlocalIP);<br />
}<br />
if (data.hasExtra("port_number")){<br />
readportNumber = data.getExtras().getString("port_number");<br />
publicIPpart3 = String.valueOf(readportNumber);<br />
}<br />
publicIPpart2 = ":";<br />
publicIP = (publicIPpart1 + publicIPpart2 + publicIPpart3);<br />
}<br />
EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		displayInternal.setText(localIP);<br />
		displayExternal.setText(publicIPpart1);<br />
		displayPort.setText(publicIPpart3);<br />
save();<br />
}<br />
//SAVE FUNCTION<br />
private void save() {<br />
SharedPreferences settings = getSharedPreferences("app_settings", 0);  <br />
SharedPreferences.Editor prefEditor = settings.edit();<br />
prefEditor.putString("publicIP_part1", publicIPpart1);<br />
prefEditor.putString("publicIP_part3", publicIPpart3);<br />
prefEditor.putString("public_ip", publicIP);<br />
prefEditor.putString("local_ip",localIP);<br />
prefEditor.putBoolean("use_external", useExternal);<br />
prefEditor.putString("arduino_pin",pin);<br />
prefEditor.putString("port_number", portNumber);<br />
prefEditor.putString("passed_url", URL);<br />
prefEditor.putString("pin_name", pinName);<br />
prefEditor.putString("network_name", networkName);<br />
prefEditor.putInt("pin_check",pinCheck);<br />
prefEditor.putInt("saved_button",saved_button);<br />
prefEditor.commit();<br />
}<br />
//On Pause<br />
@Override<br />
protected void onPause() {<br />
super.onPause();<br />
if(dialog != null && dialog.isShowing()){<br />
dialog.dismiss();<br />
}<br />
if(mTask != null && mTask.getStatus() == AsyncTask.Status.RUNNING){<br />
mTask.cancel(true);<br />
}<br />
if(circuitOffTask != null && circuitOffTask.getStatus() == AsyncTask.Status.RUNNING){<br />
circuitOffTask.cancel(true);<br />
}<br />
}<br />
}<br />
```


----------



## dl_evans (Dec 13, 2011)

Well I just uploaded the .apk to my dropbox and installed it on my phone. It hangs and force closes... but it seemed to work on the emulator when I put google.com as the external IP address and "Google" in the search criteria. Wonder why it worked on the emulator (running 2.2) and not on my phone (Galaxy Nexus 4.0.3)?


----------



## JBirdVegas (Jun 11, 2011)

Looks great but the Timer could be avoided with 
http://developer.android.com/reference/android/os/Handler.html#postDelayed(java.lang.Runnable, long)

But I don't know that is needed I just try to avoid rising timers not handled by the system because I don't know how to handle stopping timers.


----------



## JBirdVegas (Jun 11, 2011)

dl_evans said:


> Well I just uploaded the .apk to my dropbox and installed it on my phone. It hangs and force closes... but it seemed to work on the emulator when I put google.com as the external IP address and "Google" in the search criteria. Wonder why it worked on the emulator (running 2.2) and not on my phone (Galaxy Nexus 4.0.3)?


Can you post the stack trace?

4.0 is picky about long running tasks on the main thread (async or not)... that would be my first guess


----------



## dl_evans (Dec 13, 2011)

JBirdVegas said:


> Looks great but the Timer could be avoided with
> http://developer.and...a.lang.Runnable, long)
> 
> But I don't know that is needed I just try to avoid rising timers not handled by the system because I don't know how to handle stopping timers.


The forum turned that into a link. Is that what you were trying to do? If so can you maybe post an example or something? I'm trying to get the stack trace. I guess the app doesn't force close it hangs and says wait or close and I pushed close.


----------



## dl_evans (Dec 13, 2011)

From LogCat. I put in all the information, cleared the log, and then pressed the button. This is at the moment the app hangs.


```
<br />
04-16 08:55:46.424: I/InputDispatcher(180): Application is not responding: AppWindowToken{41ea2de8 token=Token{41e0c888 ActivityRecord{41ccdfc0 com.garagedoor.opener/.GarageDoorOpenerActivity}}} - Window{41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity paused=false}.  5008.5ms since event, 5006.8ms since wait started<br />
04-16 08:55:46.424: I/WindowManager(180): Input event dispatching timed out sending to com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity<br />
04-16 08:55:46.447: I/Process(180): Sending signal. PID: 6420 SIG: 3<br />
04-16 08:55:46.447: I/dalvikvm(6420): threadid=3: reacting to signal 3<br />
04-16 08:55:46.447: I/dalvikvm(6420): Wrote stack traces to '/data/anr/traces.txt'<br />
04-16 08:55:46.447: I/Process(180): Sending signal. PID: 180 SIG: 3<br />
04-16 08:55:46.455: I/dalvikvm(180): threadid=3: reacting to signal 3<br />
04-16 08:55:46.486: I/dalvikvm(180): Wrote stack traces to '/data/anr/traces.txt'<br />
04-16 08:55:46.486: I/Process(180): Sending signal. PID: 266 SIG: 3<br />
04-16 08:55:46.486: I/dalvikvm(266): threadid=3: reacting to signal 3<br />
04-16 08:55:46.494: I/dalvikvm(266): Wrote stack traces to '/data/anr/traces.txt'<br />
04-16 08:55:46.494: I/Process(180): Sending signal. PID: 385 SIG: 3<br />
04-16 08:55:46.494: I/dalvikvm(385): threadid=3: reacting to signal 3<br />
04-16 08:55:46.502: I/dalvikvm(385): Wrote stack traces to '/data/anr/traces.txt'<br />
04-16 08:55:46.502: I/Process(180): Sending signal. PID: 400 SIG: 3<br />
04-16 08:55:46.502: I/dalvikvm(400): threadid=3: reacting to signal 3<br />
04-16 08:55:46.518: I/dalvikvm(400): Wrote stack traces to '/data/anr/traces.txt'<br />
04-16 08:55:46.736: D/dalvikvm(180): GC_CONCURRENT freed 1596K, 16% free 18593K/22023K, paused 3ms+6ms<br />
04-16 08:55:46.877: D/dalvikvm(180): GC_EXPLICIT freed 340K, 16% free 18637K/22023K, paused 3ms+4ms<br />
04-16 08:55:47.432: W/InputDispatcher(180): Asynchronous input event injection timed out.<br />
04-16 08:55:47.432: E/ActivityManager(180): ANR in com.garagedoor.opener (com.garagedoor.opener/.GarageDoorOpenerActivity)<br />
04-16 08:55:47.432: E/ActivityManager(180): Reason: keyDispatchingTimedOut<br />
04-16 08:55:47.432: E/ActivityManager(180): Load: 0.09 / 0.44 / 0.67<br />
04-16 08:55:47.432: E/ActivityManager(180): CPU usage from 24003ms to 0ms ago:<br />
04-16 08:55:47.432: E/ActivityManager(180):   1.9% 180/system_server: 0.9% user + 1% kernel / faults: 106 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   1.7% 6420/com.garagedoor.opener: 1.2% user + 0.4% kernel / faults: 1622 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   1.3% 266/com.android.systemui: 1.2% user + 0% kernel / faults: 20 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0.8% 114/surfaceflinger: 0.4% user + 0.3% kernel / faults: 706 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0.4% 4618/kworker/u:10: 0% user + 0.4% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0.2% 385/com.android.phone: 0.1% user + 0% kernel / faults: 13 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0.2% 4611/kworker/u:2: 0% user + 0.2% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0.1% 4612/kworker/u:3: 0% user + 0.1% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 363/com.android.inputmethod.latin: 0% user + 0% kernel / faults: 7 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 1//init: 0% user + 0% kernel / faults: 36 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 4/kworker/0:0: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 22/kinteractiveup: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 105/irq/206-mms_ts: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 127/adbd: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 323/com.google.process.gapps: 0% user + 0% kernel / faults: 5 minor<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 6125/kworker/1:0: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):   0% 6436/logcat: 0% user + 0% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180): 3.7% TOTAL: 2.1% user + 1.5% kernel + 0.1% iowait<br />
04-16 08:55:47.432: E/ActivityManager(180): CPU usage from 457ms to 972ms later with 99% awake:<br />
04-16 08:55:47.432: E/ActivityManager(180):   5.6% 180/system_server: 0% user + 5.6% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180):	 3.7% 225/InputDispatcher: 0% user + 3.7% kernel<br />
04-16 08:55:47.432: E/ActivityManager(180): 2% TOTAL: 0% user + 2% kernel<br />
04-16 08:55:49.190: W/ActivityManager(180):   Force finishing activity com.garagedoor.opener/.GarageDoorOpenerActivity<br />
04-16 08:55:49.252: I/ActivityManager(180): Killing ProcessRecord{41a040c0 6420:com.garagedoor.opener/10115}: user's request<br />
04-16 08:55:49.268: I/ActivityManager(180): Process com.garagedoor.opener (pid 6420) has died.<br />
04-16 08:55:49.275: W/InputDispatcher(180): channel '41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8<br />
04-16 08:55:49.275: E/InputDispatcher(180): channel '41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!<br />
04-16 08:55:49.275: W/InputDispatcher(180): Attempted to unregister already unregistered input channel '41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity (server)'<br />
04-16 08:55:49.275: I/WindowManager(180): WIN DEATH: Window{41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity paused=true}<br />
04-16 08:55:49.283: I/WindowManager(180): WINDOW DIED Window{41b84a98 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity paused=true}<br />
04-16 08:55:49.377: W/InputManagerService(180): Got RemoteException sending setActive(false) notification to pid 6420 uid 10115<br />
```


----------



## dl_evans (Dec 13, 2011)

Actual traces.txt (didn't know it actually posted here... thought it was just logcat stuff you were wanting)

*edit* I had erased most of the traces.txt as it was pretty long and then I figured you might need the whole thing so I put the entire log back in. I just got off work so I'm going to go to sleep for awhile. Thanks a lot for looking at this. Seriously. I have a bigger respect for Android devs now. Just to think you guys do this on a bigger scale... for fun. Couldn't imagine having a job, a life, plus any social interaction on top of squashing bugs or coding all day.


```
<br />
----- pid 6420 at 2012-04-16 08:55:46 -----<br />
Cmd line: com.garagedoor.opener<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a51460 self=0x15d3828<br />
  | sysTid=6420 nice=0 sched=0/0 cgrp=default handle=1074381960<br />
  | schedstat=( 0 0 0 ) utm=182 stm=42 core=1<br />
  at libcore.io.Posix.connect(Native Method)<br />
  at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)<br />
  at libcore.io.IoBridge.connectErrno(IoBridge.java:127)<br />
  at libcore.io.IoBridge.connect(IoBridge.java:112)<br />
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)<br />
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)<br />
  at java.net.Socket.connect(Socket.java:842)<br />
  at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)<br />
  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)<br />
  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)<br />
  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)<br />
  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$GetMethod.getInternetData(GarageDoorOpenerActivity.java:334)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$httpTask.onPreExecute(GarageDoorOpenerActivity.java:226)<br />
  at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:561)<br />
  at android.os.AsyncTask.execute(AsyncTask.java:511)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$1.onClick(GarageDoorOpenerActivity.java:113)<br />
  at android.view.View.performClick(View.java:3511)<br />
  at android.view.View$PerformClick.run(View.java:14105)<br />
  at android.os.Handler.handleCallback(Handler.java:605)<br />
  at android.os.Handler.dispatchMessage(Handler.java:92)<br />
  at android.os.Looper.loop(Looper.java:137)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"Binder Thread #3" prio=5 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ab0e0 self=0x179b760<br />
  | sysTid=6506 nice=0 sched=0/0 cgrp=default handle=24529736<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416adff0 self=0x174fa70<br />
  | sysTid=6432 nice=0 sched=0/0 cgrp=default handle=24851696<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416adda8 self=0x1783698<br />
  | sysTid=6431 nice=0 sched=0/0 cgrp=default handle=24787080<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416acc18 self=0x17b5a10<br />
  | sysTid=6430 nice=0 sched=0/0 cgrp=default handle=24786640<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416acac0 self=0x16fa4d0<br />
  | sysTid=6429 nice=0 sched=0/0 cgrp=default handle=24787016<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a475d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ac958 self=0x17a9938<br />
  | sysTid=6428 nice=0 sched=0/0 cgrp=default handle=24786280<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a474f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416ac868 self=0x17b3d70<br />
  | sysTid=6427 nice=0 sched=0/0 cgrp=default handle=24796496<br />
  | schedstat=( 0 0 0 ) utm=15 stm=9 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416ac780 self=0x17aa7d0<br />
  | sysTid=6426 nice=0 sched=0/0 cgrp=default handle=24645400<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x416ac688 self=0x1798698<br />
  | sysTid=6423 nice=0 sched=0/0 cgrp=default handle=24160872<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416ac5a8 self=0x1658cb8<br />
  | sysTid=6421 nice=0 sched=0/0 cgrp=default handle=24599736<br />
  | schedstat=( 0 0 0 ) utm=3 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 6420 -----<br />
<br />
----- pid 180 at 2012-04-16 08:55:46 -----<br />
Cmd line: system_server<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a51460 self=0x15d3828<br />
  | sysTid=180 nice=0 sched=0/0 cgrp=default handle=1074381960<br />
  | schedstat=( 0 0 0 ) utm=203 stm=64 core=0<br />
  at com.android.server.SystemServer.init1(Native Method)<br />
  at com.android.server.SystemServer.main(SystemServer.java:808)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"Timer-3" prio=5 tid=74 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c2bfa0 self=0x1a343b8<br />
  | sysTid=6470 nice=0 sched=0/0 cgrp=default handle=26482616<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41c2bfa0> (a java.util.Timer$TimerImpl)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.util.Timer$TimerImpl.run(Timer.java:238)<br />
"Timer-2" prio=5 tid=73 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c3a628 self=0x1bdb2e8<br />
  | sysTid=6469 nice=0 sched=0/0 cgrp=default handle=29558384<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41c3a628> (a java.util.Timer$TimerImpl)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.util.Timer$TimerImpl.run(Timer.java:238)<br />
"Binder Thread #13" prio=5 tid=70 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41d6fdc8 self=0x1a9e6d8<br />
  | sysTid=5341 nice=0 sched=0/0 cgrp=default handle=24560424<br />
  | schedstat=( 0 0 0 ) utm=31 stm=11 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #12" prio=5 tid=69 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b889f0 self=0x1af1bf8<br />
  | sysTid=5308 nice=0 sched=0/0 cgrp=default handle=27311328<br />
  | schedstat=( 0 0 0 ) utm=31 stm=10 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #11" prio=5 tid=68 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c549a0 self=0x1ad7278<br />
  | sysTid=2810 nice=0 sched=0/0 cgrp=default handle=26842512<br />
  | schedstat=( 0 0 0 ) utm=127 stm=44 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #10" prio=5 tid=67 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41cce1a8 self=0x1c14aa8<br />
  | sysTid=2294 nice=0 sched=0/0 cgrp=default handle=25958832<br />
  | schedstat=( 0 0 0 ) utm=136 stm=43 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPoolThread" prio=5 tid=72 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c4f0a8 self=0x1ba5878<br />
  | sysTid=582 nice=0 sched=0/0 cgrp=default handle=28981808<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPool" prio=5 tid=71 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c4e8a8 self=0x1ba47f0<br />
  | sysTid=581 nice=0 sched=0/0 cgrp=default handle=28970656<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"pool-1-thread-1" prio=5 tid=66 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a40168 self=0x18f47d0<br />
  | sysTid=529 nice=0 sched=0/0 cgrp=default handle=25947456<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41a43488> (a java.lang.VMThread) held by tid=66 (pool-1-thread-1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"GpsLocationProvider" prio=5 tid=65 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41bdc038 self=0x18a1bd0<br />
  | sysTid=493 nice=10 sched=0/0 cgrp=bg_non_interactive handle=25920224<br />
  | schedstat=( 0 0 0 ) utm=2 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.location.GpsLocationProvider$GpsLocationProviderThread.run(GpsLocationProvider.java:1603)<br />
"[email protected]@41ae8c00" daemon prio=5 tid=64 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a9f4e8 self=0x181db70<br />
  | sysTid=460 nice=0 sched=0/0 cgrp=default handle=26107176<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x417a6690> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at org.apache.http.impl.conn.tsccm.RefQueueWorker.run(RefQueueWorker.java:102)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #9" prio=5 tid=63 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419e4c58 self=0x18bf658<br />
  | sysTid=456 nice=0 sched=0/0 cgrp=default handle=26318144<br />
  | schedstat=( 0 0 0 ) utm=169 stm=59 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #8" prio=5 tid=62 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a613c0 self=0x18ef380<br />
  | sysTid=440 nice=0 sched=0/0 cgrp=default handle=25683000<br />
  | schedstat=( 0 0 0 ) utm=177 stm=65 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #7" prio=5 tid=61 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a3ffd0 self=0x191e430<br />
  | sysTid=433 nice=0 sched=0/0 cgrp=default handle=25167080<br />
  | schedstat=( 0 0 0 ) utm=218 stm=66 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #6" prio=5 tid=60 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416fe890 self=0x17ffd50<br />
  | sysTid=432 nice=0 sched=0/0 cgrp=default handle=25418384<br />
  | schedstat=( 0 0 0 ) utm=197 stm=52 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #5" prio=5 tid=59 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a296f0 self=0x17fdf88<br />
  | sysTid=419 nice=0 sched=0/0 cgrp=default handle=26151376<br />
  | schedstat=( 0 0 0 ) utm=208 stm=60 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #4" prio=5 tid=58 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a85218 self=0x1918670<br />
  | sysTid=399 nice=0 sched=0/0 cgrp=default handle=25966784<br />
  | schedstat=( 0 0 0 ) utm=185 stm=66 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"NetworkTimeUpdateService" prio=5 tid=57 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a36d08 self=0x1924380<br />
  | sysTid=380 nice=0 sched=0/0 cgrp=default handle=24550528<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ThrottleService" prio=5 tid=56 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a4da10 self=0x1891f50<br />
  | sysTid=378 nice=0 sched=0/0 cgrp=default handle=24111248<br />
  | schedstat=( 0 0 0 ) utm=9 stm=6 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"CountryDetectorService" prio=5 tid=55 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41aedc18 self=0x18c2ca8<br />
  | sysTid=377 nice=10 sched=0/0 cgrp=bg_non_interactive handle=25964792<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.CountryDetectorService.run(CountryDetectorService.java:188)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"LocationManagerService" prio=5 tid=54 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b95118 self=0x18c2188<br />
  | sysTid=376 nice=10 sched=0/0 cgrp=bg_non_interactive handle=25736240<br />
  | schedstat=( 0 0 0 ) utm=11 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.LocationManagerService.run(LocationManagerService.java:563)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #3" prio=5 tid=53 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41ad0e80 self=0x17d07b8<br />
  | sysTid=357 nice=0 sched=0/0 cgrp=default handle=25254680<br />
  | schedstat=( 0 0 0 ) utm=177 stm=54 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"watchdog" prio=5 tid=52 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416b2d90 self=0x17d2b48<br />
  | sysTid=353 nice=0 sched=0/0 cgrp=default handle=24415504<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416b2d90> (a com.android.server.Watchdog)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at com.android.server.Watchdog.run(Watchdog.java:399)<br />
"UsbService host thread" prio=5 tid=51 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a25ad0 self=0x17d3198<br />
  | sysTid=341 nice=0 sched=0/0 cgrp=default handle=25252792<br />
  | schedstat=( 0 0 0 ) utm=0 stm=19 core=1<br />
  at com.android.server.usb.UsbHostManager.monitorUsbHostBus(Native Method)<br />
  at com.android.server.usb.UsbHostManager.access$000(UsbHostManager.java:52)<br />
  at com.android.server.usb.UsbHostManager$1.run(UsbHostManager.java:177)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"BT EventLoop" prio=5 tid=50 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a8fc00 self=0x18101e0<br />
  | sysTid=340 nice=0 sched=0/0 cgrp=default handle=25252056<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"backup" prio=5 tid=49 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41acb538 self=0x17fedc8<br />
  | sysTid=256 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24659240<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"UsbDeviceManager" prio=5 tid=48 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41ac2558 self=0x17fe978<br />
  | sysTid=255 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24822792<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AudioService" prio=5 tid=47 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41ab4010 self=0x17d2620<br />
  | sysTid=254 nice=0 sched=0/0 cgrp=default handle=24803072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.media.AudioService$AudioSystemThread.run(AudioService.java:2088)<br />
"VoldConnector.CallbackHandler" prio=5 tid=46 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a96c48 self=0x17d21d0<br />
  | sysTid=252 nice=0 sched=0/0 cgrp=default handle=24576872<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"VoldConnector" prio=5 tid=45 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a96ba0 self=0x17d1d80<br />
  | sysTid=251 nice=0 sched=0/0 cgrp=default handle=24829680<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.server.NativeDaemonConnector.listenToSocket(NativeDaemonConnector.java:130)<br />
  at com.android.server.NativeDaemonConnector.run(NativeDaemonConnector.java:88)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"MountService" prio=5 tid=44 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a96658 self=0x17d1930<br />
  | sysTid=250 nice=0 sched=0/0 cgrp=default handle=24862600<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiWatchdogStateMachine" prio=5 tid=43 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a8fd58 self=0x17d14e0<br />
  | sysTid=249 nice=0 sched=0/0 cgrp=default handle=24845072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Tethering" prio=5 tid=42 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a8c298 self=0x17d1090<br />
  | sysTid=248 nice=0 sched=0/0 cgrp=default handle=24613568<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ConnectivityServiceThread" prio=5 tid=41 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a82b38 self=0x17d0c40<br />
  | sysTid=247 nice=0 sched=0/0 cgrp=default handle=24569680<br />
  | schedstat=( 0 0 0 ) utm=3 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiService" prio=5 tid=40 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a816a0 self=0x16bb0d0<br />
  | sysTid=246 nice=0 sched=0/0 cgrp=default handle=24744296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiStateMachine" prio=5 tid=39 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a08538 self=0x16bac80<br />
  | sysTid=245 nice=0 sched=0/0 cgrp=default handle=24641760<br />
  | schedstat=( 0 0 0 ) utm=4 stm=4 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiP2pService" prio=5 tid=38 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a5ebd0 self=0x16ba830<br />
  | sysTid=244 nice=0 sched=0/0 cgrp=default handle=24066288<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetworkPolicy" prio=5 tid=37 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a75c18 self=0x166dd18<br />
  | sysTid=243 nice=0 sched=0/0 cgrp=default handle=24220656<br />
  | schedstat=( 0 0 0 ) utm=18 stm=8 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetworkStats" prio=5 tid=36 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a1edd8 self=0x166d8c8<br />
  | sysTid=242 nice=0 sched=0/0 cgrp=default handle=24150144<br />
  | schedstat=( 0 0 0 ) utm=81 stm=16 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetdConnector.CallbackHandler" prio=5 tid=35 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a4eda0 self=0x166d478<br />
  | sysTid=241 nice=0 sched=0/0 cgrp=default handle=24124312<br />
  | schedstat=( 0 0 0 ) utm=1 stm=3 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetdConnector" prio=5 tid=34 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a4ecb8 self=0x17d39e8<br />
  | sysTid=240 nice=0 sched=0/0 cgrp=default handle=25589264<br />
  | schedstat=( 0 0 0 ) utm=3 stm=2 core=1<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.server.NativeDaemonConnector.listenToSocket(NativeDaemonConnector.java:130)<br />
  at com.android.server.NativeDaemonConnector.run(NativeDaemonConnector.java:88)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"BluetoothAdapterStateMachine" prio=5 tid=33 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a0c198 self=0x17c7508<br />
  | sysTid=233 nice=0 sched=0/0 cgrp=default handle=24441664<br />
  | schedstat=( 0 0 0 ) utm=4 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:0" prio=5 tid=32 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a2b3e8 self=0x17c70b8<br />
  | sysTid=232 nice=0 sched=0/0 cgrp=default handle=24471904<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:1" prio=5 tid=31 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419e9988 self=0x17c6c68<br />
  | sysTid=231 nice=0 sched=0/0 cgrp=default handle=24743432<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:2" prio=5 tid=30 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a3eb08 self=0x17c6818<br />
  | sysTid=227 nice=0 sched=0/0 cgrp=default handle=24570488<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"InputReader" prio=10 tid=29 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a35728 self=0x16ba3e0<br />
  | sysTid=226 nice=-8 sched=0/0 cgrp=default handle=24582976<br />
  | schedstat=( 0 0 0 ) utm=63 stm=77 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"InputDispatcher" prio=10 tid=28 SUSPENDED<br />
  | group="main" sCount=1 dsCount=0 obj=0x41957d78 self=0x16b9f90<br />
  | sysTid=225 nice=-8 sched=0/0 cgrp=default handle=24653872<br />
  | schedstat=( 0 0 0 ) utm=167 stm=107 core=1<br />
  at android.os.Process.sendSignal(Native Method)<br />
  at com.android.server.am.ActivityManagerService.dumpStackTraces(ActivityManagerService.java:2928)<br />
  at com.android.server.am.ActivityManagerService.appNotResponding(ActivityManagerService.java:3073)<br />
  at com.android.server.am.ActivityRecord.keyDispatchingTimedOut(ActivityRecord.java:728)<br />
  at com.android.server.am.ActivityRecord$Token.keyDispatchingTimedOut(ActivityRecord.java:241)<br />
  at com.android.server.wm.InputMonitor.notifyANR(InputMonitor.java:108)<br />
  at com.android.server.wm.InputManager$Callbacks.notifyANR(InputManager.java:549)<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"android.hardware.SensorManager$SensorThread" prio=5 tid=27 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419fb4f0 self=0x16b9b40<br />
  | sysTid=224 nice=-8 sched=0/0 cgrp=default handle=24634576<br />
  | schedstat=( 0 0 0 ) utm=168 stm=101 core=0<br />
  at android.hardware.SensorManager.sensors_data_poll(Native Method)<br />
  at android.hardware.SensorManager$SensorThread$SensorThreadRunnable.run(SensorManager.java:498)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"SoundPoolThread" prio=5 tid=26 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x418ecc58 self=0x16b8928<br />
  | sysTid=223 nice=0 sched=0/0 cgrp=default handle=23970824<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPool" prio=5 tid=25 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x417d3a20 self=0x175fe90<br />
  | sysTid=222 nice=0 sched=0/0 cgrp=default handle=24855696<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"WindowManagerPolicy" prio=5 tid=24 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419f09a8 self=0x175fa40<br />
  | sysTid=221 nice=-2 sched=0/0 cgrp=default handle=24212904<br />
  | schedstat=( 0 0 0 ) utm=690 stm=242 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.wm.WindowManagerService$PolicyThread.run(WindowManagerService.java:745)<br />
"WindowManager" prio=5 tid=23 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419fe848 self=0x17976c0<br />
  | sysTid=220 nice=-4 sched=0/0 cgrp=default handle=24575440<br />
  | schedstat=( 0 0 0 ) utm=518 stm=121 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:703)<br />
"AlarmManager" prio=5 tid=22 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419e7d90 self=0x17a1cd8<br />
  | sysTid=219 nice=0 sched=0/0 cgrp=default handle=24550280<br />
  | schedstat=( 0 0 0 ) utm=47 stm=18 core=1<br />
  at com.android.server.AlarmManagerService.waitForAlarm(Native Method)<br />
  at com.android.server.AlarmManagerService.access$100(AlarmManagerService.java:56)<br />
  at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:627)<br />
"PowerManagerService" prio=5 tid=21 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a35638 self=0x17a8530<br />
  | sysTid=218 nice=0 sched=0/0 cgrp=default handle=24637192<br />
  | schedstat=( 0 0 0 ) utm=51 stm=20 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"PowerManagerService.mScreenOffThread" prio=5 tid=20 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a51108 self=0x16f9a68<br />
  | sysTid=217 nice=0 sched=0/0 cgrp=default handle=24853760<br />
  | schedstat=( 0 0 0 ) utm=22 stm=113 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"UEventObserver" prio=5 tid=19 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a730e0 self=0x1869a60<br />
  | sysTid=216 nice=0 sched=0/0 cgrp=default handle=24768944<br />
  | schedstat=( 0 0 0 ) utm=167 stm=20 core=1<br />
  at android.os.UEventObserver.next_event(Native Method)<br />
  at android.os.UEventObserver.access$100(UEventObserver.java:39)<br />
  at android.os.UEventObserver$UEventThread.run(UEventObserver.java:102)<br />
"SyncHandlerThread" prio=5 tid=18 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4190aa48 self=0x1762fa8<br />
  | sysTid=214 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24634648<br />
  | schedstat=( 0 0 0 ) utm=3 stm=2 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AccountManagerService" prio=5 tid=17 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41999d70 self=0x179b760<br />
  | sysTid=213 nice=0 sched=0/0 cgrp=default handle=24107864<br />
  | schedstat=( 0 0 0 ) utm=2 stm=2 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"FileObserver" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x417b2f30 self=0x17a2550<br />
  | sysTid=200 nice=0 sched=0/0 cgrp=default handle=24488816<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=0<br />
  at android.os.FileObserver$ObserverThread.observe(Native Method)<br />
  at android.os.FileObserver$ObserverThread.run(FileObserver.java:88)<br />
"PackageManager" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41751240 self=0x17ab4e0<br />
  | sysTid=199 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24557816<br />
  | schedstat=( 0 0 0 ) utm=39 stm=16 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ProcessStats" prio=5 tid=14 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4174b798 self=0x17a4820<br />
  | sysTid=198 nice=0 sched=0/0 cgrp=default handle=24641392<br />
  | schedstat=( 0 0 0 ) utm=5 stm=4 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4174b798> (a com.android.server.am.ActivityManagerService$3)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1526)<br />
"ActivityManager" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416b47d0 self=0x17a7908<br />
  | sysTid=196 nice=-2 sched=0/0 cgrp=default handle=24554984<br />
  | schedstat=( 0 0 0 ) utm=349 stm=417 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1411)<br />
"android.server.ServerThread" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416aa6d0 self=0x17605c8<br />
  | sysTid=194 nice=-2 sched=0/0 cgrp=default handle=24568248<br />
  | schedstat=( 0 0 0 ) utm=942 stm=313 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.ServerThread.run(SystemServer.java:744)<br />
"SensorService" prio=10 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416aa378 self=0x17a1348<br />
  | sysTid=193 nice=-8 sched=0/0 cgrp=default handle=24571368<br />
  | schedstat=( 0 0 0 ) utm=162 stm=428 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a6d20 self=0x174fa70<br />
  | sysTid=192 nice=0 sched=0/0 cgrp=default handle=24851696<br />
  | schedstat=( 0 0 0 ) utm=177 stm=81 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a6a78 self=0x1783698<br />
  | sysTid=191 nice=0 sched=0/0 cgrp=default handle=24148544<br />
  | schedstat=( 0 0 0 ) utm=212 stm=54 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a3858 self=0x17b5a10<br />
  | sysTid=190 nice=0 sched=0/0 cgrp=default handle=24318296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=4 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a3700 self=0x16fa4d0<br />
  | sysTid=189 nice=0 sched=0/0 cgrp=default handle=24284520<br />
  | schedstat=( 0 0 0 ) utm=30 stm=15 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a475d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a3598 self=0x17a9938<br />
  | sysTid=188 nice=0 sched=0/0 cgrp=default handle=24275856<br />
  | schedstat=( 0 0 0 ) utm=0 stm=6 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a474f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a34a8 self=0x17b3d70<br />
  | sysTid=187 nice=0 sched=0/0 cgrp=default handle=24189344<br />
  | schedstat=( 0 0 0 ) utm=333 stm=163 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a33c0 self=0x17aa7d0<br />
  | sysTid=186 nice=0 sched=0/0 cgrp=default handle=24454256<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x416a32c8 self=0x1658cb8<br />
  | sysTid=185 nice=0 sched=0/0 cgrp=default handle=24448072<br />
  | schedstat=( 0 0 0 ) utm=2 stm=9 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a31e8 self=0x1798698<br />
  | sysTid=181 nice=0 sched=0/0 cgrp=default handle=24856160<br />
  | schedstat=( 0 0 0 ) utm=307 stm=10 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 180 -----<br />
<br />
----- pid 266 at 2012-04-16 08:55:46 -----<br />
Cmd line: com.android.systemui<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a51460 self=0x15d3828<br />
  | sysTid=266 nice=0 sched=0/0 cgrp=default handle=1074381960<br />
  | schedstat=( 0 0 0 ) utm=1532 stm=468 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"AsyncTask #4" prio=5 tid=17 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x42114868 self=0x196afd0<br />
  | sysTid=6478 nice=10 sched=0/0 cgrp=bg_non_interactive handle=26134896<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x42112080> (a java.lang.VMThread) held by tid=17 (AsyncTask #4)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #4" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416abfd8 self=0x1811450<br />
  | sysTid=4828 nice=0 sched=0/0 cgrp=default handle=26627656<br />
  | schedstat=( 0 0 0 ) utm=2 stm=2 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"AsyncTask #3" prio=5 tid=15 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x42071990 self=0x19c2dc0<br />
  | sysTid=4376 nice=10 sched=0/0 cgrp=bg_non_interactive handle=26036192<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4207fc78> (a java.lang.VMThread) held by tid=15 (AsyncTask #3)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #2" prio=5 tid=14 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4218ee00 self=0x18de010<br />
  | sysTid=3578 nice=10 sched=0/0 cgrp=bg_non_interactive handle=26912896<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x42086f68> (a java.lang.VMThread) held by tid=14 (AsyncTask #2)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #1" prio=5 tid=13 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4218eb30 self=0x17eae60<br />
  | sysTid=3492 nice=10 sched=0/0 cgrp=bg_non_interactive handle=27041544<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41ff3f48> (a java.lang.VMThread) held by tid=13 (AsyncTask #1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #3" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4187f010 self=0x17ab4e0<br />
  | sysTid=561 nice=0 sched=0/0 cgrp=default handle=23726904<br />
  | schedstat=( 0 0 0 ) utm=3 stm=7 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SystemUI StorageNotification" prio=5 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41889790 self=0x17a1348<br />
  | sysTid=477 nice=0 sched=0/0 cgrp=default handle=24107664<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416aaa08 self=0x174fa70<br />
  | sysTid=278 nice=0 sched=0/0 cgrp=default handle=24151600<br />
  | schedstat=( 0 0 0 ) utm=10 stm=3 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416aa8b0 self=0x1783698<br />
  | sysTid=275 nice=0 sched=0/0 cgrp=default handle=24148544<br />
  | schedstat=( 0 0 0 ) utm=10 stm=6 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a6df0 self=0x17b5a10<br />
  | sysTid=274 nice=0 sched=0/0 cgrp=default handle=24318296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=5 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a6c98 self=0x16fa4d0<br />
  | sysTid=273 nice=0 sched=0/0 cgrp=default handle=24284520<br />
  | schedstat=( 0 0 0 ) utm=3 stm=2 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a475d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a6b30 self=0x17a9938<br />
  | sysTid=272 nice=0 sched=0/0 cgrp=default handle=24275856<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a474f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a6a40 self=0x17b3d70<br />
  | sysTid=271 nice=0 sched=0/0 cgrp=default handle=24189344<br />
  | schedstat=( 0 0 0 ) utm=64 stm=30 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a6958 self=0x17aa7d0<br />
  | sysTid=270 nice=0 sched=0/0 cgrp=default handle=24856160<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x416a6860 self=0x1658cb8<br />
  | sysTid=269 nice=0 sched=0/0 cgrp=default handle=24448072<br />
  | schedstat=( 0 0 0 ) utm=1 stm=3 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416a6780 self=0x1798698<br />
  | sysTid=268 nice=0 sched=0/0 cgrp=default handle=24454256<br />
  | schedstat=( 0 0 0 ) utm=53 stm=5 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 266 -----<br />
<br />
----- pid 385 at 2012-04-16 08:55:46 -----<br />
Cmd line: com.android.phone<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a51460 self=0x15d3828<br />
  | sysTid=385 nice=0 sched=0/0 cgrp=default handle=1074381960<br />
  | schedstat=( 0 0 0 ) utm=107 stm=68 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"Binder Thread #7" prio=5 tid=27 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x417666f8 self=0x18a17c0<br />
  | sysTid=5423 nice=0 sched=0/0 cgrp=default handle=23523064<br />
  | schedstat=( 0 0 0 ) utm=1 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GsmDC-2" prio=5 tid=26 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41727218 self=0x18923a8<br />
  | sysTid=1883 nice=0 sched=0/0 cgrp=default handle=25635088<br />
  | schedstat=( 0 0 0 ) utm=19 stm=9 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Stk App Service" prio=5 tid=25 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4174e528 self=0x17fbce0<br />
  | sysTid=817 nice=0 sched=0/0 cgrp=default handle=25149744<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.stk.StkAppService.run(StkAppService.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #6" prio=5 tid=24 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41742ee8 self=0x175fa40<br />
  | sysTid=796 nice=0 sched=0/0 cgrp=default handle=24631312<br />
  | schedstat=( 0 0 0 ) utm=25 stm=9 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #5" prio=5 tid=23 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4173d2e0 self=0x17a8530<br />
  | sysTid=795 nice=0 sched=0/0 cgrp=default handle=24743384<br />
  | schedstat=( 0 0 0 ) utm=16 stm=7 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #4" prio=5 tid=22 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4173d1e0 self=0x17af528<br />
  | sysTid=794 nice=0 sched=0/0 cgrp=default handle=24123136<br />
  | schedstat=( 0 0 0 ) utm=21 stm=8 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SipService.Executor" prio=5 tid=21 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41733cf8 self=0x177f108<br />
  | sysTid=553 nice=0 sched=0/0 cgrp=default handle=24802016<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #3" prio=5 tid=20 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41717d88 self=0x17a6d50<br />
  | sysTid=542 nice=0 sched=0/0 cgrp=default handle=24199040<br />
  | schedstat=( 0 0 0 ) utm=39 stm=10 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"BluetoothHandsfreeHandler" prio=5 tid=19 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a9278 self=0x177ceb0<br />
  | sysTid=534 nice=0 sched=0/0 cgrp=default handle=24855600<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AsyncQueryWorker" prio=5 tid=18 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a3cb0 self=0x1762fa8<br />
  | sysTid=533 nice=0 sched=0/0 cgrp=default handle=24740952<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Cat Icon Loader" prio=5 tid=17 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416bfe58 self=0x17b7e28<br />
  | sysTid=490 nice=0 sched=0/0 cgrp=default handle=24186392<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"RilMessageDecoder" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c0958 self=0x17a2550<br />
  | sysTid=489 nice=0 sched=0/0 cgrp=default handle=24159440<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Cat Telephony service" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c1728 self=0x17a7908<br />
  | sysTid=488 nice=0 sched=0/0 cgrp=default handle=24109048<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"SyncHandler-0" prio=5 tid=14 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c79f8 self=0x17a4820<br />
  | sysTid=487 nice=0 sched=0/0 cgrp=default handle=24214840<br />
  | schedstat=( 0 0 0 ) utm=4 stm=6 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"CdmaDC-1" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41703b50 self=0x17ab4e0<br />
  | sysTid=486 nice=0 sched=0/0 cgrp=default handle=24615696<br />
  | schedstat=( 0 0 0 ) utm=1 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"RILReceiver" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416e9bc0 self=0x17605c8<br />
  | sysTid=482 nice=0 sched=0/0 cgrp=default handle=24311392<br />
  | schedstat=( 0 0 0 ) utm=7 stm=10 core=0<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.internal.telephony.RIL.readRilMessage(RIL.java:453)<br />
  at com.android.internal.telephony.RIL.access$300(RIL.java:199)<br />
  at com.android.internal.telephony.RIL$RILReceiver.run(RIL.java:552)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"RILSender" prio=5 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416e76d0 self=0x17a1348<br />
  | sysTid=478 nice=0 sched=0/0 cgrp=default handle=24457736<br />
  | schedstat=( 0 0 0 ) utm=3 stm=3 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416af060 self=0x174fa70<br />
  | sysTid=398 nice=0 sched=0/0 cgrp=default handle=24151600<br />
  | schedstat=( 0 0 0 ) utm=14 stm=12 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416aef08 self=0x1783698<br />
  | sysTid=397 nice=0 sched=0/0 cgrp=default handle=24148544<br />
  | schedstat=( 0 0 0 ) utm=24 stm=10 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ab448 self=0x17b5a10<br />
  | sysTid=395 nice=0 sched=0/0 cgrp=default handle=24318296<br />
  | schedstat=( 0 0 0 ) utm=2 stm=1 core=1<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ab2f0 self=0x16fa4d0<br />
  | sysTid=394 nice=0 sched=0/0 cgrp=default handle=24284520<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a475d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ab188 self=0x17a9938<br />
  | sysTid=393 nice=0 sched=0/0 cgrp=default handle=24275856<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a474f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416ab098 self=0x17b3d70<br />
  | sysTid=392 nice=0 sched=0/0 cgrp=default handle=24189344<br />
  | schedstat=( 0 0 0 ) utm=26 stm=16 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416aafb0 self=0x17aa7d0<br />
  | sysTid=391 nice=0 sched=0/0 cgrp=default handle=24448072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x416aaeb8 self=0x1798698<br />
  | sysTid=390 nice=0 sched=0/0 cgrp=default handle=24454256<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416aadd8 self=0x1658cb8<br />
  | sysTid=387 nice=0 sched=0/0 cgrp=default handle=24856160<br />
  | schedstat=( 0 0 0 ) utm=25 stm=5 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 385 -----<br />
<br />
----- pid 400 at 2012-04-16 08:55:46 -----<br />
Cmd line: com.android.nfc<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a51460 self=0x15d3828<br />
  | sysTid=400 nice=0 sched=0/0 cgrp=default handle=1074381960<br />
  | schedstat=( 0 0 0 ) utm=7 stm=8 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"AsyncTask #5" prio=5 tid=20 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416fb588 self=0x16f6310<br />
  | sysTid=2652 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24566296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416fb6e0> (a java.lang.VMThread) held by tid=20 (AsyncTask #5)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #4" prio=5 tid=19 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416fb218 self=0x17b89a8<br />
  | sysTid=2642 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24558520<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416fb338> (a java.lang.VMThread) held by tid=19 (AsyncTask #4)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #3" prio=5 tid=18 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416fad28 self=0x179b760<br />
  | sysTid=2071 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24235072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416fae48> (a java.lang.VMThread) held by tid=18 (AsyncTask #3)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #2" prio=5 tid=17 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416f0630 self=0x17b7e28<br />
  | sysTid=959 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24748632<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416f0750> (a java.lang.VMThread) held by tid=17 (AsyncTask #2)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"SoundPoolThread" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416efa00 self=0x17a2550<br />
  | sysTid=531 nice=0 sched=0/0 cgrp=default handle=24895144<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPool" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ef910 self=0x17a4820<br />
  | sysTid=530 nice=0 sched=0/0 cgrp=default handle=23970824<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Thread-40" prio=5 tid=14 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416eeb90 self=0x17ab4e0<br />
  | sysTid=528 nice=0 sched=0/0 cgrp=default handle=24844680<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.doAccept(Native Method)<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:41)<br />
  at com.android.nfc.ndefpush.NdefPushServer$ServerThread.run(NdefPushServer.java:137)<br />
"Thread-39" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ee5f8 self=0x17a7908<br />
  | sysTid=527 nice=0 sched=0/0 cgrp=default handle=24311128<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.doAccept(Native Method)<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:41)<br />
  at com.android.nfc.snep.SnepServer$ServerThread.run(SnepServer.java:193)<br />
"NFC Message Loop" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416eddc0 self=0x17605c8<br />
  | sysTid=514 nice=0 sched=0/0 cgrp=default handle=24243968<br />
  | schedstat=( 0 0 0 ) utm=3 stm=10 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"AsyncTask #1" prio=5 tid=11 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ed6a0 self=0x17a1348<br />
  | sysTid=485 nice=10 sched=0/0 cgrp=bg_non_interactive handle=24457976<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416ed838> (a java.lang.VMThread) held by tid=11 (AsyncTask #1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416afe08 self=0x174fa70<br />
  | sysTid=416 nice=0 sched=0/0 cgrp=default handle=24851696<br />
  | schedstat=( 0 0 0 ) utm=3 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416afab8 self=0x1783698<br />
  | sysTid=413 nice=0 sched=0/0 cgrp=default handle=24148544<br />
  | schedstat=( 0 0 0 ) utm=0 stm=4 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ac1f0 self=0x17b5a10<br />
  | sysTid=412 nice=0 sched=0/0 cgrp=default handle=24318296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ac098 self=0x16fa4d0<br />
  | sysTid=411 nice=0 sched=0/0 cgrp=default handle=24284520<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a475d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416abf30 self=0x17a9938<br />
  | sysTid=410 nice=0 sched=0/0 cgrp=default handle=24275856<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a474f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416abe40 self=0x17b3d70<br />
  | sysTid=409 nice=0 sched=0/0 cgrp=default handle=24189344<br />
  | schedstat=( 0 0 0 ) utm=1 stm=3 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416abd58 self=0x17aa7d0<br />
  | sysTid=408 nice=0 sched=0/0 cgrp=default handle=24856160<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x416abc60 self=0x1798698<br />
  | sysTid=406 nice=0 sched=0/0 cgrp=default handle=24454256<br />
  | schedstat=( 0 0 0 ) utm=1 stm=3 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x416abb80 self=0x1658cb8<br />
  | sysTid=403 nice=0 sched=0/0 cgrp=default handle=24448072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=3 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 400 -----<br />
```


----------



## JBirdVegas (Jun 11, 2011)

what I mean by postDelayed would be something like


```
<br />
//3 second delay before closing the circuit to allow the Arduino page to refresh<br />
final Handler handler = new Handler();<br />
public void run() {<br />
	handler.postDelayed(new Runnable() {<br />
		public void run() {<br />
			circuitOffTask = new circuitOff().execute();<br />
		}<br />
	}, 3*1000);<br />
}
```
from my understanding of keyDispatchingTimedOut is it is caused by not firing events fast enough after onClick so the system sees a void and kills the app thinking it died (that may not be completely correct). I guess making timer pissed off the system since so hopefully a handler.postDelayed(runnable, int) will count as an event :-/

if it gets mad about that I would try throwing in some Toast / Log.d or something trivial just to give the app something to do before waiting 3 seconds to execute useful code (that seems a bit hacky though) and that may be enough to offset the exception


----------



## dl_evans (Dec 13, 2011)

This code:


```
<br />
package com.garagedoor.opener;<br />
import java.io.BufferedReader;<br />
import java.io.InputStreamReader;<br />
import java.net.URI;<br />
import java.util.Timer;<br />
import java.util.TimerTask;<br />
import org.apache.http.HttpEntity;<br />
import org.apache.http.HttpResponse;<br />
import org.apache.http.client.HttpClient;<br />
import org.apache.http.client.methods.HttpGet;<br />
import org.apache.http.impl.client.DefaultHttpClient;<br />
import android.app.Activity;<br />
import android.app.ProgressDialog;<br />
import android.content.Intent;<br />
import android.content.SharedPreferences;<br />
import android.os.AsyncTask;<br />
import android.os.Bundle;<br />
import android.os.Handler;<br />
import android.util.Log;<br />
import android.view.Menu;<br />
import android.view.MenuInflater;<br />
import android.view.MenuItem;<br />
import android.view.View;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.Toast;<br />
public class GarageDoorOpenerActivity extends Activity {<br />
		//external ip holder<br />
public String publicIP = "";<br />
		//whatever your arduino ip address was set to holder<br />
public String localIP = "";<br />
public String readURL = "";<br />
public String portNumber = "";<br />
public String readpublicIP = "";<br />
public String readlocalIP = "";<br />
public String readportNumber = "";<br />
public String URL = "";<br />
public String garagestate = "";<br />
public String pin = "";<br />
public String pinName = "";<br />
public String networkName = "";<br />
<br />
public int pinCheck = 0;<br />
boolean useExternal;<br />
private static final int REQUEST_CODE = 100;<br />
public String customURL[] = {"http://","/"};<br />
private AsyncTask<?, ?, ?> mTask;<br />
private AsyncTask<?, ?, ?>circuitOffTask;<br />
private ProgressDialog dialog = null;<br />
boolean viewLocal = true;<br />
boolean viewPublic = true;<br />
boolean viewPort = true;<br />
boolean viewPin = true;<br />
int buttondDefault = R.drawable.buttondefault;<br />
int doorClosed = R.drawable.doorclosed;<br />
int doorOpen = R.drawable.dooropen;<br />
int option1On = R.drawable.option1on;<br />
int option1Off = R.drawable.option1off;<br />
int arduinoOn = R.drawable.arduinoon;<br />
int arduinoOff = R.drawable.arduinooff;<br />
int option1default = R.drawable.option1default;<br />
int doorDefault = R.drawable.doordefault;<br />
int arduinoDefault = R.drawable.arduinodefault;<br />
int saved_button = R.drawable.buttondefault;<br />
public String data = null;<br />
String publicIPpart1 = "";<br />
String publicIPpart2 = "";<br />
String publicIPpart3 = "";<br />
	HttpResponse responseGet = null;<br />
	HttpResponse responseGet2 = null;<br />
	String tag;<br />
<br />
  @Override<br />
	 public void onCreate(Bundle savedInstanceState) {<br />
		 super.onCreate(savedInstanceState);<br />
		 setContentView(R.layout.main);<br />
<br />
		 SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
		 publicIP = settings.getString("public_ip", publicIP);<br />
   localIP = settings.getString("local_ip",localIP);<br />
   useExternal = settings.getBoolean("use_external", useExternal);<br />
   pin = settings.getString("arduino_pin",pin);<br />
   portNumber = settings.getString("port_number", portNumber);<br />
   URL = settings.getString("passed_url", URL);<br />
   publicIPpart1 = settings.getString("publicIP_part1", publicIPpart1);<br />
   publicIPpart3 = settings.getString("publicIP_part3", publicIPpart3);<br />
   pinName = settings.getString("pin_name", pinName);<br />
   networkName = settings.getString("network_name", networkName);<br />
   pinCheck = settings.getInt("pin_check",pinCheck);<br />
   saved_button = settings.getInt("saved_button",saved_button);<br />
<br />
   findViewById(R.id.button1).setBackgroundResource(saved_button);<br />
		 EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		 EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		 EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		 displayInternal.setText(localIP);<br />
		 displayExternal.setText(publicIPpart1);<br />
		 displayPort.setText(publicIPpart3);<br />
		 EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		 displayPin.setText(pinName);<br />
		 EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		 displayNetwork.setText(networkName);<br />
		 if(networkName == "External"){<br />
	URL = publicIP;<br />
   }<br />
   if(networkName == "Local"){<br />
	URL = localIP;<br />
   }<br />
   Log.d(tag, "I'm alive. See: 1");<br />
		 final Button button = (Button) findViewById(R.id.button1);<br />
			button.setOnClickListener(new View.OnClickListener() {<br />
					public void onClick(View v) {<br />
						 mTask = new httpTask().execute();<br />
				Log.d(tag, "I'm alive. See: 2");<br />
					}<br />
			});<br />
	 }<br />
//OPTIONS MENU INFLATER - FILLS THE OPTIONS MENU<br />
public boolean onCreateOptionsMenu(Menu menu) {<br />
	 MenuInflater inflater = getMenuInflater();<br />
	 inflater.inflate(R.menu.menu, menu);<br />
	 return true;<br />
}<br />
//OPTIONS MENU<br />
public boolean onOptionsItemSelected(MenuItem item) {<br />
		EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
	 switch (item.getItemId()) {<br />
	   case R.id.save:<br />
		Toast.makeText(getBaseContext(), "Settings saved.", Toast.LENGTH_SHORT).show();<br />
		save();<br />
		break;<br />
	   case R.id.pins:<br />
		break;<br />
		case R.id.pin1:<br />
		 pin = "?LED0";<br />
		 pinCheck = 1;<br />
			   pinName = "Option 1";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.option1default);<br />
		 saved_button = R.drawable.option1default;<br />
			   save();<br />
		 break;<br />
		case R.id.pin2:<br />
		 pin = "?LED1";<br />
		 pinCheck = 2;<br />
			   pinName = "Garage Door";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.doordefault);<br />
			   saved_button = R.drawable.doordefault;<br />
			   save();<br />
		 break;<br />
		case R.id.pin3:<br />
		 pin = "?LED2";<br />
		 pinCheck = 3;<br />
		 pinName = "Arduino LED";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinodefault);<br />
			   saved_button = R.drawable.arduinodefault;<br />
			   save();<br />
		 break;<br />
	   case R.id.useExternal:<br />
		if(useExternal == false){<br />
		 URL = localIP;<br />
		 useExternal = true;<br />
		 networkName = "Local";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
		}<br />
		else if(useExternal == true){<br />
		 URL = publicIP;<br />
		 useExternal = false;<br />
		 networkName = "External";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
		}else {<br />
		break;<br />
		}<br />
	   case R.id.inputIP:<br />
		enterIP();<br />
		break;<br />
	   case R.id.clear:<br />
		publicIP = "";<br />
		readURL = "";<br />
		portNumber = "";<br />
		readpublicIP = "";<br />
		readlocalIP = "";<br />
		readportNumber = "";<br />
		URL = "";<br />
		garagestate = "";<br />
		pin = "";<br />
		publicIPpart2 = "";<br />
		networkName = "";<br />
		pinName = "";<br />
		localIP = "";<br />
		publicIPpart1 = "";<br />
		publicIPpart3 = "";<br />
		displayNetwork.setText(networkName);<br />
			  displayPin.setText(pinName);<br />
			  displayInternal.setText(localIP);<br />
			  displayExternal.setText(publicIPpart1);<br />
			  displayPort.setText(publicIPpart3);<br />
			  findViewById(R.id.button1).setBackgroundResource(R.drawable.buttondefault);<br />
			  saved_button = R.drawable.buttondefault;<br />
		save();<br />
		break;	  <br />
	 }<br />
	 return true;<br />
}<br />
//Http Task<br />
private class httpTask extends AsyncTask<Void, Void, Void> {<br />
	HttpEntity resEntityGet = null;<br />
  @Override<br />
  protected void onPreExecute() {<br />
   Log.d(tag, "I'm alive. See: 3");<br />
	  GetMethod test = new GetMethod();<br />
		String returned;<br />
   try {<br />
	returned = test.getInternetData();<br />
	if (pinCheck == 1){<br />
	  if(returned.toString().contains("\"Opener 1\">Door Closed")){  //"\"Opener 1\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
	 }<br />
	 if(returned.toString().contains("\"Opener 1\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 2){<br />
	 if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 2\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);	  <br />
	 }<br />
	 }<br />
	 if (pinCheck == 3){<br />
	 if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);	  <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 3\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);	  <br />
	 }<br />
	 }<br />
   } catch (Exception e) {<br />
	e.printStackTrace();<br />
   }<br />
   dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
   dialog.setMessage("Working");<br />
   dialog.show();<br />
  }<br />
  @Override<br />
  protected Void doInBackground(Void... params) {<br />
	try {<br />
	Log.d(tag, "I'm alive. See: 4");<br />
		HttpClient client = new DefaultHttpClient();<br />
		HttpGet get = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		responseGet = client.execute(get);<br />
		resEntityGet = responseGet.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
  return null;<br />
  }<br />
  @Override<br />
  protected void onPostExecute(Void params) {<br />
   Log.d(tag, "I'm alive. See: 5");<br />
   if(dialog.isShowing())<br />
	dialog.dismiss();<br />
		if (resEntityGet != null) {<br />
		 Toast.makeText(getBaseContext(), "Done. ", Toast.LENGTH_SHORT).show();<br />
		 resEntityGet = null;<br />
		}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
		final Handler handler = new Handler();<br />
		Timer t = new Timer();<br />
		t.schedule(new TimerTask() {<br />
				public void run() {<br />
				 Log.d(tag, "I'm alive. See: 6");<br />
						handler.post(new Runnable() {<br />
								public void run() {<br />
								 Log.d(tag, "I'm alive. See: 7");<br />
									circuitOffTask = new circuitOff().execute();<br />
								}<br />
						});<br />
				}<br />
		}, 3500);<br />
  }<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
//circuitOFf Task<br />
private class circuitOff extends AsyncTask<Void, Void, Void> {<br />
	HttpEntity resEntityGet2 = null;<br />
  @Override<br />
  protected void onPreExecute() {<br />
		 Log.d(tag, "I'm alive. See: 8");<br />
   dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
   dialog.setMessage("Closing circuit...");<br />
   dialog.show();<br />
  }<br />
  @Override<br />
  protected Void doInBackground(Void... params) {<br />
	try {<br />
		HttpClient client2 = new DefaultHttpClient();<br />
	 Log.d(tag, "I'm alive. See: 9");<br />
		HttpGet get2 = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		responseGet2 = client2.execute(get2);<br />
		resEntityGet2 = responseGet2.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
  return null;<br />
  }<br />
  @Override<br />
  protected void onPostExecute(Void params) {<br />
		 Log.d(tag, "I'm alive. See: 10");<br />
   if(dialog.isShowing())<br />
	dialog.dismiss();<br />
		if (resEntityGet2 != null) {<br />
		 Toast.makeText(getBaseContext(), "Circuit closed.", Toast.LENGTH_SHORT).show();<br />
		 resEntityGet2 = null;<br />
		}<br />
  }<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
	public class GetMethod {<br />
	 public String getInternetData() throws Exception{<br />
		 Log.d(tag, "I'm alive. See: 11");<br />
	  BufferedReader in = null;<br />
	  String data = null;<br />
	  try{<br />
		  Log.d(tag, "I'm alive. See: 12");<br />
	   HttpClient client = new DefaultHttpClient();<br />
	   URI url = new URI(customURL[0] + URL + customURL[1]); //customURL[0] + URL + customURL[1]<br />
	   HttpGet request = new HttpGet();<br />
	   request.setURI(url);<br />
	   HttpResponse response = client.execute(request);<br />
	   in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));<br />
	   StringBuffer sb = new StringBuffer("");<br />
	   String l = "";<br />
	   String nl = System.getProperty("line.separator");<br />
	   while ((l = in.readLine()) !=null){<br />
		sb.append(l + nl);  <br />
	   }<br />
	   in.close();<br />
	   data = sb.toString();<br />
	   return data;<br />
	  } finally{<br />
	   if (in !=null){<br />
		try{<br />
		 in.close();<br />
		 return data;<br />
		} catch (Exception e){<br />
		 e.printStackTrace();<br />
		}<br />
	   }<br />
	  }<br />
	 }<br />
	}<br />
//Local / Public IP Address Entry<br />
public void enterIP(){<br />
		Intent j = new Intent(this, enterIP.class);<br />
		j.putExtra("public_ip", publicIP);<br />
		j.putExtra("local_ip", localIP);<br />
		j.putExtra("port_number", portNumber);<br />
  startActivityForResult(j, REQUEST_CODE);<br />
}<br />
//Activity Result<br />
public void onActivityResult(int requestCode, int resultCode, Intent data) {<br />
  if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {<br />
   if (data.hasExtra("public_ip")){<br />
	readpublicIP = data.getExtras().getString("public_ip");<br />
	publicIPpart1 = String.valueOf(readpublicIP);<br />
   }<br />
   if (data.hasExtra("local_ip")){<br />
	readlocalIP = data.getExtras().getString("local_ip");<br />
	localIP = String.valueOf(readlocalIP);<br />
   }<br />
   if (data.hasExtra("port_number")){<br />
	readportNumber = data.getExtras().getString("port_number");<br />
	publicIPpart3 = String.valueOf(readportNumber);<br />
   }<br />
	publicIPpart2 = ":";<br />
	publicIP = (publicIPpart1 + publicIPpart2 + publicIPpart3);<br />
   }<br />
  EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		displayInternal.setText(localIP);<br />
		displayExternal.setText(publicIPpart1);<br />
		displayPort.setText(publicIPpart3);<br />
  save();<br />
  }<br />
//SAVE FUNCTION<br />
private void save() {<br />
  SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
  SharedPreferences.Editor prefEditor = settings.edit();<br />
  prefEditor.putString("publicIP_part1", publicIPpart1);<br />
  prefEditor.putString("publicIP_part3", publicIPpart3);<br />
  prefEditor.putString("public_ip", publicIP);<br />
  prefEditor.putString("local_ip",localIP);<br />
  prefEditor.putBoolean("use_external", useExternal);<br />
  prefEditor.putString("arduino_pin",pin);<br />
  prefEditor.putString("port_number", portNumber);<br />
  prefEditor.putString("passed_url", URL);<br />
  prefEditor.putString("pin_name", pinName);<br />
  prefEditor.putString("network_name", networkName);<br />
  prefEditor.putInt("pin_check",pinCheck);<br />
  prefEditor.putInt("saved_button",saved_button);<br />
  prefEditor.commit();  <br />
}<br />
//On Pause<br />
@Override<br />
protected void onPause() {<br />
  super.onPause();<br />
  if(dialog != null && dialog.isShowing()){<br />
   dialog.dismiss();<br />
  }<br />
  if(mTask != null && mTask.getStatus() == AsyncTask.Status.RUNNING){<br />
   mTask.cancel(true);<br />
  }<br />
  if(circuitOffTask != null && circuitOffTask.getStatus() == AsyncTask.Status.RUNNING){<br />
   circuitOffTask.cancel(true);<br />
  }<br />
<br />
}<br />
}<br />
```
Gives me this in LogCat:


```
<br />
04-17 01:28:47.471: D/(275): I'm alive. See: 1<br />
04-17 02:18:39.712: D/(275): I'm alive. See: 3<br />
04-17 02:18:39.712: D/(275): I'm alive. See: 11<br />
04-17 02:18:39.712: D/(275): I'm alive. See: 12<br />
04-17 02:18:40.401: D/dalvikvm(275): GC_FOR_MALLOC freed 2384 objects / 145488 bytes in 72ms<br />
04-17 02:18:40.571: I/global(275): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.<br />
04-17 02:18:40.692: D/(275): I'm alive. See: 2<br />
04-17 02:18:40.711: D/(275): I'm alive. See: 4<br />
04-17 02:18:41.541: D/dalvikvm(275): GC_FOR_MALLOC freed 1840 objects / 470040 bytes in 391ms<br />
04-17 02:18:42.241: D/(275): I'm alive. See: 5<br />
04-17 02:18:45.838: D/(275): I'm alive. See: 6<br />
04-17 02:18:45.838: D/(275): I'm alive. See: 7<br />
04-17 02:18:45.841: D/(275): I'm alive. See: 8<br />
04-17 02:18:45.941: D/(275): I'm alive. See: 9<br />
04-17 02:18:46.431: D/dalvikvm(275): GC_FOR_MALLOC freed 1435 objects / 444072 bytes in 431ms<br />
04-17 02:18:47.271: D/(275): I'm alive. See: 10<br />
```
So it's getting all 12 of the "I'm alive" statements. Again this is on the emulator running 2.2

My Eclipse is freaking out and says my Gnex is "offline" so I can't give you that logcat. However, the changes I've made (the Logs and adding 2 to the second round of strings and ints) seemed to work. My phone Shows "Working" and then "Done" and 3 seconds later it says "Closing circuit" and "Done" like it should!!!

Now the background images don't change but I suspect that has something to do the way the Arduino does its thing. I have to work tonight but I'm off the next two days after that. I hope to go to my friends house and test this to make sure it is indeed working the way it should.

*Thank you very much for your help. I really do appreciate it. *


----------



## JBirdVegas (Jun 11, 2011)

I'm glad to hear it is ...working... but get some real world runs in before we get too excited









Seriously MAD props to you this is a great idea and when you mentioned [background=rgb(245, 245, 245)]Arduino I thought you misspelled something :-/ now (THANKS GOOGLE) I'm curious as to how much I really want to learn about hardware!!! (if you are reading this check out [/background]http://www.arduino.cc/ for more info)

Good Luck and report back with either Cheers or Logcats lol


----------



## dl_evans (Dec 13, 2011)

Oh I'm very familiar with the Arduino and Arduino.cc . My first ever project made it on HackADay.com I can't post the link (at work, again) but google Hack A Day dustin evans or iTable (it was before I fell in love with Android) I have a couple videos of my exploration with the arduino on my youtube channel too. youtube.com/evansdustin if you have any problems / need some ideas with the Arduino please, allow me to return the favor. I'm off in 2 1/2 hours... after some sleep I'll be testing it for sure.


----------



## dl_evans (Dec 13, 2011)




----------



## dl_evans (Dec 13, 2011)

Yay Eclipse decided not to be dumb anymore. Here's the Logcat from the phone:


```
<br />
<br />
04-17 08:17:50.385: D/(1742): I'm alive. See: 3<br />
04-17 08:17:50.385: D/(1742): I'm alive. See: 11<br />
04-17 08:17:50.385: D/(1742): I'm alive. See: 12<br />
04-17 08:17:50.385: W/System.err(1742): java.lang.IllegalArgumentException:[b] Host name may not be null[/b]<br />
04-17 08:17:50.385: W/System.err(1742):  at org.apache.http.HttpHost.<init>(HttpHost.java:83)<br />
04-17 08:17:50.385: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.determineTarget(AbstractHttpClient.java:497)<br />
04-17 08:17:50.385: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br />
04-17 08:17:50.385: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br />
04-17 08:17:50.385: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$GetMethod.getInternetData(GarageDoorOpenerActivity.java:347)<br />
04-17 08:17:50.385: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$httpTask.onPreExecute(GarageDoorOpenerActivity.java:230)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:561)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.os.AsyncTask.execute(AsyncTask.java:511)<br />
04-17 08:17:50.393: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$1.onClick(GarageDoorOpenerActivity.java:116)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.view.View.performClick(View.java:3511)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.view.View$PerformClick.run(View.java:14105)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.os.Handler.handleCallback(Handler.java:605)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.os.Handler.dispatchMessage(Handler.java:92)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.os.Looper.loop(Looper.java:137)<br />
04-17 08:17:50.393: W/System.err(1742):  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
04-17 08:17:50.393: W/System.err(1742):  at java.lang.reflect.Method.invokeNative(Native Method)<br />
04-17 08:17:50.393: W/System.err(1742):  at java.lang.reflect.Method.invoke(Method.java:511)<br />
04-17 08:17:50.393: W/System.err(1742):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
04-17 08:17:50.393: W/System.err(1742):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
04-17 08:17:50.393: W/System.err(1742):  at dalvik.system.NativeStart.main(Native Method)<br />
04-17 08:17:50.424: D/(1742): I'm alive. See: 2<br />
04-17 08:17:50.424: D/(1742): I'm alive. See: 4<br />
04-17 08:17:50.424: W/System.err(1742): java.lang.IllegalArgumentException: Host name may not be null<br />
04-17 08:17:50.432: W/System.err(1742):  at org.apache.http.HttpHost.<init>(HttpHost.java:83)<br />
04-17 08:17:50.432: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.determineTarget(AbstractHttpClient.java:497)<br />
04-17 08:17:50.432: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br />
04-17 08:17:50.432: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br />
04-17 08:17:50.432: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$httpTask.doInBackground(GarageDoorOpenerActivity.java:268)<br />
04-17 08:17:50.432: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$httpTask.doInBackground(GarageDoorOpenerActivity.java:1)<br />
04-17 08:17:50.432: W/System.err(1742):  at android.os.AsyncTask$2.call(AsyncTask.java:264)<br />
04-17 08:17:50.432: W/System.err(1742):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)<br />
04-17 08:17:50.432: W/System.err(1742):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)<br />
04-17 08:17:50.440: W/System.err(1742):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)<br />
04-17 08:17:50.440: W/System.err(1742):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
04-17 08:17:50.440: W/System.err(1742):  at java.lang.Thread.run(Thread.java:856)<br />
04-17 08:17:50.448: D/(1742): I'm alive. See: 5<br />
04-17 08:17:53.948: D/(1742): I'm alive. See: 6<br />
04-17 08:17:53.948: D/(1742): I'm alive. See: 7<br />
04-17 08:17:53.948: D/(1742): I'm alive. See: 8<br />
04-17 08:17:53.987: D/(1742): I'm alive. See: 9<br />
04-17 08:17:53.987: W/System.err(1742): java.lang.IllegalArgumentException: Host name may not be null<br />
04-17 08:17:53.987: W/System.err(1742):  at org.apache.http.HttpHost.<init>(HttpHost.java:83)<br />
04-17 08:17:53.987: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.determineTarget(AbstractHttpClient.java:497)<br />
04-17 08:17:53.987: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br />
04-17 08:17:53.987: W/System.err(1742):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br />
04-17 08:17:53.987: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$circuitOff.doInBackground(GarageDoorOpenerActivity.java:317)<br />
04-17 08:17:53.987: W/System.err(1742):  at com.garagedoor.opener.GarageDoorOpenerActivity$circuitOff.doInBackground(GarageDoorOpenerActivity.java:1)<br />
04-17 08:17:53.987: W/System.err(1742):  at android.os.AsyncTask$2.call(AsyncTask.java:264)<br />
04-17 08:17:53.987: W/System.err(1742):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)<br />
04-17 08:17:53.995: W/System.err(1742):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)<br />
04-17 08:17:53.995: W/System.err(1742):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)<br />
04-17 08:17:53.995: W/System.err(1742):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
04-17 08:17:53.995: W/System.err(1742):  at java.lang.Thread.run(Thread.java:856)<br />
04-17 08:17:54.002: D/(1742): I'm alive. See: 10<br />
```
Again... no hangs or force closes. I'll let you know how the real wold goes later today.

edit: saw the host name may not be null statement and tried to access it from my PC... looks like the Arduino is offline.


----------



## dl_evans (Dec 13, 2011)

Well it worked once that logcat is here:


```
<br />
04-17 18:50:57.586: D/(4124): I'm alive. See: 3<br />
04-17 18:50:57.586: D/(4124): I'm alive. See: 11<br />
04-17 18:50:57.586: D/(4124): I'm alive. See: 12<br />
04-17 18:50:59.594: D/dalvikvm(4124): GC_CONCURRENT freed 282K, 4% free 12977K/13447K, paused 5ms+3ms<br />
04-17 18:50:59.750: D/dalvikvm(4124): GC_FOR_ALLOC freed 223K, 4% free 12986K/13447K, paused 15ms<br />
04-17 18:50:59.750: I/dalvikvm-heap(4124): Grow heap (frag case) to 13.071MB for 279056-byte allocation<br />
04-17 18:50:59.765: D/dalvikvm(4124): GC_FOR_ALLOC freed 28K, 4% free 13230K/13767K, paused 11ms<br />
04-17 18:50:59.773: D/(4124): I'm alive. See: 2<br />
04-17 18:50:59.773: D/(4124): I'm alive. See: 4<br />
04-17 18:50:59.945: D/(4124): I'm alive. See: 5<br />
04-17 18:50:59.984: W/InputManagerService(175): Window already focused, ignoring focus gain of: [email protected]<br />
04-17 18:51:03.453: D/(4124): I'm alive. See: 6<br />
04-17 18:51:03.453: D/(4124): I'm alive. See: 7<br />
04-17 18:51:03.453: D/(4124): I'm alive. See: 8<br />
04-17 18:51:03.492: D/(4124): I'm alive. See: 9<br />
04-17 18:51:03.664: D/(4124): I'm alive. See: 10<br />
04-17 18:51:03.726: W/InputManagerService(175): Window already focused, ignoring focus gain of: [email protected]<br />
```
I tried it again and it force closed:


```
<br />
04-17 18:54:41.015: D/(4232): I'm alive. See: 3<br />
04-17 18:54:41.015: D/(4232): I'm alive. See: 11<br />
04-17 18:54:41.015: D/(4232): I'm alive. See: 12<br />
04-17 18:54:46.969: I/InputDispatcher(175): Application is not responding: Window{41c52028 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity paused=false}.  5004.1ms since event, 5001.3ms since wait started<br />
04-17 18:54:46.969: I/WindowManager(175): Input event dispatching timed out sending to com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity<br />
04-17 18:54:46.992: I/Process(175): Sending signal. PID: 4232 SIG: 3<br />
04-17 18:54:46.992: I/dalvikvm(4232): threadid=3: reacting to signal 3<br />
04-17 18:54:47.000: I/dalvikvm(4232): Wrote stack traces to '/data/anr/traces.txt'<br />
04-17 18:54:47.000: I/Process(175): Sending signal. PID: 175 SIG: 3<br />
04-17 18:54:47.000: I/dalvikvm(175): threadid=3: reacting to signal 3<br />
04-17 18:54:47.023: I/dalvikvm(175): Wrote stack traces to '/data/anr/traces.txt'<br />
04-17 18:54:47.023: I/Process(175): Sending signal. PID: 383 SIG: 3<br />
04-17 18:54:47.023: I/dalvikvm(383): threadid=3: reacting to signal 3<br />
04-17 18:54:47.023: I/dalvikvm(383): Wrote stack traces to '/data/anr/traces.txt'<br />
04-17 18:54:47.023: I/Process(175): Sending signal. PID: 266 SIG: 3<br />
04-17 18:54:47.023: I/dalvikvm(266): threadid=3: reacting to signal 3<br />
04-17 18:54:47.031: I/dalvikvm(266): Wrote stack traces to '/data/anr/traces.txt'<br />
04-17 18:54:47.031: I/Process(175): Sending signal. PID: 399 SIG: 3<br />
04-17 18:54:47.031: I/dalvikvm(399): threadid=3: reacting to signal 3<br />
04-17 18:54:47.039: I/dalvikvm(399): Wrote stack traces to '/data/anr/traces.txt'<br />
04-17 18:54:47.203: D/dalvikvm(175): JIT code cache reset in 7 ms (1048452 bytes 2/0)<br />
04-17 18:54:47.219: D/dalvikvm(175): GC_CONCURRENT freed 1442K, 17% free 18275K/21831K, paused 2ms+13ms<br />
04-17 18:54:47.359: D/dalvikvm(175): GC_EXPLICIT freed 324K, 17% free 18283K/21831K, paused 2ms+5ms<br />
04-17 18:54:47.922: E/ActivityManager(175): ANR in com.garagedoor.opener (com.garagedoor.opener/.GarageDoorOpenerActivity)<br />
04-17 18:54:47.922: E/ActivityManager(175): Reason: keyDispatchingTimedOut<br />
04-17 18:54:47.922: E/ActivityManager(175): Load: 0.04 / 0.18 / 0.22<br />
04-17 18:54:47.922: E/ActivityManager(175): CPU usage from 7745ms to 0ms ago:<br />
04-17 18:54:47.922: E/ActivityManager(175):   2.8% 175/system_server: 0.9% user + 1.9% kernel / faults: 66 minor<br />
04-17 18:54:47.922: E/ActivityManager(175):   1.1% 101/irq/206-mms_ts: 0% user + 1.1% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175):   0.3% 266/com.android.systemui: 0.2% user + 0.1% kernel / faults: 7 minor<br />
04-17 18:54:47.922: E/ActivityManager(175):   0.1% 114/surfaceflinger: 0% user + 0.1% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175):   0% 131/adbd: 0% user + 0% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175):   0% 3412/com.google.android.apps.maps:NetworkLocationService: 0% user + 0% kernel / faults: 1 minor<br />
04-17 18:54:47.922: E/ActivityManager(175):   0.1% 3851/kworker/u:5: 0% user + 0.1% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175):   0.1% 4232/com.garagedoor.opener: 0.1% user + 0% kernel / faults: 17 minor<br />
04-17 18:54:47.922: E/ActivityManager(175): 3.2% TOTAL: 0.9% user + 2.2% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175): CPU usage from 394ms to 910ms later:<br />
04-17 18:54:47.922: E/ActivityManager(175):   7.5% 175/system_server: 0% user + 7.5% kernel / faults: 27 minor<br />
04-17 18:54:47.922: E/ActivityManager(175):	 3.7% 226/InputDispatcher: 1.8% user + 1.8% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175):   1.5% 3732/kworker/0:1: 0% user + 1.5% kernel<br />
04-17 18:54:47.922: E/ActivityManager(175): 3% TOTAL: 0% user + 3% kernel<br />
04-17 18:54:49.594: W/ActivityManager(175):   Force finishing activity com.garagedoor.opener/.GarageDoorOpenerActivity<br />
04-17 18:54:49.656: I/ActivityManager(175): Killing ProcessRecord{41a144e0 4232:com.garagedoor.opener/10115}: user's request<br />
04-17 18:54:49.679: I/ActivityManager(175): Process com.garagedoor.opener (pid 4232) has died.<br />
04-17 18:54:49.679: I/WindowManager(175): WIN DEATH: Window{41c52028 com.garagedoor.opener/com.garagedoor.opener.GarageDoorOpenerActivity paused=true}<br />
04-17 18:54:49.804: W/InputManagerService(175): Got RemoteException sending setActive(false) notification to pid 4232 uid 10115<br />
04-17 18:54:50.062: D/dalvikvm(413): null clazz in OP_INSTANCE_OF, single-stepping<br />
04-17 18:55:20.156: I/power(175): *** set_screen_state 0<br />
04-17 18:55:20.234: D/SurfaceFlinger(114): About to give-up screen, flinger = 0x729918<br />
04-17 18:55:20.289: D/NfcService(399): NFC-C OFF, disconnect<br />
04-17 18:55:20.304: D/NfcService(399): NFC-EE OFF<br />
04-17 18:55:20.484: D/dalvikvm(413): GC_CONCURRENT freed 1586K, 29% free 17644K/24519K, paused 2ms+12ms<br />
04-17 18:55:22.609: D/dalvikvm(3412): GC_CONCURRENT freed 462K, 6% free 13756K/14599K, paused 2ms+3ms<br />
04-17 18:55:22.672: D/dalvikvm(1741): GC_CONCURRENT freed 461K, 5% free 13863K/14535K, paused 5ms+3ms<br />
```
Traces.txt:


```
<br />
----- pid 4232 at 2012-04-17 18:54:47 -----<br />
Cmd line: com.garagedoor.opener<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a2c460 self=0x1f73828<br />
  | sysTid=4232 nice=0 sched=0/0 cgrp=default handle=1074115720<br />
  | schedstat=( 0 0 0 ) utm=60 stm=14 core=0<br />
  at libcore.io.Posix.connect(Native Method)<br />
  at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)<br />
  at libcore.io.IoBridge.connectErrno(IoBridge.java:127)<br />
  at libcore.io.IoBridge.connect(IoBridge.java:112)<br />
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)<br />
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)<br />
  at java.net.Socket.connect(Socket.java:842)<br />
  at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)<br />
  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)<br />
  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)<br />
  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)<br />
  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br />
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$GetMethod.getInternetData(GarageDoorOpenerActivity.java:347)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$httpTask.onPreExecute(GarageDoorOpenerActivity.java:230)<br />
  at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:561)<br />
  at android.os.AsyncTask.execute(AsyncTask.java:511)<br />
  at com.garagedoor.opener.GarageDoorOpenerActivity$1.onClick(GarageDoorOpenerActivity.java:116)<br />
  at android.view.View.performClick(View.java:3511)<br />
  at android.view.View$PerformClick.run(View.java:14105)<br />
  at android.os.Handler.handleCallback(Handler.java:605)<br />
  at android.os.Handler.dispatchMessage(Handler.java:92)<br />
  at android.os.Looper.loop(Looper.java:137)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"AsyncTask #2" prio=5 tid=14 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4169ce88 self=0x213b7d8<br />
  | sysTid=4254 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34970104<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4169cfa8> (a java.lang.VMThread) held by tid=14 (AsyncTask #2)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #3" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4174b748 self=0x214b558<br />
  | sysTid=4253 nice=0 sched=0/0 cgrp=default handle=34328760<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Timer-0" prio=5 tid=12 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41682bb0 self=0x2100640<br />
  | sysTid=4251 nice=0 sched=0/0 cgrp=default handle=34328696<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41682bb0> (a java.util.Timer$TimerImpl)<br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.util.Timer$TimerImpl.run(Timer.java:214)<br />
"AsyncTask #1" prio=5 tid=11 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4167e4d8 self=0x21413c0<br />
  | sysTid=4250 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34265816<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41690dd8> (a java.lang.VMThread) held by tid=11 (AsyncTask #1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41688c88 self=0x20efae8<br />
  | sysTid=4244 nice=0 sched=0/0 cgrp=default handle=34944360<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41688990 self=0x2123710<br />
  | sysTid=4243 nice=0 sched=0/0 cgrp=default handle=34293640<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416857e8 self=0x2155a88<br />
  | sysTid=4242 nice=0 sched=0/0 cgrp=default handle=34364744<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41685690 self=0x209a548<br />
  | sysTid=4241 nice=0 sched=0/0 cgrp=default handle=34728304<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a225d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41685528 self=0x21499b0<br />
  | sysTid=4240 nice=0 sched=0/0 cgrp=default handle=34728240<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a224f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685438 self=0x2153de8<br />
  | sysTid=4239 nice=0 sched=0/0 cgrp=default handle=34728176<br />
  | schedstat=( 0 0 0 ) utm=7 stm=4 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685350 self=0x214a848<br />
  | sysTid=4238 nice=0 sched=0/0 cgrp=default handle=34948872<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x41685258 self=0x1ff8cb8<br />
  | sysTid=4237 nice=0 sched=0/0 cgrp=default handle=34600464<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685178 self=0x2138710<br />
  | sysTid=4234 nice=0 sched=0/0 cgrp=default handle=34917936<br />
  | schedstat=( 0 0 0 ) utm=3 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 4232 -----<br />
<br />
----- pid 175 at 2012-04-17 18:54:47 -----<br />
Cmd line: system_server<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a2c460 self=0x1f73828<br />
  | sysTid=175 nice=0 sched=0/0 cgrp=default handle=1074115720<br />
  | schedstat=( 0 0 0 ) utm=307 stm=62 core=1<br />
  at com.android.server.SystemServer.init1(Native Method)<br />
  at com.android.server.SystemServer.main(SystemServer.java:808)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"DhcpStateMachine" prio=5 tid=69 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c44208 self=0x26139b8<br />
  | sysTid=3318 nice=0 sched=0/0 cgrp=default handle=37756232<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiMonitor" prio=5 tid=67 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b18d18 self=0x2404bb8<br />
  | sysTid=3303 nice=0 sched=0/0 cgrp=default handle=37996792<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.net.wifi.WifiNative.waitForEvent(Native Method)<br />
  at android.net.wifi.WifiMonitor$MonitorThread.run(WifiMonitor.java:289)<br />
"Timer-3" prio=5 tid=68 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c50d28 self=0x2601a98<br />
  | sysTid=1839 nice=0 sched=0/0 cgrp=default handle=39853800<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41c50d28> (a java.util.Timer$TimerImpl)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.util.Timer$TimerImpl.run(Timer.java:238)<br />
"SoundPool" prio=5 tid=71 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c0f5b0 self=0x2543908<br />
  | sysTid=571 nice=0 sched=0/0 cgrp=default handle=36216408<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPoolThread" prio=5 tid=70 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41c0e100 self=0x2544900<br />
  | sysTid=572 nice=0 sched=0/0 cgrp=default handle=36219608<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"pool-1-thread-1" prio=5 tid=66 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x419bbc60 self=0x2229678<br />
  | sysTid=533 nice=0 sched=0/0 cgrp=default handle=36791344<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4169caa8> (a java.lang.VMThread) held by tid=66 (pool-1-thread-1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"GpsLocationProvider" prio=5 tid=65 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41bcda70 self=0x236b6d0<br />
  | sysTid=487 nice=10 sched=0/0 cgrp=bg_non_interactive handle=36833088<br />
  | schedstat=( 0 0 0 ) utm=0 stm=1 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.location.GpsLocationProvider$GpsLocationProviderThread.run(GpsLocationProvider.java:1603)<br />
"Binder Thread #9" prio=5 tid=64 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b878a0 self=0x23150b0<br />
  | sysTid=453 nice=0 sched=0/0 cgrp=default handle=36775864<br />
  | schedstat=( 0 0 0 ) utm=247 stm=76 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #8" prio=5 tid=63 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b84ff0 self=0x2311868<br />
  | sysTid=450 nice=0 sched=0/0 cgrp=default handle=36769904<br />
  | schedstat=( 0 0 0 ) utm=267 stm=77 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"[email protected]@41b7fe68" daemon prio=5 tid=62 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b83420 self=0x23110b0<br />
  | sysTid=451 nice=0 sched=0/0 cgrp=default handle=36771072<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41783820> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at org.apache.http.impl.conn.tsccm.RefQueueWorker.run(RefQueueWorker.java:102)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #7" prio=5 tid=61 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b847c8 self=0x23105e0<br />
  | sysTid=449 nice=0 sched=0/0 cgrp=default handle=36767136<br />
  | schedstat=( 0 0 0 ) utm=285 stm=67 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #6" prio=5 tid=60 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b82868 self=0x230fb70<br />
  | sysTid=447 nice=0 sched=0/0 cgrp=default handle=36681024<br />
  | schedstat=( 0 0 0 ) utm=302 stm=67 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #5" prio=5 tid=59 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41b67250 self=0x22f3fa0<br />
  | sysTid=427 nice=0 sched=0/0 cgrp=default handle=35967696<br />
  | schedstat=( 0 0 0 ) utm=269 stm=64 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"NetworkTimeUpdateService" prio=5 tid=58 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419e0048 self=0x22d11a0<br />
  | sysTid=379 nice=0 sched=0/0 cgrp=default handle=36509168<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ThrottleService" prio=5 tid=57 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419c0188 self=0x22d03a0<br />
  | sysTid=378 nice=0 sched=0/0 cgrp=default handle=35146496<br />
  | schedstat=( 0 0 0 ) utm=3 stm=3 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"CountryDetectorService" prio=5 tid=56 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419dd6d8 self=0x22cfd48<br />
  | sysTid=376 nice=10 sched=0/0 cgrp=bg_non_interactive handle=35147472<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.CountryDetectorService.run(CountryDetectorService.java:188)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"LocationManagerService" prio=5 tid=55 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a3d3e8 self=0x22cf8f8<br />
  | sysTid=375 nice=10 sched=0/0 cgrp=bg_non_interactive handle=35146720<br />
  | schedstat=( 0 0 0 ) utm=6 stm=3 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.LocationManagerService.run(LocationManagerService.java:563)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"watchdog" prio=5 tid=54 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4168dd90 self=0x2171800<br />
  | sysTid=346 nice=0 sched=0/0 cgrp=default handle=35254800<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4168dd90> (a com.android.server.Watchdog)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at com.android.server.Watchdog.run(Watchdog.java:399)<br />
"Binder Thread #4" prio=5 tid=53 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419c29a8 self=0x219e8e8<br />
  | sysTid=345 nice=0 sched=0/0 cgrp=default handle=35205928<br />
  | schedstat=( 0 0 0 ) utm=284 stm=72 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #3" prio=5 tid=52 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a06650 self=0x21670a8<br />
  | sysTid=344 nice=0 sched=0/0 cgrp=default handle=34291544<br />
  | schedstat=( 0 0 0 ) utm=273 stm=64 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"UsbService host thread" prio=5 tid=51 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a73d20 self=0x219e498<br />
  | sysTid=342 nice=0 sched=0/0 cgrp=default handle=35258752<br />
  | schedstat=( 0 0 0 ) utm=0 stm=18 core=1<br />
  at com.android.server.usb.UsbHostManager.monitorUsbHostBus(Native Method)<br />
  at com.android.server.usb.UsbHostManager.access$000(UsbHostManager.java:52)<br />
  at com.android.server.usb.UsbHostManager$1.run(UsbHostManager.java:177)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"BT EventLoop" prio=5 tid=50 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419f2c28 self=0x219f660<br />
  | sysTid=340 nice=0 sched=0/0 cgrp=default handle=35209160<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"backup" prio=5 tid=49 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41aae228 self=0x2168e38<br />
  | sysTid=256 nice=10 sched=0/0 cgrp=bg_non_interactive handle=33928448<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"UsbDeviceManager" prio=5 tid=48 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41aa5208 self=0x21683e8<br />
  | sysTid=255 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34609088<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AudioService" prio=5 tid=47 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a966d8 self=0x2174ca8<br />
  | sysTid=254 nice=0 sched=0/0 cgrp=default handle=34914096<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.media.AudioService$AudioSystemThread.run(AudioService.java:2088)<br />
"VoldConnector.CallbackHandler" prio=5 tid=46 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a79310 self=0x2167f98<br />
  | sysTid=252 nice=0 sched=0/0 cgrp=default handle=34890040<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"VoldConnector" prio=5 tid=45 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a79268 self=0x2167b48<br />
  | sysTid=251 nice=0 sched=0/0 cgrp=default handle=34937704<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.server.NativeDaemonConnector.listenToSocket(NativeDaemonConnector.java:130)<br />
  at com.android.server.NativeDaemonConnector.run(NativeDaemonConnector.java:88)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"MountService" prio=5 tid=44 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a78d20 self=0x21747e8<br />
  | sysTid=250 nice=0 sched=0/0 cgrp=default handle=34922344<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiWatchdogStateMachine" prio=5 tid=43 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a72420 self=0x2174398<br />
  | sysTid=249 nice=0 sched=0/0 cgrp=default handle=34701376<br />
  | schedstat=( 0 0 0 ) utm=1 stm=1 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Tethering" prio=5 tid=42 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a6e960 self=0x2173f48<br />
  | sysTid=248 nice=0 sched=0/0 cgrp=default handle=34918200<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ConnectivityServiceThread" prio=5 tid=41 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a65200 self=0x2059d00<br />
  | sysTid=247 nice=0 sched=0/0 cgrp=default handle=34888264<br />
  | schedstat=( 0 0 0 ) utm=3 stm=2 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiService" prio=5 tid=40 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a63d68 self=0x20598b0<br />
  | sysTid=246 nice=0 sched=0/0 cgrp=default handle=34836864<br />
  | schedstat=( 0 0 0 ) utm=23 stm=42 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiStateMachine" prio=5 tid=39 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a58b18 self=0x2059460<br />
  | sysTid=245 nice=0 sched=0/0 cgrp=default handle=35094888<br />
  | schedstat=( 0 0 0 ) utm=25 stm=18 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"WifiP2pService" prio=5 tid=38 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a53fc0 self=0x201cfd8<br />
  | sysTid=244 nice=0 sched=0/0 cgrp=default handle=34969048<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetworkPolicy" prio=5 tid=37 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a52978 self=0x201cb88<br />
  | sysTid=243 nice=0 sched=0/0 cgrp=default handle=34204064<br />
  | schedstat=( 0 0 0 ) utm=22 stm=7 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetworkStats" prio=5 tid=36 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a4ff98 self=0x201c738<br />
  | sysTid=242 nice=0 sched=0/0 cgrp=default handle=34203912<br />
  | schedstat=( 0 0 0 ) utm=95 stm=10 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetdConnector.CallbackHandler" prio=5 tid=35 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a496b8 self=0x2177aa8<br />
  | sysTid=241 nice=0 sched=0/0 cgrp=default handle=34242888<br />
  | schedstat=( 0 0 0 ) utm=3 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"NetdConnector" prio=5 tid=34 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a495d0 self=0x2177658<br />
  | sysTid=240 nice=0 sched=0/0 cgrp=default handle=34313160<br />
  | schedstat=( 0 0 0 ) utm=1 stm=2 core=1<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.server.NativeDaemonConnector.listenToSocket(NativeDaemonConnector.java:130)<br />
  at com.android.server.NativeDaemonConnector.run(NativeDaemonConnector.java:88)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"BluetoothAdapterStateMachine" prio=5 tid=33 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419ee1a8 self=0x21642c0<br />
  | sysTid=234 nice=0 sched=0/0 cgrp=default handle=34936016<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:0" prio=5 tid=32 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419df6e0 self=0x2163e70<br />
  | sysTid=233 nice=0 sched=0/0 cgrp=default handle=34654960<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:1" prio=5 tid=31 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419dd408 self=0x2163a20<br />
  | sysTid=232 nice=0 sched=0/0 cgrp=default handle=34661400<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"BluetoothProfileState:2" prio=5 tid=30 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419b1440 self=0x21635d0<br />
  | sysTid=231 nice=0 sched=0/0 cgrp=default handle=34528600<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"InputReader" prio=10 tid=29 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419ac3e8 self=0x2059010<br />
  | sysTid=227 nice=-8 sched=0/0 cgrp=default handle=34341720<br />
  | schedstat=( 0 0 0 ) utm=64 stm=85 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"InputDispatcher" prio=10 tid=28 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a1a690 self=0x2058bc0<br />
  | sysTid=226 nice=-8 sched=0/0 cgrp=default handle=34284640<br />
  | schedstat=( 0 0 0 ) utm=289 stm=176 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41680818> (a com.android.server.am.ActivityManagerService$4)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at com.android.server.am.ActivityManagerService.dumpStackTraces(ActivityManagerService.java:2929)<br />
  at com.android.server.am.ActivityManagerService.appNotResponding(ActivityManagerService.java:3073)<br />
  at com.android.server.am.ActivityRecord.keyDispatchingTimedOut(ActivityRecord.java:728)<br />
  at com.android.server.am.ActivityRecord$Token.keyDispatchingTimedOut(ActivityRecord.java:241)<br />
  at com.android.server.wm.InputMonitor.notifyANR(InputMonitor.java:108)<br />
  at com.android.server.wm.InputManager$Callbacks.notifyANR(InputManager.java:549)<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"android.hardware.SensorManager$SensorThread" prio=5 tid=27 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a151c8 self=0x2058770<br />
  | sysTid=224 nice=-8 sched=0/0 cgrp=default handle=34427080<br />
  | schedstat=( 0 0 0 ) utm=309 stm=216 core=1<br />
  at android.hardware.SensorManager.sensors_data_poll(Native Method)<br />
  at android.hardware.SensorManager$SensorThread$SensorThreadRunnable.run(SensorManager.java:498)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"SoundPoolThread" prio=5 tid=26 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a25680 self=0x213e290<br />
  | sysTid=223 nice=0 sched=0/0 cgrp=default handle=34898976<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPool" prio=5 tid=25 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a26710 self=0x2137738<br />
  | sysTid=222 nice=0 sched=0/0 cgrp=default handle=34062928<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"WindowManagerPolicy" prio=5 tid=24 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419a7bb8 self=0x2141d50<br />
  | sysTid=221 nice=-2 sched=0/0 cgrp=default handle=34556584<br />
  | schedstat=( 0 0 0 ) utm=519 stm=250 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.wm.WindowManagerService$PolicyThread.run(WindowManagerService.java:745)<br />
"WindowManager" prio=5 tid=23 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41953180 self=0x20fcac0<br />
  | sysTid=220 nice=-4 sched=0/0 cgrp=default handle=34974328<br />
  | schedstat=( 0 0 0 ) utm=790 stm=196 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:703)<br />
"AlarmManager" prio=5 tid=20 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419a2ac0 self=0x2138038<br />
  | sysTid=219 nice=0 sched=0/0 cgrp=default handle=34508160<br />
  | schedstat=( 0 0 0 ) utm=25 stm=7 core=0<br />
  at com.android.server.AlarmManagerService.waitForAlarm(Native Method)<br />
  at com.android.server.AlarmManagerService.access$100(AlarmManagerService.java:56)<br />
  at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:627)<br />
"PowerManagerService" prio=5 tid=22 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x418a2200 self=0x210a060<br />
  | sysTid=218 nice=0 sched=0/0 cgrp=default handle=34953680<br />
  | schedstat=( 0 0 0 ) utm=82 stm=38 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"PowerManagerService.mScreenOffThread" prio=5 tid=21 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x418a6728 self=0x2143560<br />
  | sysTid=217 nice=0 sched=0/0 cgrp=default handle=34566208<br />
  | schedstat=( 0 0 0 ) utm=57 stm=220 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"UEventObserver" prio=5 tid=19 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41a42cd0 self=0x20fbae8<br />
  | sysTid=215 nice=0 sched=0/0 cgrp=default handle=33931016<br />
  | schedstat=( 0 0 0 ) utm=167 stm=26 core=0<br />
  at android.os.UEventObserver.next_event(Native Method)<br />
  at android.os.UEventObserver.access$100(UEventObserver.java:39)<br />
  at android.os.UEventObserver$UEventThread.run(UEventObserver.java:102)<br />
"SyncHandlerThread" prio=5 tid=18 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x419c8f10 self=0x2143b90<br />
  | sysTid=212 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34907296<br />
  | schedstat=( 0 0 0 ) utm=9 stm=3 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AccountManagerService" prio=5 tid=17 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41996ff8 self=0x2157ea0<br />
  | sysTid=211 nice=0 sched=0/0 cgrp=default handle=34737808<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"FileObserver" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41779d40 self=0x21425c8<br />
  | sysTid=199 nice=0 sched=0/0 cgrp=default handle=34672816<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.FileObserver$ObserverThread.observe(Native Method)<br />
  at android.os.FileObserver$ObserverThread.run(FileObserver.java:88)<br />
"PackageManager" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41714120 self=0x214b558<br />
  | sysTid=197 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34892768<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"ProcessStats" prio=5 tid=14 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4170e688 self=0x2144898<br />
  | sysTid=196 nice=0 sched=0/0 cgrp=default handle=34670760<br />
  | schedstat=( 0 0 0 ) utm=3 stm=3 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4170e688> (a com.android.server.am.ActivityManagerService$3)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1526)<br />
"ActivityManager" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4168f7d0 self=0x2147980<br />
  | sysTid=194 nice=-2 sched=0/0 cgrp=default handle=34339464<br />
  | schedstat=( 0 0 0 ) utm=424 stm=482 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1411)<br />
"android.server.ServerThread" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416856d0 self=0x2100640<br />
  | sysTid=193 nice=-2 sched=0/0 cgrp=default handle=34660912<br />
  | schedstat=( 0 0 0 ) utm=1021 stm=380 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.server.ServerThread.run(SystemServer.java:744)<br />
"SensorService" prio=10 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41685378 self=0x21413c0<br />
  | sysTid=192 nice=-8 sched=0/0 cgrp=default handle=34735000<br />
  | schedstat=( 0 0 0 ) utm=322 stm=828 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41681d20 self=0x20efae8<br />
  | sysTid=191 nice=0 sched=0/0 cgrp=default handle=34944360<br />
  | schedstat=( 0 0 0 ) utm=256 stm=77 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41681a78 self=0x2123710<br />
  | sysTid=190 nice=0 sched=0/0 cgrp=default handle=34664032<br />
  | schedstat=( 0 0 0 ) utm=231 stm=84 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4167e858 self=0x2155a88<br />
  | sysTid=189 nice=0 sched=0/0 cgrp=default handle=34656688<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=1<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4167e700 self=0x209a548<br />
  | sysTid=188 nice=0 sched=0/0 cgrp=default handle=34667504<br />
  | schedstat=( 0 0 0 ) utm=26 stm=20 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a225d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x4167e598 self=0x21499b0<br />
  | sysTid=187 nice=0 sched=0/0 cgrp=default handle=34651824<br />
  | schedstat=( 0 0 0 ) utm=5 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a224f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x4167e4a8 self=0x2153de8<br />
  | sysTid=183 nice=0 sched=0/0 cgrp=default handle=34670968<br />
  | schedstat=( 0 0 0 ) utm=321 stm=157 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x4167e3c0 self=0x214a848<br />
  | sysTid=182 nice=0 sched=0/0 cgrp=default handle=34647952<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x4167e2c8 self=0x1ff8cb8<br />
  | sysTid=179 nice=0 sched=0/0 cgrp=default handle=34664648<br />
  | schedstat=( 0 0 0 ) utm=11 stm=11 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x4167e1e8 self=0x2138710<br />
  | sysTid=177 nice=0 sched=0/0 cgrp=default handle=34647344<br />
  | schedstat=( 0 0 0 ) utm=341 stm=14 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 175 -----<br />
<br />
----- pid 383 at 2012-04-17 18:54:47 -----<br />
Cmd line: com.android.phone<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a2c460 self=0x1f73828<br />
  | sysTid=383 nice=0 sched=0/0 cgrp=default handle=1074115720<br />
  | schedstat=( 0 0 0 ) utm=114 stm=59 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"Binder Thread #6" prio=5 tid=26 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416f99c0 self=0x21b69d8<br />
  | sysTid=3110 nice=0 sched=0/0 cgrp=default handle=35692160<br />
  | schedstat=( 0 0 0 ) utm=4 stm=1 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GsmDC-2" prio=5 tid=25 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416e8650 self=0x2205510<br />
  | sysTid=1692 nice=0 sched=0/0 cgrp=default handle=34746512<br />
  | schedstat=( 0 0 0 ) utm=21 stm=10 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Stk App Service" prio=5 tid=24 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x417238f0 self=0x219b730<br />
  | sysTid=810 nice=0 sched=0/0 cgrp=default handle=34878496<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at com.android.stk.StkAppService.run(StkAppService.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #5" prio=5 tid=23 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4172c0e8 self=0x2151eb0<br />
  | sysTid=789 nice=0 sched=0/0 cgrp=default handle=34312656<br />
  | schedstat=( 0 0 0 ) utm=184 stm=26 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #4" prio=5 tid=22 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4172ba88 self=0x211a850<br />
  | sysTid=788 nice=0 sched=0/0 cgrp=default handle=34934408<br />
  | schedstat=( 0 0 0 ) utm=128 stm=20 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SipService.Executor" prio=5 tid=21 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4170dba0 self=0x2146dc8<br />
  | sysTid=552 nice=0 sched=0/0 cgrp=default handle=34234648<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #3" prio=5 tid=20 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4170a100 self=0x211cf28<br />
  | sysTid=551 nice=0 sched=0/0 cgrp=default handle=34890776<br />
  | schedstat=( 0 0 0 ) utm=127 stm=13 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"BluetoothHandsfreeHandler" prio=5 tid=19 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416817d8 self=0x2103020<br />
  | sysTid=538 nice=0 sched=0/0 cgrp=default handle=34242832<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"AsyncQueryWorker" prio=5 tid=18 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a0d08 self=0x210a060<br />
  | sysTid=535 nice=0 sched=0/0 cgrp=default handle=34727912<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Cat Icon Loader" prio=5 tid=17 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4169c688 self=0x2157ea0<br />
  | sysTid=486 nice=0 sched=0/0 cgrp=default handle=34556624<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"RilMessageDecoder" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a0980 self=0x21425c8<br />
  | sysTid=485 nice=0 sched=0/0 cgrp=default handle=34880320<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Cat Telephony service" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416a2528 self=0x2147980<br />
  | sysTid=483 nice=0 sched=0/0 cgrp=default handle=34330560<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"SyncHandler-0" prio=5 tid=14 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41693d70 self=0x2144898<br />
  | sysTid=482 nice=0 sched=0/0 cgrp=default handle=34378576<br />
  | schedstat=( 0 0 0 ) utm=3 stm=7 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"CdmaDC-1" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416e5220 self=0x214b558<br />
  | sysTid=481 nice=0 sched=0/0 cgrp=default handle=34377896<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"RILReceiver" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c4b20 self=0x2100640<br />
  | sysTid=476 nice=0 sched=0/0 cgrp=default handle=34655904<br />
  | schedstat=( 0 0 0 ) utm=15 stm=2 core=1<br />
  at android.net.LocalSocketImpl.readba_native(Native Method)<br />
  at android.net.LocalSocketImpl.access$400(LocalSocketImpl.java:29)<br />
  at android.net.LocalSocketImpl$SocketInputStream.read(LocalSocketImpl.java:92)<br />
  at com.android.internal.telephony.RIL.readRilMessage(RIL.java:453)<br />
  at com.android.internal.telephony.RIL.access$300(RIL.java:199)<br />
  at com.android.internal.telephony.RIL$RILReceiver.run(RIL.java:552)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"RILSender" prio=5 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c2630 self=0x21413c0<br />
  | sysTid=475 nice=0 sched=0/0 cgrp=default handle=34658888<br />
  | schedstat=( 0 0 0 ) utm=3 stm=1 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41689fc0 self=0x20efae8<br />
  | sysTid=398 nice=0 sched=0/0 cgrp=default handle=34693432<br />
  | schedstat=( 0 0 0 ) utm=118 stm=25 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41689e68 self=0x2123710<br />
  | sysTid=395 nice=0 sched=0/0 cgrp=default handle=34664032<br />
  | schedstat=( 0 0 0 ) utm=217 stm=30 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416863a8 self=0x2155a88<br />
  | sysTid=394 nice=0 sched=0/0 cgrp=default handle=34656688<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41686250 self=0x209a548<br />
  | sysTid=393 nice=0 sched=0/0 cgrp=default handle=34667504<br />
  | schedstat=( 0 0 0 ) utm=4 stm=1 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a225d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416860e8 self=0x21499b0<br />
  | sysTid=392 nice=0 sched=0/0 cgrp=default handle=34651824<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a224f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685ff8 self=0x2153de8<br />
  | sysTid=391 nice=0 sched=0/0 cgrp=default handle=34670968<br />
  | schedstat=( 0 0 0 ) utm=29 stm=22 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685f10 self=0x214a848<br />
  | sysTid=390 nice=0 sched=0/0 cgrp=default handle=34647952<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x41685e18 self=0x1ff8cb8<br />
  | sysTid=389 nice=0 sched=0/0 cgrp=default handle=34664648<br />
  | schedstat=( 0 0 0 ) utm=3 stm=3 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41685d38 self=0x2138710<br />
  | sysTid=386 nice=0 sched=0/0 cgrp=default handle=34647344<br />
  | schedstat=( 0 0 0 ) utm=32 stm=2 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 383 -----<br />
<br />
----- pid 266 at 2012-04-17 18:54:47 -----<br />
Cmd line: com.android.systemui<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a2c460 self=0x1f73828<br />
  | sysTid=266 nice=0 sched=0/0 cgrp=default handle=1074115720<br />
  | schedstat=( 0 0 0 ) utm=2515 stm=739 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"Binder Thread #4" prio=5 tid=18 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4208e470 self=0x235a480<br />
  | sysTid=3208 nice=0 sched=0/0 cgrp=default handle=35801552<br />
  | schedstat=( 0 0 0 ) utm=6 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"AsyncTask #5" prio=5 tid=17 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x420bc2e0 self=0x234c510<br />
  | sysTid=2930 nice=10 sched=0/0 cgrp=bg_non_interactive handle=36978208<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x420bc438> (a java.lang.VMThread) held by tid=17 (AsyncTask #5)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #4" prio=5 tid=16 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41fed6a8 self=0x2349740<br />
  | sysTid=2775 nice=10 sched=0/0 cgrp=bg_non_interactive handle=35991312<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4213f330> (a java.lang.VMThread) held by tid=16 (AsyncTask #4)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #3" prio=5 tid=15 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x420ed468 self=0x233bbf0<br />
  | sysTid=2622 nice=10 sched=0/0 cgrp=bg_non_interactive handle=35913416<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x42038c30> (a java.lang.VMThread) held by tid=15 (AsyncTask #3)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #2" prio=5 tid=14 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41fb6448 self=0x233fd18<br />
  | sysTid=2369 nice=10 sched=0/0 cgrp=bg_non_interactive handle=35959208<br />
  | schedstat=( 0 0 0 ) utm=2 stm=1 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x4203b0c0> (a java.lang.VMThread) held by tid=14 (AsyncTask #2)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #3" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41884570 self=0x2290a18<br />
  | sysTid=2354 nice=0 sched=0/0 cgrp=default handle=35935144<br />
  | schedstat=( 0 0 0 ) utm=6 stm=5 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"AsyncTask #1" prio=5 tid=12 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x42019670 self=0x22e5d78<br />
  | sysTid=2137 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34907336<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x41f9de30> (a java.lang.VMThread) held by tid=12 (AsyncTask #1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"SystemUI StorageNotification" prio=5 tid=11 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x418643d0 self=0x2100640<br />
  | sysTid=433 nice=0 sched=0/0 cgrp=default handle=34248712<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.os.HandlerThread.run(HandlerThread.java:60)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x41685a08 self=0x20efae8<br />
  | sysTid=277 nice=0 sched=0/0 cgrp=default handle=34693432<br />
  | schedstat=( 0 0 0 ) utm=11 stm=4 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416858b0 self=0x2123710<br />
  | sysTid=275 nice=0 sched=0/0 cgrp=default handle=34664032<br />
  | schedstat=( 0 0 0 ) utm=13 stm=3 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41681df0 self=0x2155a88<br />
  | sysTid=274 nice=0 sched=0/0 cgrp=default handle=34656688<br />
  | schedstat=( 0 0 0 ) utm=0 stm=2 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41681c98 self=0x209a548<br />
  | sysTid=273 nice=0 sched=0/0 cgrp=default handle=34667504<br />
  | schedstat=( 0 0 0 ) utm=2 stm=5 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a225d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41681b30 self=0x21499b0<br />
  | sysTid=272 nice=0 sched=0/0 cgrp=default handle=34651824<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a224f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41681a40 self=0x2153de8<br />
  | sysTid=271 nice=0 sched=0/0 cgrp=default handle=34670968<br />
  | schedstat=( 0 0 0 ) utm=78 stm=35 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41681958 self=0x214a848<br />
  | sysTid=270 nice=0 sched=0/0 cgrp=default handle=34647344<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x41681860 self=0x1ff8cb8<br />
  | sysTid=269 nice=0 sched=0/0 cgrp=default handle=34664648<br />
  | schedstat=( 0 0 0 ) utm=3 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41681780 self=0x2138710<br />
  | sysTid=268 nice=0 sched=0/0 cgrp=default handle=34647952<br />
  | schedstat=( 0 0 0 ) utm=92 stm=7 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 266 -----<br />
<br />
----- pid 399 at 2012-04-17 18:54:47 -----<br />
Cmd line: com.android.nfc<br />
DALVIK THREADS:<br />
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)<br />
"main" prio=5 tid=1 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x40a2c460 self=0x1f73828<br />
  | sysTid=399 nice=0 sched=0/0 cgrp=default handle=1074115720<br />
  | schedstat=( 0 0 0 ) utm=3 stm=9 core=1<br />
  at android.os.MessageQueue.nativePollOnce(Native Method)<br />
  at android.os.MessageQueue.next(MessageQueue.java:118)<br />
  at android.os.Looper.loop(Looper.java:118)<br />
  at android.app.ActivityThread.main(ActivityThread.java:4424)<br />
  at java.lang.reflect.Method.invokeNative(Native Method)<br />
  at java.lang.reflect.Method.invoke(Method.java:511)<br />
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)<br />
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)<br />
  at dalvik.system.NativeStart.main(Native Method)<br />
"AsyncTask #5" prio=5 tid=20 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416d6a98 self=0x2096388<br />
  | sysTid=2053 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34977880<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416d6bf0> (a java.lang.VMThread) held by tid=20 (AsyncTask #5)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #4" prio=5 tid=19 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416d6728 self=0x2158a20<br />
  | sysTid=2030 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34916688<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416d6848> (a java.lang.VMThread) held by tid=19 (AsyncTask #4)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #3" prio=5 tid=18 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416d6238 self=0x213b7d8<br />
  | sysTid=2013 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34250056<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416d6358> (a java.lang.VMThread) held by tid=18 (AsyncTask #3)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"AsyncTask #2" prio=5 tid=17 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416cafb0 self=0x2157ea0<br />
  | sysTid=745 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34427080<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416cb0d0> (a java.lang.VMThread) held by tid=17 (AsyncTask #2)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"SoundPool" prio=5 tid=16 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ca9e8 self=0x21425c8<br />
  | sysTid=531 nice=0 sched=0/0 cgrp=default handle=34062928<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"SoundPoolThread" prio=5 tid=15 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416ca8e8 self=0x2144898<br />
  | sysTid=532 nice=0 sched=0/0 cgrp=default handle=34658704<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Thread-40" prio=5 tid=14 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c9b68 self=0x214b558<br />
  | sysTid=519 nice=0 sched=0/0 cgrp=default handle=34903296<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.doAccept(Native Method)<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:41)<br />
  at com.android.nfc.ndefpush.NdefPushServer$ServerThread.run(NdefPushServer.java:137)<br />
"Thread-39" prio=5 tid=13 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c95d0 self=0x2147980<br />
  | sysTid=518 nice=0 sched=0/0 cgrp=default handle=34726120<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.doAccept(Native Method)<br />
  at com.android.nfc.nxp.NativeLlcpServiceSocket.accept(NativeLlcpServiceSocket.java:41)<br />
  at com.android.nfc.snep.SnepServer$ServerThread.run(SnepServer.java:193)<br />
"NFC Message Loop" prio=5 tid=12 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c8d98 self=0x2100640<br />
  | sysTid=490 nice=0 sched=0/0 cgrp=default handle=34659320<br />
  | schedstat=( 0 0 0 ) utm=5 stm=14 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"AsyncTask #1" prio=5 tid=11 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416c8678 self=0x21413c0<br />
  | sysTid=477 nice=10 sched=0/0 cgrp=bg_non_interactive handle=34665952<br />
  | schedstat=( 0 0 0 ) utm=1 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x416c8810> (a java.lang.VMThread) held by tid=11 (AsyncTask #1)<br />
  at java.lang.Thread.parkFor(Thread.java:1231)<br />
  at sun.misc.Unsafe.park(Unsafe.java:323)<br />
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)<br />
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)<br />
  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)<br />
  at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)<br />
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)<br />
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Binder Thread #2" prio=5 tid=10 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4168a6e0 self=0x20efae8<br />
  | sysTid=411 nice=0 sched=0/0 cgrp=default handle=34944360<br />
  | schedstat=( 0 0 0 ) utm=1 stm=2 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Binder Thread #1" prio=5 tid=9 NATIVE<br />
  | group="main" sCount=1 dsCount=0 obj=0x4168a420 self=0x2123710<br />
  | sysTid=410 nice=0 sched=0/0 cgrp=default handle=34664032<br />
  | schedstat=( 0 0 0 ) utm=2 stm=1 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x416871c8 self=0x2155a88<br />
  | sysTid=409 nice=0 sched=0/0 cgrp=default handle=34656688<br />
  | schedstat=( 0 0 0 ) utm=1 stm=1 core=0<br />
  at java.lang.VMThread.sleep(Native Method)<br />
  at java.lang.Thread.sleep(Thread.java:1031)<br />
  at java.lang.Thread.sleep(Thread.java:1013)<br />
  at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"FinalizerDaemon" daemon prio=5 tid=7 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41687070 self=0x209a548<br />
  | sysTid=408 nice=0 sched=0/0 cgrp=default handle=34667504<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=1<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a225d0> (a java.lang.ref.ReferenceQueue)<br />
  at java.lang.Object.wait(Object.java:401)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)<br />
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)<br />
  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT<br />
  | group="main" sCount=1 dsCount=0 obj=0x41686f08 self=0x21499b0<br />
  | sysTid=407 nice=0 sched=0/0 cgrp=default handle=34651824<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at java.lang.Object.wait(Native Method)<br />
  - waiting on <0x40a224f8><br />
  at java.lang.Object.wait(Object.java:364)<br />
  at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)<br />
  at java.lang.Thread.run(Thread.java:856)<br />
"Compiler" daemon prio=5 tid=5 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41686e18 self=0x2153de8<br />
  | sysTid=406 nice=0 sched=0/0 cgrp=default handle=34670968<br />
  | schedstat=( 0 0 0 ) utm=1 stm=2 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"JDWP" daemon prio=5 tid=4 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41686d30 self=0x214a848<br />
  | sysTid=405 nice=0 sched=0/0 cgrp=default handle=34647344<br />
  | schedstat=( 0 0 0 ) utm=0 stm=0 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE<br />
  | group="system" sCount=0 dsCount=0 obj=0x41686c38 self=0x1ff8cb8<br />
  | sysTid=404 nice=0 sched=0/0 cgrp=default handle=34664648<br />
  | schedstat=( 0 0 0 ) utm=3 stm=4 core=0<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
"GC" daemon prio=5 tid=2 VMWAIT<br />
  | group="system" sCount=1 dsCount=0 obj=0x41686b58 self=0x2138710<br />
  | sysTid=401 nice=0 sched=0/0 cgrp=default handle=34647952<br />
  | schedstat=( 0 0 0 ) utm=2 stm=0 core=1<br />
  at dalvik.system.NativeStart.run(Native Method)<br />
----- end 399 -----<br />
```
It's getting closer at least.


----------



## dl_evans (Dec 13, 2011)

I've found that if I use the ICS previous app button and slide the app out of memory and then relaunch the app it works. Every time. I'm just trying to figure out where in the code to clear everything out without having to clear the app's memory.


----------



## dl_evans (Dec 13, 2011)

Well... it looks like it works!!!!!!!!!!! I forgot to close the connections and I guess they built up and caused the app to force close. Can't open something if it's already open, apparently. haha. So after some more Googling I figure out my mistake(s) and have rectified them.

And it looks like the the hacky-ness of the logs weren't needed after all.

Newest code:


```
<br />
package com.garagedoor.opener;<br />
import java.io.BufferedReader;<br />
import java.io.IOException;<br />
import java.io.InputStreamReader;<br />
import java.net.URI;<br />
import java.util.Timer;<br />
import java.util.TimerTask;<br />
import org.apache.http.HttpEntity;<br />
import org.apache.http.HttpResponse;<br />
import org.apache.http.client.HttpClient;<br />
import org.apache.http.client.methods.HttpGet;<br />
import org.apache.http.impl.client.DefaultHttpClient;<br />
import android.app.Activity;<br />
import android.app.ProgressDialog;<br />
import android.content.Intent;<br />
import android.content.SharedPreferences;<br />
import android.os.AsyncTask;<br />
import android.os.Bundle;<br />
import android.os.Handler;<br />
import android.view.Menu;<br />
import android.view.MenuInflater;<br />
import android.view.MenuItem;<br />
import android.view.View;<br />
import android.widget.Button;<br />
import android.widget.EditText;<br />
import android.widget.Toast;<br />
public class GarageDoorOpenerActivity extends Activity {<br />
	    //external ip holder<br />
public String publicIP = "";<br />
	    //whatever your arduino ip address was set to holder<br />
public String localIP = "";<br />
public String readURL = "";<br />
public String portNumber = "";<br />
public String readpublicIP = "";<br />
public String readlocalIP = "";<br />
public String readportNumber = "";<br />
public String URL = "";<br />
public String garagestate = "";<br />
public String pin = "";<br />
public String pinName = "";<br />
public String networkName = "";<br />
<br />
public int pinCheck = 0;<br />
boolean useExternal;<br />
private static final int REQUEST_CODE = 100;<br />
public String customURL[] = {"http://","/"};<br />
private AsyncTask<?, ?, ?> mTask;<br />
private AsyncTask<?, ?, ?>circuitOffTask;<br />
private ProgressDialog dialog = null;<br />
private ProgressDialog dialog_two = null;<br />
boolean viewLocal = true;<br />
boolean viewPublic = true;<br />
boolean viewPort = true;<br />
boolean viewPin = true;<br />
int buttondDefault = R.drawable.buttondefault;<br />
int doorClosed = R.drawable.doorclosed;<br />
int doorOpen = R.drawable.dooropen;<br />
int option1On = R.drawable.option1on;<br />
int option1Off = R.drawable.option1off;<br />
int arduinoOn = R.drawable.arduinoon;<br />
int arduinoOff = R.drawable.arduinooff;<br />
int option1default = R.drawable.option1default;<br />
int doorDefault = R.drawable.doordefault;<br />
int arduinoDefault = R.drawable.arduinodefault;<br />
int saved_button = R.drawable.buttondefault;<br />
public String data = null;<br />
String publicIPpart1 = "";<br />
String publicIPpart2 = "";<br />
String publicIPpart3 = "";<br />
    HttpResponse responseGet = null;<br />
    HttpResponse responseGet_two = null;<br />
    String tag;<br />
HttpClient client = null;<br />
HttpClient client_two = null;<br />
  @Override<br />
	 public void onCreate(Bundle savedInstanceState) {<br />
		 super.onCreate(savedInstanceState);<br />
		 setContentView(R.layout.main);<br />
		<br />
		 SharedPreferences settings = getSharedPreferences("app_settings", 0);<br />
		 publicIP = settings.getString("public_ip", publicIP);<br />
   localIP = settings.getString("local_ip",localIP);<br />
   useExternal = settings.getBoolean("use_external", useExternal);<br />
   pin = settings.getString("arduino_pin",pin);<br />
   portNumber = settings.getString("port_number", portNumber);<br />
   URL = settings.getString("passed_url", URL);<br />
   publicIPpart1 = settings.getString("publicIP_part1", publicIPpart1);<br />
   publicIPpart3 = settings.getString("publicIP_part3", publicIPpart3);<br />
   pinName = settings.getString("pin_name", pinName);<br />
   networkName = settings.getString("network_name", networkName);<br />
   pinCheck = settings.getInt("pin_check",pinCheck);<br />
   saved_button = settings.getInt("saved_button",saved_button);<br />
  <br />
   findViewById(R.id.button1).setBackgroundResource(saved_button);<br />
		 EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
		 EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
		 EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
		 displayInternal.setText(localIP);<br />
		 displayExternal.setText(publicIPpart1);<br />
		 displayPort.setText(publicIPpart3);<br />
		 EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
		 displayPin.setText(pinName);<br />
		 EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
		 displayNetwork.setText(networkName);<br />
		 if(networkName == "External"){<br />
    URL = publicIP;<br />
   }<br />
   if(networkName == "Local"){<br />
    URL = localIP;<br />
   }<br />
		 final Button button = (Button) findViewById(R.id.button1);<br />
		    button.setOnClickListener(new View.OnClickListener() {<br />
				    public void onClick(View v) {<br />
						 mTask = new httpTask().execute();<br />
				    }<br />
		    });<br />
	 }<br />
//OPTIONS MENU INFLATER - FILLS THE OPTIONS MENU<br />
public boolean onCreateOptionsMenu(Menu menu) {<br />
	 MenuInflater inflater = getMenuInflater();<br />
	 inflater.inflate(R.menu.menu, menu);<br />
	 return true;<br />
}<br />
//OPTIONS MENU<br />
public boolean onOptionsItemSelected(MenuItem item) {<br />
	    EditText displayPin = (EditText) findViewById(R.id.displayPin);<br />
	    EditText displayNetwork = (EditText) findViewById(R.id.displayNetwork);<br />
	    EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
	    EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
	    EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
	 switch (item.getItemId()) {<br />
	   case R.id.save:<br />
	    Toast.makeText(getBaseContext(), "Settings saved.", Toast.LENGTH_SHORT).show();<br />
	    save();<br />
	    break;<br />
	   case R.id.pins:<br />
	    break;<br />
	    case R.id.pin1:<br />
		 pin = "?LED0";<br />
		 pinCheck = 1;<br />
			   pinName = "Option 1";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.option1default);<br />
		 saved_button = R.drawable.option1default;<br />
			   save();<br />
		 break;<br />
	    case R.id.pin2:<br />
		 pin = "?LED1";<br />
		 pinCheck = 2;<br />
			   pinName = "Garage Door";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.doordefault);<br />
			   saved_button = R.drawable.doordefault;<br />
			   save();<br />
		 break;<br />
	    case R.id.pin3:<br />
		 pin = "?LED2";<br />
		 pinCheck = 3;<br />
		 pinName = "Arduino LED";<br />
			   displayPin.setText(pinName);<br />
			   findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinodefault);<br />
			   saved_button = R.drawable.arduinodefault;<br />
			   save();<br />
		 break;<br />
	   case R.id.useExternal:<br />
	    if(useExternal == false){<br />
		 URL = localIP;<br />
		 useExternal = true;<br />
		 networkName = "Local";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
	    }<br />
	    else if(useExternal == true){<br />
		 URL = publicIP;<br />
		 useExternal = false;<br />
		 networkName = "External";<br />
		 displayNetwork.setText(networkName);<br />
		 save();<br />
		 break;<br />
	    }else {<br />
	    break;<br />
	    }<br />
	   case R.id.inputIP:<br />
	    enterIP();<br />
	    break;<br />
	   case R.id.clear:<br />
	    publicIP = "";<br />
	    readURL = "";<br />
	    portNumber = "";<br />
	    readpublicIP = "";<br />
	    readlocalIP = "";<br />
	    readportNumber = "";<br />
	    URL = "";<br />
	    garagestate = "";<br />
	    pin = "";<br />
	    publicIPpart2 = "";<br />
	    networkName = "";<br />
	    pinName = "";<br />
	    localIP = "";<br />
	    publicIPpart1 = "";<br />
	    publicIPpart3 = "";<br />
	    displayNetwork.setText(networkName);<br />
			  displayPin.setText(pinName);<br />
			  displayInternal.setText(localIP);<br />
			  displayExternal.setText(publicIPpart1);<br />
			  displayPort.setText(publicIPpart3);<br />
			  findViewById(R.id.button1).setBackgroundResource(R.drawable.buttondefault);<br />
			  saved_button = R.drawable.buttondefault;<br />
	    save();<br />
	    break;	   <br />
	 }<br />
	 return true;<br />
}<br />
//Http Task<br />
private class httpTask extends AsyncTask<Void, Void, Void> {<br />
    HttpEntity resEntityGet = null;<br />
    GetMethod test = new GetMethod();<br />
	 String returned = "";<br />
  @Override<br />
  protected void onPreExecute() {<br />
   try {<br />
    returned = test.getInternetData();<br />
    if (pinCheck == 1){<br />
	  if(returned.toString().contains("\"Opener 1\">Door Closed")){  //"\"Opener 1\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1on);<br />
	 }<br />
	 if(returned.toString().contains("\"Opener 1\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.option1off);	   <br />
	 }<br />
	 }<br />
	 if (pinCheck == 2){<br />
	 if(returned.toString().contains("\"Opener 2\">Door Closed")){  //"\"Opener 2\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.dooropen);	   <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 2\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.doorclosed);	   <br />
	 }<br />
	 }<br />
	 if (pinCheck == 3){<br />
	 if(returned.toString().contains("\"Opener 3\">Door Closed")){  //"\"Opener 3\">Door Closed"<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinoon);	   <br />
	 }<br />
	 if(returned.toString().contains("\"Opener 3\">Door Open")){<br />
	  findViewById(R.id.button1).setBackgroundResource(R.drawable.arduinooff);	   <br />
	 }<br />
	 }<br />
   } catch (Exception e) {<br />
    e.printStackTrace();<br />
   }<br />
  <br />
   dialog = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
   dialog.setMessage("Working");<br />
   dialog.show();<br />
  }<br />
  @Override<br />
  protected Void doInBackground(Void... params) {<br />
    try {<br />
	    HttpClient client = new DefaultHttpClient();<br />
	    HttpGet get = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
	    responseGet = client.execute(get); <br />
	    resEntityGet = responseGet.getEntity();<br />
	  } catch (Exception e) {<br />
		  e.printStackTrace();<br />
	  }<br />
  return null;<br />
  }<br />
  @Override<br />
  protected void onPostExecute(Void params) {<br />
   if(dialog.isShowing())<br />
    dialog.dismiss();<br />
	    if (resEntityGet != null) { <br />
		 try {<br />
			 Toast.makeText(getBaseContext(), "Done. ", Toast.LENGTH_SHORT).show();<br />
    resEntityGet.consumeContent();<br />
   } catch (IOException e) {<br />
    // TODO Auto-generated catch block<br />
    e.printStackTrace();<br />
   }<br />
	    }<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
	    final Handler handler = new Handler();<br />
	    Timer t = new Timer();<br />
	    t.schedule(new TimerTask() {<br />
			    public void run() {<br />
					    handler.post(new Runnable() {<br />
							    public void run() {<br />
								    circuitOffTask = new circuitOff().execute(); <br />
							    }<br />
					    });<br />
			    }<br />
	    }, 3500);<br />
  }<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
//circuitOFf Task<br />
private class circuitOff extends AsyncTask<Void, Void, Void> {<br />
	 HttpEntity resEntityGet_two = null;<br />
   @Override<br />
   protected void onPreExecute() {<br />
    dialog_two = new ProgressDialog(GarageDoorOpenerActivity.this);<br />
    dialog_two.setMessage("Closing circuit...");<br />
    dialog_two.show();<br />
   }<br />
   @Override<br />
   protected Void doInBackground(Void... params) {<br />
	 try {<br />
		 HttpClient client_two = new DefaultHttpClient();<br />
		 HttpGet get_two = new HttpGet(customURL[0] + URL + customURL[1] + pin);<br />
		 responseGet_two = client_two.execute(get_two); <br />
		 resEntityGet_two = responseGet_two.getEntity();<br />
	   } catch (Exception e) {<br />
		   e.printStackTrace();<br />
	   }<br />
   return null;<br />
   }<br />
   @Override<br />
   protected void onPostExecute(Void params) {<br />
    if(dialog_two.isShowing())<br />
	 dialog_two.dismiss();<br />
		 if (resEntityGet_two != null) { <br />
		  try {<br />
			  Toast.makeText(getBaseContext(), "Circuit closed. ", Toast.LENGTH_SHORT).show();<br />
	 resEntityGet_two.consumeContent();<br />
    } catch (IOException e) {<br />
	 // TODO Auto-generated catch block<br />
	 e.printStackTrace();<br />
    }<br />
		 }<br />
   }<br />
}<br />
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br />
    public class GetMethod {<br />
	 public String getInternetData() throws Exception{<br />
	  BufferedReader in = null;<br />
	  String data = null;<br />
	  HttpClient client = null;<br />
	  URI url = null;<br />
	  HttpResponse response = null;<br />
	  StringBuffer sb = null;<br />
	  String l = "";<br />
	  String nl = "";<br />
	  try{<br />
	   client = new DefaultHttpClient();<br />
	   url = new URI(customURL[0] + URL + customURL[1]); //customURL[0] + URL + customURL[1]<br />
	   HttpGet request = new HttpGet();<br />
	   request.setURI(url);<br />
	   response = client.execute(request);<br />
	   in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));<br />
	   sb = new StringBuffer("");<br />
	   l = "";<br />
	   nl = System.getProperty("line.separator");<br />
	   while ((l = in.readLine()) !=null){<br />
	    sb.append(l + nl);<br />
	   }<br />
	   in.close();<br />
	   data = sb.toString();<br />
	   return data;<br />
	  } finally{<br />
	   if (in !=null){<br />
	    try{<br />
		<br />
		 in.close();<br />
		 return data;<br />
	    } catch (Exception e){<br />
		 e.printStackTrace();<br />
	    }<br />
	   }<br />
	  }<br />
	 }<br />
    }<br />
//Local / Public IP Address Entry<br />
public void enterIP(){<br />
	    Intent j = new Intent(this, enterIP.class);<br />
	    j.putExtra("public_ip", publicIP);<br />
	    j.putExtra("local_ip", localIP);<br />
	    j.putExtra("port_number", portNumber);<br />
  startActivityForResult(j, REQUEST_CODE);<br />
}<br />
//Activity Result<br />
public void onActivityResult(int requestCode, int resultCode, Intent data) {<br />
  if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {<br />
   if (data.hasExtra("public_ip")){<br />
    readpublicIP = data.getExtras().getString("public_ip");<br />
    publicIPpart1 = String.valueOf(readpublicIP);<br />
   }<br />
   if (data.hasExtra("local_ip")){<br />
    readlocalIP = data.getExtras().getString("local_ip");<br />
    localIP = String.valueOf(readlocalIP);<br />
   }<br />
   if (data.hasExtra("port_number")){<br />
    readportNumber = data.getExtras().getString("port_number");<br />
    publicIPpart3 = String.valueOf(readportNumber);<br />
   }<br />
    publicIPpart2 = ":";<br />
    publicIP = (publicIPpart1 + publicIPpart2 + publicIPpart3);<br />
   }<br />
  EditText displayInternal = (EditText) findViewById(R.id.displayInternal);<br />
	    EditText displayExternal = (EditText) findViewById(R.id.displayExternal);<br />
	    EditText displayPort = (EditText) findViewById(R.id.displayPort);<br />
	    displayInternal.setText(localIP);<br />
	    displayExternal.setText(publicIPpart1);<br />
	    displayPort.setText(publicIPpart3);<br />
  save();<br />
  }<br />
//SAVE FUNCTION<br />
private void save() {<br />
  SharedPreferences settings = getSharedPreferences("app_settings", 0); <br />
  SharedPreferences.Editor prefEditor = settings.edit();<br />
  prefEditor.putString("publicIP_part1", publicIPpart1);<br />
  prefEditor.putString("publicIP_part3", publicIPpart3);<br />
  prefEditor.putString("public_ip", publicIP);<br />
  prefEditor.putString("local_ip",localIP);<br />
  prefEditor.putBoolean("use_external", useExternal);<br />
  prefEditor.putString("arduino_pin",pin);<br />
  prefEditor.putString("port_number", portNumber);<br />
  prefEditor.putString("passed_url", URL);<br />
  prefEditor.putString("pin_name", pinName);<br />
  prefEditor.putString("network_name", networkName);<br />
  prefEditor.putInt("pin_check",pinCheck);<br />
  prefEditor.putInt("saved_button",saved_button);<br />
  prefEditor.commit();   <br />
}<br />
//On Pause<br />
@Override<br />
protected void onPause() {<br />
  super.onPause();<br />
  if(dialog != null && dialog.isShowing()){<br />
   dialog.dismiss();<br />
  }<br />
  if(dialog_two != null && dialog_two.isShowing()){<br />
   dialog_two.dismiss();<br />
  }<br />
  if(mTask != null && mTask.getStatus() == AsyncTask.Status.RUNNING){<br />
   mTask.cancel(true);<br />
  }<br />
  if(circuitOffTask != null && circuitOffTask.getStatus() == AsyncTask.Status.RUNNING){<br />
   circuitOffTask.cancel(true);<br />
  }<br />
 <br />
}<br />
}<br />
```


----------



## JBirdVegas (Jun 11, 2011)

YAY!!! I'm glad it's working! let us know if you find any more problems


----------



## dl_evans (Dec 13, 2011)

Will do. I'm working on the Arduino side of things now... since the circuit is closed the Arduino thinks the door is closed and posts "door closed" my app looks for that and changes the button's background to reflect this... even if the door is open. At least the Android side of things is done.


----------

