android call log
<p>With the following codes, the call log displayed is empty.Why is that soo??</p>

<pre><code>package fypj.c;

import java.security.Provider;
import java.util.ArrayList;


import android.app.Activity;
import android.app.ListActivity;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.CallLog;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;

public class c extends ListActivity {
    private SimpleCursorAdapter myAdapter; 

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);      




        String[] column = new String[] {android.provider.CallLog.Calls.CACHED_NAME, android.provider.CallLog.Calls.DURATION, android.provider.CallLog.Calls.TYPE};         
        int[] names = new int[] {R.id.CLName, R.id.CLDuration, R.id.CLType};         
        myAdapter = new SimpleCursorAdapter(this,android.R.layout.simple_list_item_2, cursor, column, names);         
        setListAdapter(myAdapter);  
    }
}



&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    &gt;
    &lt;ListView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:id="@android:id/list"
    /&gt;
    &lt;TextView  
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 

    android:id="@+id/CLName"
    /&gt;
    &lt;TextView  
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 

    android:id="@+id/CLType"
    /&gt;
    &lt;TextView  
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 

    android:id="@+id/CLDuration"
    /&gt;
&lt;/LinearLayout&gt;
</code></pre>
