diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-21 20:46:22 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-22 12:38:09 -0700 |
commit | 6af73542e5a50b30cd62214d27d2d4ad88fa4982 (patch) | |
tree | 270d8de2ff52d4fa4c91be167b4bf45394fd17a6 /InCallUI | |
parent | d2ac55ad54be300d33d064d8cd03b6b32230629f (diff) |
Remove dual-state icons for call buttons.
Per discussion with design, it'll be simpler to just have one icon
which does not toggle/change on state (besides color accent).
Bug: 15165717
Change-Id: I2856c403b549e734e8f6c55b5be65f9a337730d6
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/res/drawable-hdpi/ic_toolbar_mic_on.png | bin | 950 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-hdpi/ic_toolbar_speaker_off.png | bin | 729 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-mdpi/ic_toolbar_mic_on.png | bin | 748 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-mdpi/ic_toolbar_speaker_off.png | bin | 613 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-xhdpi/ic_toolbar_mic_on.png | bin | 1200 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-xhdpi/ic_toolbar_speaker_off.png | bin | 839 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-xxhdpi/ic_toolbar_mic_on.png | bin | 1775 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable-xxhdpi/ic_toolbar_speaker_off.png | bin | 1348 -> 0 bytes | |||
-rw-r--r-- | InCallUI/res/drawable/btn_compound_audio.xml | 9 | ||||
-rw-r--r-- | InCallUI/res/drawable/btn_compound_mute.xml | 10 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonFragment.java | 28 |
11 files changed, 10 insertions, 37 deletions
diff --git a/InCallUI/res/drawable-hdpi/ic_toolbar_mic_on.png b/InCallUI/res/drawable-hdpi/ic_toolbar_mic_on.png Binary files differdeleted file mode 100644 index 9a5afbc85..000000000 --- a/InCallUI/res/drawable-hdpi/ic_toolbar_mic_on.png +++ /dev/null diff --git a/InCallUI/res/drawable-hdpi/ic_toolbar_speaker_off.png b/InCallUI/res/drawable-hdpi/ic_toolbar_speaker_off.png Binary files differdeleted file mode 100644 index a73c0dcdf..000000000 --- a/InCallUI/res/drawable-hdpi/ic_toolbar_speaker_off.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/ic_toolbar_mic_on.png b/InCallUI/res/drawable-mdpi/ic_toolbar_mic_on.png Binary files differdeleted file mode 100644 index 0be1d1f14..000000000 --- a/InCallUI/res/drawable-mdpi/ic_toolbar_mic_on.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/ic_toolbar_speaker_off.png b/InCallUI/res/drawable-mdpi/ic_toolbar_speaker_off.png Binary files differdeleted file mode 100644 index 1040ca6da..000000000 --- a/InCallUI/res/drawable-mdpi/ic_toolbar_speaker_off.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/ic_toolbar_mic_on.png b/InCallUI/res/drawable-xhdpi/ic_toolbar_mic_on.png Binary files differdeleted file mode 100644 index 9ae4b414d..000000000 --- a/InCallUI/res/drawable-xhdpi/ic_toolbar_mic_on.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/ic_toolbar_speaker_off.png b/InCallUI/res/drawable-xhdpi/ic_toolbar_speaker_off.png Binary files differdeleted file mode 100644 index b332a2025..000000000 --- a/InCallUI/res/drawable-xhdpi/ic_toolbar_speaker_off.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxhdpi/ic_toolbar_mic_on.png b/InCallUI/res/drawable-xxhdpi/ic_toolbar_mic_on.png Binary files differdeleted file mode 100644 index 11b4655ad..000000000 --- a/InCallUI/res/drawable-xxhdpi/ic_toolbar_mic_on.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxhdpi/ic_toolbar_speaker_off.png b/InCallUI/res/drawable-xxhdpi/ic_toolbar_speaker_off.png Binary files differdeleted file mode 100644 index 603a954fe..000000000 --- a/InCallUI/res/drawable-xxhdpi/ic_toolbar_speaker_off.png +++ /dev/null diff --git a/InCallUI/res/drawable/btn_compound_audio.xml b/InCallUI/res/drawable/btn_compound_audio.xml index 9b24d8b6f..adfb8c279 100644 --- a/InCallUI/res/drawable/btn_compound_audio.xml +++ b/InCallUI/res/drawable/btn_compound_audio.xml @@ -84,19 +84,12 @@ </item> <!-- Speakerphone icon showing 'speaker on' state --> - <item android:id="@+id/speakerphoneOnItem"> + <item android:id="@+id/speakerphoneItem"> <bitmap android:src="@drawable/ic_toolbar_speaker_on" android:gravity="center" android:tint="@color/selectable_icon_tint" /> </item> - <!-- Speakerphone icon showing 'speaker off' state --> - <item android:id="@+id/speakerphoneOffItem"> - <bitmap android:src="@drawable/ic_toolbar_speaker_off" - android:gravity="center" - android:tint="@color/selectable_icon_tint" /> - </item> - <!-- Generic "audio mode" icon. --> <!-- TODO: is this actually needed? --> <!-- diff --git a/InCallUI/res/drawable/btn_compound_mute.xml b/InCallUI/res/drawable/btn_compound_mute.xml index c224dfc28..68a8c9b34 100644 --- a/InCallUI/res/drawable/btn_compound_mute.xml +++ b/InCallUI/res/drawable/btn_compound_mute.xml @@ -21,16 +21,10 @@ <item android:drawable="@drawable/btn_compound_background" /> <!-- Use an explicit <bitmap> to avoid scaling the icon up to the full size of the button. --> - <item android:id="@+id/muteOffItem"> - <bitmap android:src="@drawable/ic_toolbar_mic_on" + <item> + <bitmap android:src="@drawable/ic_toolbar_mic_off" android:gravity="center" android:tint="@color/selectable_icon_tint" /> </item> - <item android:id="@+id/muteOnItem"> - <bitmap android:src="@drawable/ic_toolbar_mic_off" - android:gravity="center" - android:tint="@color/selectable_icon_tint" /> - </item> - </layer-list> diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index d9fc68de3..76055f2c0 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -209,13 +209,6 @@ public class CallButtonFragment @Override public void setMute(boolean value) { - final LayerDrawable layers = (LayerDrawable) mMuteButton.getBackground(); - - layers.findDrawableByLayerId(R.id.muteOffItem) - .setAlpha(value ? HIDDEN : VISIBLE); - layers.findDrawableByLayerId(R.id.muteOnItem) - .setAlpha(value ? VISIBLE : HIDDEN); - mMuteButton.setSelected(value); } @@ -359,8 +352,7 @@ public class CallButtonFragment boolean showMoreIndicator = false; boolean showBluetoothIcon = false; - boolean showSpeakerphoneOnIcon = false; - boolean showSpeakerphoneOffIcon = false; + boolean showSpeakerphoneIcon = false; boolean showHandsetIcon = false; boolean showToggleIndicator = false; @@ -378,7 +370,7 @@ public class CallButtonFragment if (isAudio(AudioMode.BLUETOOTH)) { showBluetoothIcon = true; } else if (isAudio(AudioMode.SPEAKER)) { - showSpeakerphoneOnIcon = true; + showSpeakerphoneIcon = true; } else { showHandsetIcon = true; // TODO: if a wired headset is plugged in, that takes precedence @@ -397,9 +389,7 @@ public class CallButtonFragment // update desired layers: showToggleIndicator = true; - - showSpeakerphoneOnIcon = isAudio(AudioMode.SPEAKER); - showSpeakerphoneOffIcon = !showSpeakerphoneOnIcon; + showSpeakerphoneIcon = true; } else { Log.d(this, "updateAudioButtons - disabled..."); @@ -410,7 +400,7 @@ public class CallButtonFragment // update desired layers: showToggleIndicator = true; - showSpeakerphoneOffIcon = true; + showSpeakerphoneIcon = true; } // Finally, update it all! @@ -419,8 +409,7 @@ public class CallButtonFragment Log.v(this, "audioButtonChecked: " + audioButtonChecked); Log.v(this, "showMoreIndicator: " + showMoreIndicator); Log.v(this, "showBluetoothIcon: " + showBluetoothIcon); - Log.v(this, "showSpeakerphoneOnIcon: " + showSpeakerphoneOnIcon); - Log.v(this, "showSpeakerphoneOffIcon: " + showSpeakerphoneOffIcon); + Log.v(this, "showSpeakerphoneIcon: " + showSpeakerphoneIcon); Log.v(this, "showHandsetIcon: " + showHandsetIcon); // Only enable the audio button if the fragment is enabled. @@ -442,11 +431,8 @@ public class CallButtonFragment layers.findDrawableByLayerId(R.id.handsetItem) .setAlpha(showHandsetIcon ? VISIBLE : HIDDEN); - layers.findDrawableByLayerId(R.id.speakerphoneOnItem) - .setAlpha(showSpeakerphoneOnIcon ? VISIBLE : HIDDEN); - - layers.findDrawableByLayerId(R.id.speakerphoneOffItem) - .setAlpha(showSpeakerphoneOffIcon ? VISIBLE : HIDDEN); + layers.findDrawableByLayerId(R.id.speakerphoneItem) + .setAlpha(showSpeakerphoneIcon ? VISIBLE : HIDDEN); } |