am be734d29: Return copied String array from getStringArray method
* commit 'be734d298aeb716af6fc3848cb955ec0660b40b6': Return copied String array from getStringArray methodmain
commit
4dd96d2050
|
@ -27,6 +27,7 @@ import com.android.inputmethod.latin.utils.XmlParseUtils;
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public final class KeyStylesSet {
|
public final class KeyStylesSet {
|
||||||
|
@ -90,7 +91,8 @@ public final class KeyStylesSet {
|
||||||
}
|
}
|
||||||
final Object value = mStyleAttributes.get(index);
|
final Object value = mStyleAttributes.get(index);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
return (String[])value;
|
final String[] array = (String[])value;
|
||||||
|
return Arrays.copyOf(array, array.length);
|
||||||
}
|
}
|
||||||
final KeyStyle parentStyle = mStyles.get(mParentStyleName);
|
final KeyStyle parentStyle = mStyles.get(mParentStyleName);
|
||||||
return parentStyle.getStringArray(a, index);
|
return parentStyle.getStringArray(a, index);
|
||||||
|
|
Loading…
Reference in New Issue