summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2013-01-11 11:10:00 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-01-11 11:10:00 -0800
commit9003007d35c6ae1cdeac4ca831a036292b7089e9 (patch)
treea5e92c1034bab94172d881567794b2f68d3b1001
parentab82e35a59fc8ebb771c4e69343d1041542a4b83 (diff)
parent8c02884c8c3c97cdc2366ac187c8a326308b895b (diff)
downloadframeworks_base-9003007d35c6ae1cdeac4ca831a036292b7089e9.zip
frameworks_base-9003007d35c6ae1cdeac4ca831a036292b7089e9.tar.gz
frameworks_base-9003007d35c6ae1cdeac4ca831a036292b7089e9.tar.bz2
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 d4e27bc..e711b94 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 0000000..62ef692
--- /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 0000000..40123e3
--- /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 0000000..968f5ee
--- /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 0000000..e5f0dcf
--- /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 0000000..371e32f
--- /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 0000000..e05e8f5
--- /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 0000000..81a8422
--- /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 0000000..371e32f
--- /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 0000000..d9843e0
--- /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 0000000..2159cab
--- /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 0000000..b5af351
--- /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 0000000..6341be6
--- /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 0000000..b4c3a54
--- /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 0000000..835773e
--- /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 0000000..947d1f9
--- /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 0000000..b4c3a54
--- /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 0000000..43aedea
--- /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 0000000..4e87f77
--- /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 0000000..1066d03
--- /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 0000000..daf9213
--- /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 0000000..83d3bdd
--- /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 0000000..4de95aa
--- /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 0000000..8132926
--- /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 0000000..83d3bdd
--- /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 9aac0e6..fb66df0 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);
}