Initialize Keyboard.Key attributes from parent Keyboard.Row

Bug: 3009940
Change-Id: I22ef3e507c31e46b7581e20bcdd6b5ebc750adfe
diff --git a/core/java/android/inputmethodservice/Keyboard.java b/core/java/android/inputmethodservice/Keyboard.java
old mode 100755
new mode 100644
index 4814b0a..269e1c9
--- a/core/java/android/inputmethodservice/Keyboard.java
+++ b/core/java/android/inputmethodservice/Keyboard.java
@@ -307,6 +307,10 @@
         /** Create an empty key with no attributes. */
         public Key(Row parent) {
             keyboard = parent.parent;
+            height = parent.defaultHeight;
+            width = parent.defaultWidth;
+            gap = parent.defaultHorizontalGap;
+            edgeFlags = parent.rowEdgeFlags;
         }
         
         /** Create a key with the given top-left coordinate and extract its attributes from
@@ -564,9 +568,6 @@
             final Key key = new Key(row);
             key.x = x;
             key.y = y;
-            key.width = mDefaultWidth;
-            key.height = mDefaultHeight;
-            key.gap = mDefaultHorizontalGap;
             key.label = String.valueOf(c);
             key.codes = new int[] { c };
             column++;