Fixed a bug in DisplayUtils in which the length of entries will be added twice, causing IndexOutOfBound exception at runtime when using custom DPI am: ab15e923a5
am: 418abb7a86
* commit '418abb7a865ec6c213899121b98a37c8915618a0':
Fixed a bug in DisplayUtils in which the length of entries will be added twice, causing IndexOutOfBound exception at runtime when using custom DPI
This commit is contained in:
@@ -154,10 +154,11 @@ class DisplayDensityUtils {
|
||||
} else {
|
||||
// We don't understand the current density. Must have been set by
|
||||
// someone else. Make room for another entry...
|
||||
values = Arrays.copyOf(values, values.length + 1);
|
||||
int newLength = values.length + 1;
|
||||
values = Arrays.copyOf(values, newLength);
|
||||
values[curIndex] = currentDensity;
|
||||
|
||||
entries = Arrays.copyOf(entries, values.length + 1);
|
||||
entries = Arrays.copyOf(entries, newLength);
|
||||
entries[curIndex] = res.getString(SUMMARY_CUSTOM, currentDensity);
|
||||
|
||||
displayIndex = curIndex;
|
||||
|
Reference in New Issue
Block a user