Merge "Roboto now baked into dial numbers"
diff --git a/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
index 60fecb2..d21cc10 100644
--- a/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_minus_disabled_holo_dark.png b/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
index 0d2d93b..c2ad8dc 100644
--- a/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_play_disabled_holo_dark.png b/res/drawable-hdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..e3a3853
--- /dev/null
+++ b/res/drawable-hdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_plus_disabled_holo_dark.png b/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
index ed65c1c..723e362 100644
--- a/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
index 1f32576..d8cec25 100644
--- a/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_minus_disabled_holo_dark.png b/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
index 76ef6e8..fb0103c 100644
--- a/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_play_disabled_holo_dark.png b/res/drawable-mdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..64bed72
--- /dev/null
+++ b/res/drawable-mdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_plus_disabled_holo_dark.png b/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
index 2a5947c..70c9a3d 100644
--- a/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
index 4a45288..9e12338 100644
--- a/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png b/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
index 1f09cf8..ae6bce7 100644
--- a/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_play_disabled_holo_dark.png b/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..9537351
--- /dev/null
+++ b/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png b/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
index 5728d50..169da3e 100644
--- a/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable/ic_play.xml b/res/drawable/ic_play.xml
new file mode 100644
index 0000000..a8bf05e
--- /dev/null
+++ b/res/drawable/ic_play.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/ic_play_disabled_holo_dark" />
+ <item android:drawable="@drawable/ic_play_holo_dark" />
+</selector>
diff --git a/res/drawable/seek_bar_thumb.xml b/res/drawable/seek_bar_thumb.xml
index 61884bb..2f5ca88 100644
--- a/res/drawable/seek_bar_thumb.xml
+++ b/res/drawable/seek_bar_thumb.xml
@@ -1,34 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
-<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="@color/voicemail_playback_seek_bar_yet_to_play"
- />
- </shape>
+<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="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </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/voicemail_playback_seek_bar_already_played"
+ />
+ </shape>
+ </item>
+ </layer-list>
</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/voicemail_playback_seek_bar_already_played"
- />
- </shape>
- </item>
-</layer-list>
+
+ <!-- Do not show the thumb when disabled -->
+ <item android:drawable="@android:color/transparent" />
+</selector>
\ No newline at end of file
diff --git a/res/drawable/seekbar_drawable.xml b/res/drawable/seekbar_drawable.xml
index 2533b7f..e86f53d 100644
--- a/res/drawable/seekbar_drawable.xml
+++ b/res/drawable/seekbar_drawable.xml
@@ -1,22 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@android:id/background">
- <shape android:shape="line">
- <stroke
- android:width="2dip"
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
- />
- </shape>
- </item>
- <!-- I am not defining a secondary progress colour - we don't use it. -->
- <item android:id="@android:id/progress">
- <clip>
- <shape android:shape="line">
- <stroke
- android:width="2dip"
- android:color="@color/voicemail_playback_seek_bar_already_played"
- />
- </shape>
- </clip>
- </item>
-</layer-list>
+<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">
+ <item android:id="@android:id/background">
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </item>
+ <!-- I am not defining a secondary progress colour - we don't use it. -->
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_already_played"
+ />
+ </shape>
+ </clip>
+ </item>
+ </layer-list>
+ </item>
+ <item>
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background">
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </item>
+ <!-- I am not defining a secondary progress colour - we don't use it. -->
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </clip>
+ </item>
+ </layer-list>
+ </item>
+</selector>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index aa99d21..f4b94af 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1579,7 +1579,7 @@
<!-- Label to instruct the user to type in a contact's name to add the contact as a member of the current group. [CHAR LIMIT=64] -->
<string name="enter_contact_name">Type person\'s name</string>
- <!-- Button to view the updates from the current group on the group detail page [CHAR LIMIT=20] -->
+ <!-- Button to view the updates from the current group on the group detail page [CHAR LIMIT=25] -->
<string name="view_updates_from_group">View updates</string>
<!-- Title of the notification of new voicemails. [CHAR LIMIT=30] -->
@@ -1676,13 +1676,6 @@
<!-- Used to display as default status when the contact is busy or Do not disturb for chat [CHAR LIMIT=19] -->
<string name="status_busy">Busy</string>
- <!-- String describing the icon in the call log used to place a call.
-
- Note: AccessibilityServices use this attribute to announce what the view represents.
- This is especially valuable for views without textual representation like ImageView.
- -->
- <string name="description_call_log_call_button">Call number</string>
-
<!-- String describing the icon in the call log used to play a voicemail.
Note: AccessibilityServices use this attribute to announce what the view represents.
diff --git a/src/com/android/contacts/calllog/CallLogListItemHelper.java b/src/com/android/contacts/calllog/CallLogListItemHelper.java
index 602c283..6378c5e 100644
--- a/src/com/android/contacts/calllog/CallLogListItemHelper.java
+++ b/src/com/android/contacts/calllog/CallLogListItemHelper.java
@@ -22,6 +22,7 @@
import android.content.res.Resources;
import android.provider.CallLog.Calls;
+import android.text.TextUtils;
import android.view.View;
/**
@@ -68,7 +69,7 @@
views.dividerView.setVisibility(View.VISIBLE);
} else if (canCall) {
// Call is the secondary action.
- configureCallSecondaryAction(views);
+ configureCallSecondaryAction(views, details);
views.dividerView.setVisibility(View.VISIBLE);
} else {
// No action available.
@@ -78,17 +79,29 @@
}
/** Sets the secondary action to correspond to the call button. */
- private void configureCallSecondaryAction(CallLogListItemViews views) {
+ private void configureCallSecondaryAction(CallLogListItemViews views,
+ PhoneCallDetails details) {
views.secondaryActionView.setVisibility(View.VISIBLE);
views.secondaryActionView.setImageResource(R.drawable.ic_ab_dialer_holo_dark);
- views.secondaryActionView.setContentDescription(
- mResources.getString(R.string.description_call_log_call_button));
+ views.secondaryActionView.setContentDescription(getCallActionDescription(details));
+ }
+
+ /** Returns the description used by the call action for this phone call. */
+ private CharSequence getCallActionDescription(PhoneCallDetails details) {
+ final CharSequence recipient;
+ if (!TextUtils.isEmpty(details.name)) {
+ recipient = details.name;
+ } else {
+ recipient = mPhoneNumberHelper.getDisplayNumber(
+ details.number, details.formattedNumber);
+ }
+ return mResources.getString(R.string.description_call, recipient);
}
/** Sets the secondary action to correspond to the play button. */
private void configurePlaySecondaryAction(CallLogListItemViews views) {
views.secondaryActionView.setVisibility(View.VISIBLE);
- views.secondaryActionView.setImageResource(R.drawable.ic_play_holo_dark);
+ views.secondaryActionView.setImageResource(R.drawable.ic_play);
views.secondaryActionView.setContentDescription(
mResources.getString(R.string.description_call_log_play_button));
}
diff --git a/src/com/android/contacts/util/PhoneNumberFormatter.java b/src/com/android/contacts/util/PhoneNumberFormatter.java
index 6e63aac..204ac69 100644
--- a/src/com/android/contacts/util/PhoneNumberFormatter.java
+++ b/src/com/android/contacts/util/PhoneNumberFormatter.java
@@ -49,9 +49,7 @@
if (watcher == null || isCancelled()) {
return; // May happen if we cancel the task.
}
- if (mTextView.getHandler() == null) {
- return; // View is already detached.
- }
+ // Setting a text changed listener is safe even after the view is detached.
mTextView.addTextChangedListener(watcher);
// Note changes the user made before onPostExecute() will not be formatted, but
diff --git a/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java b/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
index df4d9af..8912a74 100644
--- a/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
+++ b/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
@@ -266,7 +266,7 @@
@Override
public void playbackStopped() {
- mStartStopButton.setImageResource(R.drawable.ic_play_holo_dark);
+ mStartStopButton.setImageResource(R.drawable.ic_play);
}
@Override