summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_results_add_contact.pngbin1082 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_results_add_contact.pngbin890 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/ic_results_add_contact.pngbin1509 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/ic_results_add_contact.pngbin1848 -> 0 bytes
-rw-r--r--res/drawable/ic_search_add_contact.xml20
-rw-r--r--res/drawable/search_shortcut_background.xml23
-rw-r--r--res/layout/call_log_fragment.xml5
-rw-r--r--res/layout/call_log_list_item.xml3
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/dimens.xml3
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java6
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java46
12 files changed, 37 insertions, 72 deletions
diff --git a/res/drawable-hdpi/ic_results_add_contact.png b/res/drawable-hdpi/ic_results_add_contact.png
deleted file mode 100644
index 472b28104..000000000
--- a/res/drawable-hdpi/ic_results_add_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_results_add_contact.png b/res/drawable-mdpi/ic_results_add_contact.png
deleted file mode 100644
index d4d4759dd..000000000
--- a/res/drawable-mdpi/ic_results_add_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_results_add_contact.png b/res/drawable-xhdpi/ic_results_add_contact.png
deleted file mode 100644
index 6be67e874..000000000
--- a/res/drawable-xhdpi/ic_results_add_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_results_add_contact.png b/res/drawable-xxhdpi/ic_results_add_contact.png
deleted file mode 100644
index 3ba9093a7..000000000
--- a/res/drawable-xxhdpi/ic_results_add_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_search_add_contact.xml b/res/drawable/ic_search_add_contact.xml
deleted file mode 100644
index 2ec75b7f8..000000000
--- a/res/drawable/ic_search_add_contact.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_results_add_contact"
- android:tint="@color/search_shortcut_icon_color" />
diff --git a/res/drawable/search_shortcut_background.xml b/res/drawable/search_shortcut_background.xml
deleted file mode 100644
index 52b5e3f8a..000000000
--- a/res/drawable/search_shortcut_background.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval" >
- <size
- android:height="@dimen/search_shortcut_radius"
- android:width="@dimen/search_shortcut_radius" />
- <solid android:color="@color/search_shortcut_background_color" />
-</shape> \ No newline at end of file
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index bb50730e8..74c630959 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -61,8 +61,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- clipChildren=true is required to ensure shadows on elevated call log entries are not
- clipped.-->
+ <!-- clipChildren=false is required to ensure shadows drawn
+ within list items aren't clipped by the list item bounds. -->
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -71,6 +71,7 @@
android:background="@color/background_dialer_list_items"
android:divider="@null"
android:nestedScrollingEnabled="true"
+ android:clipChildren="false"
/>
<include
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 0f64e8b0a..193859273 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -19,8 +19,7 @@
android:id="@+id/call_log_list_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/background_dialer_list_items" >
+ android:orientation="vertical">
<!-- Day group heading. Used to show a "today", "yesterday", "last week" or "other" heading
above a group of call log entries. -->
diff --git a/res/values/colors.xml b/res/values/colors.xml
index cbf737cb2..0b75de5d0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -52,9 +52,6 @@
<!-- Background color of dialer list items (contacts, call log entries) -->
<color name="background_dialer_list_items">@color/background_dialer_light</color>
- <color name="search_shortcut_background_color">#b6b6b6</color>
- <color name="search_shortcut_icon_color">#f8f8f8</color>
-
<!-- Color of the 1dp divider that separates favorites -->
<color name="favorite_contacts_separator_color">#d0d0d0</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f806c8268..32cb852d8 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -126,9 +126,6 @@
<dimen name="call_log_day_group_padding_top">15dp</dimen>
<dimen name="call_log_day_group_padding_bottom">9dp</dimen>
- <!-- Size of icon for contacts number shortcuts -->
- <dimen name="search_shortcut_radius">40dp</dimen>
-
<!-- Length of dialpad's shadows in dialer. -->
<dimen name="shadow_length">10dp</dimen>
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 16be30871..db67513da 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -894,7 +894,8 @@ public class CallLogAdapter extends GroupingListAdapter
views.actionsView.setVisibility(View.VISIBLE);
views.actionsView.setAlpha(1.0f);
views.callLogEntryView.setBackgroundColor(mExpandedBackgroundColor);
- callLogItem.setTranslationZ(mExpandedTranslationZ);
+ views.callLogEntryView.setTranslationZ(mExpandedTranslationZ);
+ callLogItem.setTranslationZ(mExpandedTranslationZ); // WAR
// Attempt to give accessibility focus to one of the action buttons.
// This ensures that a user realizes the expansion occurred.
@@ -913,7 +914,8 @@ public class CallLogAdapter extends GroupingListAdapter
}
views.callLogEntryView.setBackgroundColor(mCallLogBackgroundColor);
- callLogItem.setTranslationZ(0);
+ views.callLogEntryView.setTranslationZ(0);
+ callLogItem.setTranslationZ(0); // WAR
}
}
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 852370566..52375ed6c 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -71,6 +71,10 @@ public class CallLogFragment extends ListFragment
CallLogAdapter.CallItemExpandedListener {
private static final String TAG = "CallLogFragment";
+ private static final String REPORT_DIALOG_TAG = "report_dialog";
+ private String mReportDialogNumber;
+ private boolean mIsReportDialogShowing;
+
/**
* ID of the empty loader to defer other fragments.
*/
@@ -80,6 +84,8 @@ public class CallLogFragment extends ListFragment
private static final String KEY_LOG_LIMIT = "log_limit";
private static final String KEY_DATE_LIMIT = "date_limit";
private static final String KEY_SHOW_FOOTER = "show_footer";
+ private static final String KEY_IS_REPORT_DIALOG_SHOWING = "is_report_dialog_showing";
+ private static final String KEY_REPORT_DIALOG_NUMBER = "report_dialog_number";
private CallLogAdapter mAdapter;
private CallLogQueryHandler mCallLogQueryHandler;
@@ -184,6 +190,9 @@ public class CallLogFragment extends ListFragment
mLogLimit = state.getInt(KEY_LOG_LIMIT, mLogLimit);
mDateLimit = state.getLong(KEY_DATE_LIMIT, mDateLimit);
mHasFooterView = state.getBoolean(KEY_SHOW_FOOTER, mHasFooterView);
+ mIsReportDialogShowing = state.getBoolean(KEY_IS_REPORT_DIALOG_SHOWING,
+ mIsReportDialogShowing);
+ mReportDialogNumber = state.getString(KEY_REPORT_DIALOG_NUMBER, mReportDialogNumber);
}
String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
@@ -210,6 +219,14 @@ public class CallLogFragment extends ListFragment
mFadeOutDuration = getResources().getInteger(R.integer.call_log_actions_fade_out_duration);
mExpandCollapseDuration = getResources().getInteger(
R.integer.call_log_expand_collapse_duration);
+
+ if (mIsReportDialogShowing) {
+ DialogFragment df = ObjectFactory.getReportDialogFragment(mReportDialogNumber);
+ if (df != null) {
+ df.setTargetFragment(this, 0);
+ df.show(getActivity().getFragmentManager(), REPORT_DIALOG_TAG);
+ }
+ }
}
/** Called by the CallLogQueryHandler when the list of calls has been fetched or updated. */
@@ -396,6 +413,8 @@ public class CallLogFragment extends ListFragment
outState.putInt(KEY_LOG_LIMIT, mLogLimit);
outState.putLong(KEY_DATE_LIMIT, mDateLimit);
outState.putBoolean(KEY_SHOW_FOOTER, mHasFooterView);
+ outState.putBoolean(KEY_IS_REPORT_DIALOG_SHOWING, mIsReportDialogShowing);
+ outState.putString(KEY_REPORT_DIALOG_NUMBER, mReportDialogNumber);
}
@Override
@@ -556,21 +575,6 @@ public class CallLogFragment extends ListFragment
viewHolder.actionsView.setVisibility(View.VISIBLE);
}
- // If the day group header is shown, subtract the header from the outline of the
- // view. The outline is used for generating the shadow of the view, but we only want
- // a shadow on the call log list item and not the header. This is a slight hack, but
- // the hierarchy of the call log list items makes it hard to achieve the desired
- // shadow behavior otherwise.
- if (viewHolder.dayGroupHeader.isShown()) {
- Outline outline = new Outline();
- outline.setRect(
- 0 /* left */,
- viewHolder.dayGroupHeader.getHeight() /* top */,
- view.getWidth() /* right */,
- view.getHeight() /* bottom */);
- view.setOutline(outline);
- }
-
// Set up the fade effect for the action buttons.
if (isExpand) {
// Start the fade in after the expansion has partly completed, otherwise it
@@ -601,7 +605,9 @@ public class CallLogFragment extends ListFragment
// For each value from 0 to 1, animate the various parts of the layout.
view.getLayoutParams().height = (int) (value * distance + baseHeight);
- view.setTranslationZ(mExpandedItemTranslationZ * value);
+ float z = mExpandedItemTranslationZ * value;
+ viewHolder.callLogEntryView.setTranslationZ(z);
+ view.setTranslationZ(z); // WAR
view.requestLayout();
}
});
@@ -668,6 +674,10 @@ public class CallLogFragment extends ListFragment
}
public void onBadDataReported(String number) {
+ mIsReportDialogShowing = false;
+ if (number == null) {
+ return;
+ }
mAdapter.onBadDataReported(number);
mAdapter.notifyDataSetChanged();
}
@@ -676,7 +686,9 @@ public class CallLogFragment extends ListFragment
DialogFragment df = ObjectFactory.getReportDialogFragment(number);
if (df != null) {
df.setTargetFragment(this, 0);
- df.show(getActivity().getFragmentManager(), "report_dialog");
+ df.show(getActivity().getFragmentManager(), REPORT_DIALOG_TAG);
+ mReportDialogNumber = number;
+ mIsReportDialogShowing = true;
}
}
}