Merge "Correcting dialpad animations in landscape (3/3)." into lmp-dev
diff --git a/res/drawable-hdpi/ic_delete_wht_24dp.png b/res/drawable-hdpi/ic_delete_wht_24dp.png
new file mode 100644
index 0000000..9fb43b0
--- /dev/null
+++ b/res/drawable-hdpi/ic_delete_wht_24dp.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_handle.png b/res/drawable-hdpi/ic_handle.png
new file mode 100644
index 0000000..34310aa
--- /dev/null
+++ b/res/drawable-hdpi/ic_handle.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_delete_dk.png b/res/drawable-hdpi/ic_menu_delete_dk.png
deleted file mode 100644
index 2960449..0000000
--- a/res/drawable-hdpi/ic_menu_delete_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_delete_wht_24dp.png b/res/drawable-mdpi/ic_delete_wht_24dp.png
new file mode 100644
index 0000000..c903fd1
--- /dev/null
+++ b/res/drawable-mdpi/ic_delete_wht_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_handle.png b/res/drawable-mdpi/ic_handle.png
new file mode 100644
index 0000000..81a67ba
--- /dev/null
+++ b/res/drawable-mdpi/ic_handle.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_delete_dk.png b/res/drawable-mdpi/ic_menu_delete_dk.png
deleted file mode 100644
index 9db8403..0000000
--- a/res/drawable-mdpi/ic_menu_delete_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_delete_wht_24dp.png b/res/drawable-xhdpi/ic_delete_wht_24dp.png
new file mode 100644
index 0000000..be1ee4d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_delete_wht_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_handle.png b/res/drawable-xhdpi/ic_handle.png
new file mode 100644
index 0000000..0ad8392
--- /dev/null
+++ b/res/drawable-xhdpi/ic_handle.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_delete_dk.png b/res/drawable-xhdpi/ic_menu_delete_dk.png
deleted file mode 100644
index 61b762f..0000000
--- a/res/drawable-xhdpi/ic_menu_delete_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_delete_wht_24dp.png b/res/drawable-xxhdpi/ic_delete_wht_24dp.png
new file mode 100644
index 0000000..eb63792
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_delete_wht_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_handle.png b/res/drawable-xxhdpi/ic_handle.png
new file mode 100644
index 0000000..d07a1d0
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_handle.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_menu_delete_dk.png b/res/drawable-xxhdpi/ic_menu_delete_dk.png
deleted file mode 100644
index 88445fc..0000000
--- a/res/drawable-xxhdpi/ic_menu_delete_dk.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_calllog_delete.xml b/res/drawable/ic_calllog_delete.xml
index e81da9a..2f9f0ae 100644
--- a/res/drawable/ic_calllog_delete.xml
+++ b/res/drawable/ic_calllog_delete.xml
@@ -15,6 +15,6 @@
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_delete_dk"
+ android:src="@drawable/ic_delete_wht_24dp"
android:gravity="center"
android:tint="@color/actionbar_icon_color" />
diff --git a/res/drawable/ic_voicemail_seek_handle.xml b/res/drawable/ic_voicemail_seek_handle.xml
new file mode 100644
index 0000000..a6f02be
--- /dev/null
+++ b/res/drawable/ic_voicemail_seek_handle.xml
@@ -0,0 +1,21 @@
+<?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_handle"
+ android:autoMirrored="true"
+ android:tint="@color/actionbar_background_color" >
+</bitmap>
\ No newline at end of file
diff --git a/res/drawable/seek_bar_thumb.xml b/res/drawable/seek_bar_thumb.xml
deleted file mode 100644
index e301d1f..0000000
--- a/res/drawable/seek_bar_thumb.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="true">
- <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- First item is the outer transparent sphere. -->
- <item>
- <shape
- android:shape="oval"
- >
- <size
- android:width="16dip"
- android:height="16dip"
- />
- <solid
- android:color="#44cecece"
- />
- </shape>
- </item>
- <!-- Second item is the inner almost-opaque sphere.
- Seems to derive its size from the outer, a size element doesn't change anything.
- Looks like using left, right, top and bottom on the item is best to fix inner sphere. -->
- <item
- android:left="3dip"
- android:right="3dip"
- android:top="3dip"
- android:bottom="3dip"
- >
- <shape
- android:shape="oval"
- >
- <solid
- android:color="@color/background_dialer_list_items"
- />
- </shape>
- </item>
- </layer-list>
- </item>
-
- <!-- Do not show the thumb when disabled -->
- <item android:drawable="@android:color/transparent" />
-</selector>
\ No newline at end of file
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index b1daab8..f274a9d 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -56,6 +56,7 @@
android:paddingBottom="@dimen/contact_tile_text_bottom_padding"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -96,6 +97,7 @@
android:ellipsize="marquee"
android:textAlignment="viewStart" />
</LinearLayout>
+
<View
android:id="@+id/contact_tile_push_state"
android:layout_width="match_parent"
@@ -107,7 +109,7 @@
<ImageButton
android:id="@id/contact_tile_secondary_button"
android:src="@drawable/overflow_thumbnail"
- android:background="?android:attr/selectableItemBackground"
+ android:background="@drawable/item_background_material_dark"
android:layout_height="@dimen/contact_tile_info_button_height_and_width"
android:layout_width="@dimen/contact_tile_info_button_height_and_width"
android:paddingLeft="4dp"
diff --git a/res/layout/playback_layout.xml b/res/layout/playback_layout.xml
index 500ed96..54d0c59 100644
--- a/res/layout/playback_layout.xml
+++ b/res/layout/playback_layout.xml
@@ -64,7 +64,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressDrawable="@drawable/seekbar_drawable"
- android:thumb="@drawable/seek_bar_thumb"
+ android:thumb="@drawable/ic_voicemail_seek_handle"
android:thumbOffset="8dip"
android:progress="0"
android:paddingStart="8dip"
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java
index a432daf..be5ee72 100644
--- a/src/com/android/dialer/PhoneCallDetailsHelper.java
+++ b/src/com/android/dialer/PhoneCallDetailsHelper.java
@@ -85,7 +85,8 @@
// Show the video icon if the call had video enabled.
views.callTypeIcons.setShowVideo(
- (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO);
+ (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
+ && DialerUtils.isVideoEnabled());
views.callTypeIcons.requestLayout();
views.callTypeIcons.setVisibility(View.VISIBLE);
diff --git a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
index 105462f..7a8b922 100644
--- a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
+++ b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
@@ -122,7 +122,8 @@
TextView durationView = (TextView) result.findViewById(R.id.duration);
int callType = details.callTypes[0];
- boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO;
+ boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
+ && DialerUtils.isVideoEnabled();
callTypeIconView.clear();
callTypeIconView.add(callType);
diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java
index b2c1e2d..78a0105 100644
--- a/src/com/android/dialer/calllog/CallLogListItemHelper.java
+++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java
@@ -23,6 +23,7 @@
import com.android.dialer.PhoneCallDetails;
import com.android.dialer.PhoneCallDetailsHelper;
import com.android.dialer.R;
+import com.android.dialer.util.DialerUtils;
/**
* Helper class to fill in the views of a call log entry.
@@ -153,7 +154,8 @@
}
// If call had video capabilities, add the "Video Call" string.
- if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) {
+ if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO &&
+ DialerUtils.isVideoEnabled()) {
callDescription.append(mResources.getString(R.string.description_video_call));
}
diff --git a/src/com/android/dialer/list/RegularSearchListAdapter.java b/src/com/android/dialer/list/RegularSearchListAdapter.java
index 2bceaf9..8e4382c 100644
--- a/src/com/android/dialer/list/RegularSearchListAdapter.java
+++ b/src/com/android/dialer/list/RegularSearchListAdapter.java
@@ -26,6 +26,7 @@
import com.android.dialer.calllog.ContactInfo;
import com.android.dialer.service.CachedNumberLookupService;
import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo;
+import com.android.dialer.util.DialerUtils;
/**
* List adapter to display regular search results.
@@ -73,9 +74,8 @@
// a dialable number, then clicking add to contact should add it as a number.
// Otherwise, it should add it to a new contact as a name.
setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
- // TODO: Write utility method to check subscriptions and settings, and use it to determine
- // whether to enable or disable video call shortcut.
- setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts);
+ setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
+ showNumberShortcuts && DialerUtils.isVideoEnabled());
super.setQueryString(queryString);
}
}
diff --git a/src/com/android/dialer/list/SmartDialNumberListAdapter.java b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
index d9aa846..231611d 100644
--- a/src/com/android/dialer/list/SmartDialNumberListAdapter.java
+++ b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
@@ -32,6 +32,7 @@
import com.android.dialer.dialpad.SmartDialNameMatcher;
import com.android.dialer.dialpad.SmartDialPrefix;
import com.android.dialer.dialpad.SmartDialMatchPosition;
+import com.android.dialer.util.DialerUtils;
import java.util.ArrayList;
@@ -118,9 +119,8 @@
public void setQueryString(String queryString) {
final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString());
setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
- // TODO: Write utility method to check subscriptions and settings, and use it to determine
- // whether to enable or disable video call shortcut.
- setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts);
+ setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
+ showNumberShortcuts && DialerUtils.isVideoEnabled());
super.setQueryString(queryString);
}
}
diff --git a/src/com/android/dialer/util/DialerUtils.java b/src/com/android/dialer/util/DialerUtils.java
index 93a055d..e24b642 100644
--- a/src/com/android/dialer/util/DialerUtils.java
+++ b/src/com/android/dialer/util/DialerUtils.java
@@ -169,4 +169,10 @@
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
+
+ public static boolean isVideoEnabled() {
+ // TODO: Write utility methods to check subscriptions and settings, and use it to determine
+ // whether to enable or disable video call functionality.
+ return false;
+ }
}