summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabrice Di Meglio <fdimeglio@google.com> 2013-01-11 11:10:00 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2013-01-11 11:10:00 -0800
commit9003007d35c6ae1cdeac4ca831a036292b7089e9 (patch)
treea5e92c1034bab94172d881567794b2f68d3b1001
parentab82e35a59fc8ebb771c4e69343d1041542a4b83 (diff)
parent8c02884c8c3c97cdc2366ac187c8a326308b895b (diff)
Merge "Fix Volume icons for RTL languages"
-rw-r--r--core/java/android/view/VolumePanel.java7
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.pngbin0 -> 4028 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.pngbin0 -> 4258 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.pngbin0 -> 3970 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.pngbin0 -> 4284 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.pngbin0 -> 4441 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.pngbin0 -> 4405 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.pngbin0 -> 4264 bytes
-rw-r--r--core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.pngbin0 -> 4441 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.pngbin0 -> 3665 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.pngbin0 -> 3805 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.pngbin0 -> 3625 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.pngbin0 -> 3800 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.pngbin0 -> 3862 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.pngbin0 -> 3895 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.pngbin0 -> 3788 bytes
-rw-r--r--core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.pngbin0 -> 3862 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.pngbin0 -> 4367 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.pngbin0 -> 4864 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.pngbin0 -> 4385 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.pngbin0 -> 4846 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.pngbin0 -> 5139 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.pngbin0 -> 5075 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.pngbin0 -> 4803 bytes
-rw-r--r--core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.pngbin0 -> 5139 bytes
-rw-r--r--media/java/android/media/AudioService.java1
26 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index d4e27bce5289..e711b94b681d 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -337,6 +337,11 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
listenToRingerMode();
}
+ public void setLayoutDirection(int layoutDirection) {
+ mPanel.setLayoutDirection(layoutDirection);
+ updateStates();
+ }
+
private void listenToRingerMode() {
final IntentFilter filter = new IntentFilter();
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
@@ -460,6 +465,8 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
private void updateSlider(StreamControl sc) {
sc.seekbarView.setProgress(getStreamVolume(sc.streamType));
final boolean muted = isMuted(sc.streamType);
+ // Force reloading the image resource
+ sc.icon.setImageDrawable(null);
sc.icon.setImageResource(muted ? sc.iconMuteRes : sc.iconRes);
if (sc.streamType == AudioManager.STREAM_RING &&
mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) {
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png
new file mode 100644
index 000000000000..62ef69217c8a
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png
new file mode 100644
index 000000000000..40123e32c309
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png
new file mode 100644
index 000000000000..968f5eefd0e1
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png
new file mode 100644
index 000000000000..e5f0dcff6ee0
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png
new file mode 100644
index 000000000000..371e32f7b088
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png
new file mode 100644
index 000000000000..e05e8f518081
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_ring_notif_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png
new file mode 100644
index 000000000000..81a8422b17a6
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png
new file mode 100644
index 000000000000..371e32f7b088
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-hdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png
new file mode 100644
index 000000000000..d9843e0ad1d1
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png
new file mode 100644
index 000000000000..2159cabc3610
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png
new file mode 100644
index 000000000000..b5af351f521a
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png
new file mode 100644
index 000000000000..6341be66bc14
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png
new file mode 100644
index 000000000000..b4c3a54c882b
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png
new file mode 100644
index 000000000000..835773e7aa2f
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_ring_notif_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png
new file mode 100644
index 000000000000..947d1f94e5e3
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png
new file mode 100644
index 000000000000..b4c3a54c882b
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-mdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png
new file mode 100644
index 000000000000..43aedeaa9ea1
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png
new file mode 100644
index 000000000000..4e87f7708310
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_notification_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png
new file mode 100644
index 000000000000..1066d03f879d
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_phone.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png
new file mode 100644
index 000000000000..daf9213f0961
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png
new file mode 100644
index 000000000000..83d3bdde0881
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png
new file mode 100644
index 000000000000..4de95aad32a7
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_ring_notif_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png
new file mode 100644
index 000000000000..81329265541f
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol.png
Binary files differ
diff --git a/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png
new file mode 100644
index 000000000000..83d3bdde0881
--- /dev/null
+++ b/core/res/res/drawable-ldrtl-xhdpi/ic_audio_vol_mute.png
Binary files differ
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 9aac0e6b8cd5..fb66df04d534 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -5991,6 +5991,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
}
}
}
+ mVolumePanel.setLayoutDirection(config.getLayoutDirection());
} catch (Exception e) {
Log.e(TAG, "Error retrieving device orientation: " + e);
}