summaryrefslogtreecommitdiffstats
path: root/src/com/android/dialer
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-05-21 12:10:40 -0700
committerTyler Gunn <tgunn@google.com>2014-05-21 12:10:40 -0700
commit9138834059797469f73390c9faa71ce98b4434c1 (patch)
tree27245e4cd1765996f1e9e93503aaad78d0c0a117 /src/com/android/dialer
parent8ef8020b8b792026a8dd15e029055f7d5e2d48f6 (diff)
downloadandroid_packages_apps_Dialer-9138834059797469f73390c9faa71ce98b4434c1.tar.gz
android_packages_apps_Dialer-9138834059797469f73390c9faa71ce98b4434c1.tar.bz2
android_packages_apps_Dialer-9138834059797469f73390c9faa71ce98b4434c1.zip
Removing the delete button from call log entries.
Bug: 13962594 Change-Id: I59ee9badc239f4ce3a81320cb0e801af973707a5
Diffstat (limited to 'src/com/android/dialer')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java79
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemHelper.java3
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemViews.java3
3 files changed, 2 insertions, 83 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 706c4ab1c..66c4d03f3 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -272,23 +272,6 @@ public class CallLogAdapter extends GroupingListAdapter
};
/**
- * Click listener for the delete from call log button. Removes the current call log
- * entry and its associated calls from the call log.
- */
- private final View.OnClickListener mDeleteListener = new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- // Retrieve the views from the call log view.
- final CallLogListItemViews views =
- (CallLogListItemViews)
- ((View)v.getParent().getParent().getParent().getParent()).getTag();
-
- deleteCalls(views.callIds);
- notifyDataSetChanged();
- }
- };
-
- /**
* The onClickListener used to expand or collapse the action buttons section for a call log
* entry.
*/
@@ -866,7 +849,7 @@ public class CallLogAdapter extends GroupingListAdapter
}
/**
- * Expands or collapses the view containing the CALLBACK, VOICEMAIL and DELETE action buttons.
+ * Expands or collapses the view containing the CALLBACK, VOICEMAIL and DETAILS action buttons.
*
* @param callLogItem The call log entry parent view.
* @param isExpanded The new expansion state of the view.
@@ -892,7 +875,6 @@ public class CallLogAdapter extends GroupingListAdapter
// block and block further attempts to set focus.
boolean focused = views.callBackButtonView.requestAccessibilityFocus() ||
views.voicemailButtonView.requestAccessibilityFocus() ||
- views.deleteButtonView.requestAccessibilityFocus() ||
views.detailsButtonView.requestAccessibilityFocus();
} else {
// When recycling a view, it is possible the actionsView ViewStub was previously
@@ -940,10 +922,6 @@ public class CallLogAdapter extends GroupingListAdapter
R.id.voicemail_action);
}
- if (views.deleteButtonView == null) {
- views.deleteButtonView = (TextView)views.actionsView.findViewById(R.id.delete_action);
- }
-
if (views.detailsButtonView == null) {
views.detailsButtonView = (TextView)views.actionsView.findViewById(R.id.details_action);
}
@@ -952,7 +930,7 @@ public class CallLogAdapter extends GroupingListAdapter
}
/***
- * Binds click handlers and intents to the voicemail, delete and callback action buttons.
+ * Binds click handlers and intents to the voicemail, details and callback action buttons.
*
* @param views The call log item views.
*/
@@ -991,8 +969,6 @@ public class CallLogAdapter extends GroupingListAdapter
}
- views.deleteButtonView.setOnClickListener(this.mDeleteListener);
-
mCallLogViewsHelper.setActionContentDescriptions(views);
}
@@ -1360,55 +1336,4 @@ public class CallLogAdapter extends GroupingListAdapter
return mContext.getResources().getString(R.string.call_log_header_other);
}
}
-
- /**
- * Retrieves an instance of the asynchronous task executor, creating one if required.
- * @return The {@link com.android.dialer.util.AsyncTaskExecutor}
- */
- private AsyncTaskExecutor getTaskExecutor() {
- if (mAsyncTaskExecutor == null) {
- mAsyncTaskExecutor = AsyncTaskExecutors.createAsyncTaskExecutor();
- }
- return mAsyncTaskExecutor;
- }
-
- /**
- * Deletes the calls specified in the callIds array, asynchronously.
- *
- * @param callIds Ids of calls to be deleted.
- */
- private void deleteCalls(long[] callIds) {
- if (callIds == null) {
- return;
- }
-
- // Build comma separated list of ids to delete.
- final StringBuilder callIdString = new StringBuilder();
- for (long callId : callIds) {
- if (callIdString.length() != 0) {
- callIdString.append(",");
- }
- callIdString.append(callId);
- }
-
- // Perform removal of call log entries asynchronously.
- getTaskExecutor().submit(Tasks.REMOVE_CALL_LOG_ENTRIES,
- new AsyncTask<Void, Void, Void>() {
- @Override
- public Void doInBackground(Void... params) {
- // Issue delete.
- mContext.getContentResolver().delete(Calls.CONTENT_URI_WITH_VOICEMAIL,
- Calls._ID + " IN (" + callIdString + ")", null);
- return null;
- }
-
- @Override
- public void onPostExecute(Void result) {
- // Somewhere went wrong: we're going to bail out and show error to users.
- Toast.makeText(mContext, R.string.toast_entry_removed,
- Toast.LENGTH_SHORT).show();
- }
- }
- );
- }
}
diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java
index baeb38241..cb7c7cda3 100644
--- a/src/com/android/dialer/calllog/CallLogListItemHelper.java
+++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java
@@ -80,9 +80,6 @@ import com.android.dialer.R;
views.voicemailButtonView.setContentDescription(
mResources.getString(R.string.description_voicemail_action, views.nameOrNumber));
- views.deleteButtonView.setContentDescription(
- mResources.getString(R.string.description_delete_action, views.nameOrNumber));
-
views.detailsButtonView.setContentDescription(
mResources.getString(R.string.description_details_action, views.nameOrNumber));
}
diff --git a/src/com/android/dialer/calllog/CallLogListItemViews.java b/src/com/android/dialer/calllog/CallLogListItemViews.java
index 474b47895..762b8ff35 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViews.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViews.java
@@ -44,8 +44,6 @@ public final class CallLogListItemViews {
public View actionsView;
/** The "call back" action button - assigned only when the action section is expanded. */
public TextView callBackButtonView;
- /** The "delete" action button - assigned only when the action section is expanded. */
- public TextView deleteButtonView;
/** The "voicemail" action button - assigned only when the action section is expanded. */
public TextView voicemailButtonView;
/** The "details" action button - assigned only when the action section is expanded. */
@@ -122,7 +120,6 @@ public final class CallLogListItemViews {
new View(context),
new TextView(context));
views.callBackButtonView = new TextView(context);
- views.deleteButtonView = new TextView(context);
views.voicemailButtonView = new TextView(context);
views.detailsButtonView = new TextView(context);
views.actionsView = new View(context);