summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/layout/call_log_list_item_actions.xml18
-rw-r--r--res/values/colors.xml6
-rw-r--r--res/values/strings.xml11
-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
6 files changed, 3 insertions, 117 deletions
diff --git a/res/layout/call_log_list_item_actions.xml b/res/layout/call_log_list_item_actions.xml
index d4e98d0c0..9ee9a0fa5 100644
--- a/res/layout/call_log_list_item_actions.xml
+++ b/res/layout/call_log_list_item_actions.xml
@@ -57,22 +57,6 @@
android:textColor="@color/call_log_action_text"
android:textSize="@dimen/call_log_secondary_text_size"
android:nextFocusLeft="@+id/call_back_action"
- android:nextFocusRight="@+id/delete_action"
- android:focusable="true"
- android:singleLine="true"/>
- <TextView
- android:id="@+id/delete_action"
- android:background="@drawable/action_button_background"
- android:fontFamily="sans-serif-medium"
- android:gravity="center"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/call_log_action_horizontal_padding"
- android:paddingRight="@dimen/call_log_action_horizontal_padding"
- android:text="@string/call_log_action_delete"
- android:textColor="@color/call_log_action_delete_text"
- android:textSize="@dimen/call_log_secondary_text_size"
- android:nextFocusLeft="@+id/voicemail_action"
android:nextFocusRight="@+id/details_action"
android:focusable="true"
android:singleLine="true"/>
@@ -88,7 +72,7 @@
android:text="@string/call_log_action_details"
android:textColor="?attr/call_log_secondary_text_color"
android:textSize="@dimen/call_log_secondary_text_size"
- android:nextFocusLeft="@+id/delete_action"
+ android:nextFocusLeft="@+id/voicemail_action"
android:nextFocusRight="@+id/primary_action_view"
android:focusable="true"
android:singleLine="true"/>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 7d5ef717e..1e2958f59 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -95,12 +95,6 @@
as call back, play voicemail, etc. -->
<color name="call_log_action_text">#1dc7db</color>
- <!-- Color of the "delete" action in expanded call log entries. -->
- <color name="call_log_action_delete_text">#ff4f4f</color>
-
- <!-- Color of action text for expanded call log entries which is disabled. -->
- <color name="call_log_disabled_text">#b3b3b3</color>
-
<!-- Color for missed call icons. -->
<color name="missed_call">#ff2e58</color>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0f66131dc..db41d310d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -662,11 +662,6 @@
[CHAR LIMIT=30] -->
<string name="call_log_action_call_back">CALL BACK</string>
- <!-- Button text for the "DELETE" button displayed underneath an entry in the call log.
- Tapping causes the call log entry in question to be removed from the call log.
- [CHAR LIMIT=30] -->
- <string name="call_log_action_delete">DELETE</string>
-
<!-- Button text for the "LISTEN" button displayed underneath an entry in the call log.
Tapping navigates the user to the call details screen where the user can listen to the
voicemail represented by the call log entry.
@@ -707,12 +702,6 @@
[CHAR LIMIT=NONE] -->
<string name="description_voicemail_action">Listen to voicemail from <xliff:g id="nameOrNumber" example="John Smith">%1$s</xliff:g></string>
- <!-- String describing the "delete" action for an entry in the call log. The delete
- action triggers the removal of the current call log entry from the call log.
- Note: AccessibilityServices uses this attribute to announce the purpose of the button.
- [CHAR LIMIT=NONE] -->
- <string name="description_delete_action">Delete call log entry for <xliff:g id="nameOrNumber" example="John Smith">%1$s</xliff:g></string>
-
<!-- String describing the "details" action for an entry in the call log. The details action
displays the call details screen for an entry in the call log. This shows the calls to
and from the specified number associated with the call log entry.
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);