am 064af5c0: Stop using modifiable Key array
* commit '064af5c0fc07b3afae3021d42fcac2185158c951': Stop using modifiable Key arraymain
commit
1c697e4fd8
|
@ -25,6 +25,9 @@ import com.android.inputmethod.latin.Constants;
|
||||||
import com.android.inputmethod.latin.utils.CollectionUtils;
|
import com.android.inputmethod.latin.utils.CollectionUtils;
|
||||||
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
import com.android.inputmethod.latin.utils.CoordinateUtils;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard
|
* Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard
|
||||||
* consists of rows of keys.
|
* consists of rows of keys.
|
||||||
|
@ -76,8 +79,8 @@ public class Keyboard {
|
||||||
|
|
||||||
/** Array of keys and icons in this keyboard */
|
/** Array of keys and icons in this keyboard */
|
||||||
private final Key[] mKeys;
|
private final Key[] mKeys;
|
||||||
public final Key[] mShiftKeys;
|
public final List<Key> mShiftKeys;
|
||||||
public final Key[] mAltCodeKeysWhileTyping;
|
public final List<Key> mAltCodeKeysWhileTyping;
|
||||||
public final KeyboardIconsSet mIconsSet;
|
public final KeyboardIconsSet mIconsSet;
|
||||||
|
|
||||||
private final SparseArray<Key> mKeyCache = CollectionUtils.newSparseArray();
|
private final SparseArray<Key> mKeyCache = CollectionUtils.newSparseArray();
|
||||||
|
@ -101,9 +104,8 @@ public class Keyboard {
|
||||||
mVerticalGap = params.mVerticalGap;
|
mVerticalGap = params.mVerticalGap;
|
||||||
|
|
||||||
mKeys = params.mKeys.toArray(new Key[params.mKeys.size()]);
|
mKeys = params.mKeys.toArray(new Key[params.mKeys.size()]);
|
||||||
mShiftKeys = params.mShiftKeys.toArray(new Key[params.mShiftKeys.size()]);
|
mShiftKeys = Collections.unmodifiableList(params.mShiftKeys);
|
||||||
mAltCodeKeysWhileTyping = params.mAltCodeKeysWhileTyping.toArray(
|
mAltCodeKeysWhileTyping = Collections.unmodifiableList(params.mAltCodeKeysWhileTyping);
|
||||||
new Key[params.mAltCodeKeysWhileTyping.size()]);
|
|
||||||
mIconsSet = params.mIconsSet;
|
mIconsSet = params.mIconsSet;
|
||||||
|
|
||||||
mProximityInfo = new ProximityInfo(params.mId.mLocale.toString(),
|
mProximityInfo = new ProximityInfo(params.mId.mLocale.toString(),
|
||||||
|
|
Loading…
Reference in New Issue