Skip to content
Snippets Groups Projects
Commit 11a40a04 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Make Utils.getDeviceOverrideValue aware of device orientation

Bug: 6277225
Change-Id: If41fe5cbee0985b9a4740dcd5d1c6ba73b94b377
parent 423b30d5
No related branches found
No related tags found
No related merge requests found
......@@ -466,11 +466,12 @@ public class Utils {
}
private static final String HARDWARE_PREFIX = Build.HARDWARE + ",";
private static final HashMap<Integer, String> sDeviceOverrideValueMap =
new HashMap<Integer, String>();
private static final HashMap<String, String> sDeviceOverrideValueMap =
new HashMap<String, String>();
public static String getDeviceOverrideValue(Resources res, int overrideResId, String defValue) {
final Integer key = overrideResId;
final int orientation = res.getConfiguration().orientation;
final String key = overrideResId + "-" + orientation;
if (!sDeviceOverrideValueMap.containsKey(key)) {
String overrideValue = defValue;
for (final String element : res.getStringArray(overrideResId)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment