I have a similar issue with my MacBook Pro and an old Pioneer amp. Whenever I plugin the laptop into a power socket the amp (plugged into the same wall socket) starts to buzz and make popping sounds.
This is called a ground loop and to get rid of this loop needs to be "broken".
I have found two ways to do this:


Connect an external display to the MacBook Pro. It gets rid of the hum.
Get a ground loop isolator and connect your headphones through it.
Ensure your Mac power adapter connects with three conductors to a properly grounded outlet and check for a stuck pin in the MagSafe connector in case the break in grounding is there.


Noise canceling headphones make strange sound when I touch my MacBook Pro
Can anyone please tel me what can be the problem?

This is my code

public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.book_list);
        lst = (ListView) findViewById(R.id.listView1);
    new Thread(new Runnable() {
            public void run() {
                data = fetchData();                                 
                runOnUiThread(new Runnable() {                       
                    @Override
                    public void run() {
                        ArrayList&lt;String&gt; users = parseJSON(data);                                                
                    }
                });   
            }
        }).start();

final SimpleAdapter adapter =
            new SimpleAdapter(this, mylistData, R.layout.rowlayout,
                    row , new int[] {R.id.label,R.id.label1});
            lst.setAdapter(adapter);


ERROR LOG

05-24 11:08:32.218: E/AndroidRuntime(19121): FATAL EXCEPTION: Thread-12
05-24 11:08:32.218: E/AndroidRuntime(19121): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.view.ViewRoot.checkThread(ViewRoot.java:3041)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.view.ViewRoot.invalidateChild(ViewRoot.java:647)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:673)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.view.ViewGroup.invalidateChild(ViewGroup.java:2511)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.view.View.invalidate(View.java:5255)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView.invalidateCursor(TextView.java:3774)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView.spanChange(TextView.java:6680)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:6805)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:906)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:611)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:514)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.Selection.setSelection(Selection.java:74)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.Selection.setSelection(Selection.java:85)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.text.method.ArrowKeyMovementMethod.initialize(ArrowKeyMovementMethod.java:280)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView.setText(TextView.java:2798)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView.setText(TextView.java:2671)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.EditText.setText(EditText.java:178)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at android.widget.TextView.setText(TextView.java:2646)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at com.example.book.ManageAuthor.parseJSON(ManageAuthor.java:198)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at com.example.book.ManageAuthor$1.run(ManageAuthor.java:77)
05-24 11:08:32.218: E/AndroidRuntime(19121):    at java.lang.Thread.run(Thread.java:1019)
