Loading res/drawable-finger/ic_dial_action_sms.png +1 B (908 B) Loading image diff... src/com/android/contacts/RecentCallsListActivity.java +26 −4 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ import android.widget.TextView; import android.app.Dialog; import android.widget.Button; import android.view.View.OnClickListener; import android.app.AlertDialog; import android.content.DialogInterface; import com.android.internal.telephony.CallerInfo; import com.android.internal.telephony.ITelephony; Loading Loading @@ -790,10 +792,7 @@ public class RecentCallsListActivity extends ListActivity public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_ITEM_DELETE_ALL: { getContentResolver().delete(Calls.CONTENT_URI, null, null); //TODO The change notification should do this automatically, but it isn't working // right now. Remove this when the change notification is working properly. startQuery(); clearCallLog(); return true; } case MENU_ITEM_TOTAL_CALL_LOG: { Loading Loading @@ -958,6 +957,29 @@ public class RecentCallsListActivity extends ListActivity startActivity(intent); } //Wysie_Soh: Dialog to confirm if user wants to clear call log private void clearCallLog() { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Clear call log"); alert.setMessage("Are you sure you want to clear all call records?"); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { getContentResolver().delete(Calls.CONTENT_URI, null, null); //TODO The change notification should do this automatically, but it isn't working // right now. Remove this when the change notification is working properly. startQuery(); } }); alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Canceled. }}); alert.show(); } private void showTotalCallLog() { final Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.total_call_log); Loading Loading
src/com/android/contacts/RecentCallsListActivity.java +26 −4 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ import android.widget.TextView; import android.app.Dialog; import android.widget.Button; import android.view.View.OnClickListener; import android.app.AlertDialog; import android.content.DialogInterface; import com.android.internal.telephony.CallerInfo; import com.android.internal.telephony.ITelephony; Loading Loading @@ -790,10 +792,7 @@ public class RecentCallsListActivity extends ListActivity public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_ITEM_DELETE_ALL: { getContentResolver().delete(Calls.CONTENT_URI, null, null); //TODO The change notification should do this automatically, but it isn't working // right now. Remove this when the change notification is working properly. startQuery(); clearCallLog(); return true; } case MENU_ITEM_TOTAL_CALL_LOG: { Loading Loading @@ -958,6 +957,29 @@ public class RecentCallsListActivity extends ListActivity startActivity(intent); } //Wysie_Soh: Dialog to confirm if user wants to clear call log private void clearCallLog() { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Clear call log"); alert.setMessage("Are you sure you want to clear all call records?"); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { getContentResolver().delete(Calls.CONTENT_URI, null, null); //TODO The change notification should do this automatically, but it isn't working // right now. Remove this when the change notification is working properly. startQuery(); } }); alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Canceled. }}); alert.show(); } private void showTotalCallLog() { final Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.total_call_log); Loading