summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/16.txt2
-rw-r--r--api/current.txt2
-rwxr-xr-xcore/java/android/hardware/input/InputManager.java4
-rw-r--r--core/java/android/view/GLES20DisplayList.java3
-rw-r--r--core/java/android/view/TextureView.java12
-rw-r--r--core/java/android/view/View.java101
-rwxr-xr-xcore/res/res/values/attrs.xml2
-rw-r--r--core/res/res/values/public.xml5
-rw-r--r--packages/InputDevices/res/xml/keyboard_layouts.xml54
-rw-r--r--services/java/com/android/server/input/InputManagerService.java21
10 files changed, 150 insertions, 56 deletions
diff --git a/api/16.txt b/api/16.txt
index ee53bcc..18a4b7b 100644
--- a/api/16.txt
+++ b/api/16.txt
@@ -593,7 +593,6 @@ package android {
field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131
field public static final int itemPadding = 16843565; // 0x101032d
field public static final int itemTextAppearance = 16843052; // 0x101012c
- field public static final int kcm = 16843691; // 0x10103ab
field public static final int keepScreenOn = 16843286; // 0x1010216
field public static final int key = 16843240; // 0x10101e8
field public static final int keyBackground = 16843315; // 0x1010233
@@ -608,6 +607,7 @@ package android {
field public static final int keyTextColor = 16843318; // 0x1010236
field public static final int keyTextSize = 16843316; // 0x1010234
field public static final int keyWidth = 16843325; // 0x101023d
+ field public static final int keyboardLayout = 16843691; // 0x10103ab
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
diff --git a/api/current.txt b/api/current.txt
index 635947c..8402f31 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -594,7 +594,6 @@ package android {
field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131
field public static final int itemPadding = 16843565; // 0x101032d
field public static final int itemTextAppearance = 16843052; // 0x101012c
- field public static final int kcm = 16843691; // 0x10103ab
field public static final int keepScreenOn = 16843286; // 0x1010216
field public static final int key = 16843240; // 0x10101e8
field public static final int keyBackground = 16843315; // 0x1010233
@@ -609,6 +608,7 @@ package android {
field public static final int keyTextColor = 16843318; // 0x1010236
field public static final int keyTextSize = 16843316; // 0x1010234
field public static final int keyWidth = 16843325; // 0x101023d
+ field public static final int keyboardLayout = 16843691; // 0x10103ab
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 5ba1850..6448b55 100755
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -96,14 +96,14 @@ public final class InputManager {
* <keyboard-layouts xmlns:android="http://schemas.android.com/apk/res/android">
* <keyboard-layout android:name="keyboard_layout_english_us"
* android:label="@string/keyboard_layout_english_us_label"
- * android:kcm="@raw/keyboard_layout_english_us" />
+ * android:keyboardLayout="@raw/keyboard_layout_english_us" />
* </keyboard-layouts>
* </p><p>
* The <code>android:name</code> attribute specifies an identifier by which
* the keyboard layout will be known in the package.
* The <code>android:label</code> attributes specifies a human-readable descriptive
* label to describe the keyboard layout in the user interface, such as "English (US)".
- * The <code>android:kcm</code> attribute refers to a
+ * The <code>android:keyboardLayout</code> attribute refers to a
* <a href="http://source.android.com/tech/input/key-character-map-files.html">
* key character map</a> resource that defines the keyboard layout.
* </p>
diff --git a/core/java/android/view/GLES20DisplayList.java b/core/java/android/view/GLES20DisplayList.java
index f3618eb..0154556 100644
--- a/core/java/android/view/GLES20DisplayList.java
+++ b/core/java/android/view/GLES20DisplayList.java
@@ -131,7 +131,8 @@ class GLES20DisplayList extends DisplayList {
@Override
public void setAnimationMatrix(Matrix matrix) {
try {
- nSetAnimationMatrix(getNativeDisplayList(), matrix.native_instance);
+ nSetAnimationMatrix(getNativeDisplayList(),
+ (matrix != null) ? matrix.native_instance : 0);
} catch (IllegalStateException e) {
// invalid DisplayList okay: we'll set current values the next time we render to it
}
diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java
index 651be2e..2048de2 100644
--- a/core/java/android/view/TextureView.java
+++ b/core/java/android/view/TextureView.java
@@ -561,7 +561,17 @@ public class TextureView extends View {
applyUpdate();
applyTransformMatrix();
- mLayer.copyInto(bitmap);
+ // This case can happen if the app invokes setSurfaceTexture() before
+ // we are able to create the hardware layer. We can safely initialize
+ // the layer here thanks to the validate() call at the beginning of
+ // this method
+ if (mLayer == null && mUpdateSurface) {
+ getHardwareLayer();
+ }
+
+ if (mLayer != null) {
+ mLayer.copyInto(bitmap);
+ }
}
return bitmap;
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index bf7d037..55ea938 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -2128,6 +2128,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
*/
static final int ACCESSIBILITY_STATE_CHANGED = 0x00000080 << IMPORTANT_FOR_ACCESSIBILITY_SHIFT;
+ /**
+ * Flag indicating that view has an animation set on it. This is used to track whether an
+ * animation is cleared between successive frames, in order to tell the associated
+ * DisplayList to clear its animation matrix.
+ */
+ static final int VIEW_IS_ANIMATING_TRANSFORM = 0x10000000;
+
+ /**
+ * Flag indicating whether a view failed the quickReject() check in draw(). This condition
+ * is used to check whether later changes to the view's transform should invalidate the
+ * view to force the quickReject test to run again.
+ */
+ static final int VIEW_QUICK_REJECTED = 0x20000000;
+
/* End of masks for mPrivateFlags2 */
static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED;
@@ -8560,6 +8574,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setCameraDistance(-Math.abs(distance) / dpi);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
/**
@@ -8602,6 +8620,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setRotation(rotation);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8649,6 +8671,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setRotationY(rotationY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8696,6 +8722,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setRotationX(rotationX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8735,6 +8765,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setScaleX(scaleX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8774,6 +8808,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setScaleY(scaleY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8821,6 +8859,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setPivotX(pivotX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -8867,6 +8909,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setPivotY(pivotY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9025,6 +9071,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9094,6 +9144,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9157,6 +9211,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9217,6 +9275,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
mBackgroundSizeChanged = true;
invalidateParentIfNeeded();
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9301,6 +9363,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setTranslationX(translationX);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -9338,6 +9404,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (mDisplayList != null) {
mDisplayList.setTranslationY(translationY);
}
+ if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
+ // View was rejected last time it was drawn by its parent; this may have changed
+ invalidateParentIfNeeded();
+ }
}
}
@@ -12777,16 +12847,27 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (a != null) {
more = drawAnimation(parent, drawingTime, a, scalingRequired);
concatMatrix = a.willChangeTransformationMatrix();
+ if (concatMatrix) {
+ mPrivateFlags2 |= VIEW_IS_ANIMATING_TRANSFORM;
+ }
transformToApply = parent.mChildTransformation;
- } else if (!useDisplayListProperties &&
- (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
- final boolean hasTransform =
- parent.getChildStaticTransformation(this, parent.mChildTransformation);
- if (hasTransform) {
- final int transformType = parent.mChildTransformation.getTransformationType();
- transformToApply = transformType != Transformation.TYPE_IDENTITY ?
- parent.mChildTransformation : null;
- concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0;
+ } else {
+ if ((mPrivateFlags2 & VIEW_IS_ANIMATING_TRANSFORM) == VIEW_IS_ANIMATING_TRANSFORM &&
+ mDisplayList != null) {
+ // No longer animating: clear out old animation matrix
+ mDisplayList.setAnimationMatrix(null);
+ mPrivateFlags2 &= ~VIEW_IS_ANIMATING_TRANSFORM;
+ }
+ if (!useDisplayListProperties &&
+ (flags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
+ final boolean hasTransform =
+ parent.getChildStaticTransformation(this, parent.mChildTransformation);
+ if (hasTransform) {
+ final int transformType = parent.mChildTransformation.getTransformationType();
+ transformToApply = transformType != Transformation.TYPE_IDENTITY ?
+ parent.mChildTransformation : null;
+ concatMatrix = (transformType & Transformation.TYPE_MATRIX) != 0;
+ }
}
}
@@ -12798,8 +12879,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
if (!concatMatrix && canvas.quickReject(mLeft, mTop, mRight, mBottom, Canvas.EdgeType.BW) &&
(mPrivateFlags & DRAW_ANIMATION) == 0) {
+ mPrivateFlags2 |= VIEW_QUICK_REJECTED;
return more;
}
+ mPrivateFlags2 &= ~VIEW_QUICK_REJECTED;
if (hardwareAccelerated) {
// Clear INVALIDATED flag to allow invalidation to occur during rendering, but
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 69fe6dc..8b0b8ba 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5627,6 +5627,6 @@
<!-- The display label of the keyboard layout. -->
<attr name="label" />
<!-- The key character map file resource. -->
- <attr name="kcm" format="reference" />
+ <attr name="keyboardLayout" format="reference" />
</declare-styleable>
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index bcc7cd9..42130b3 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -3603,8 +3603,7 @@
<public type="attr" name="permissionGroupFlags" id="0x010103a8" />
<public type="attr" name="isolatedProcess" id="0x010103a9" />
<public type="attr" name="importantForAccessibility" id="0x010103aa" />
- <public type="attr" name="kcm" id="0x010103ab" />
-
- <public type="attr" name="fontFamily" />
+ <public type="attr" name="keyboardLayout" id="0x010103ab" />
+ <public type="attr" name="fontFamily" id="0x010103ac" />
</resources>
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index 23f6bcb..c2a2ecc 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -2,109 +2,109 @@
<keyboard-layouts xmlns:android="http://schemas.android.com/apk/res/android">
<keyboard-layout android:name="keyboard_layout_english_us"
android:label="@string/keyboard_layout_english_us_label"
- android:kcm="@raw/keyboard_layout_english_us" />
+ android:keyboardLayout="@raw/keyboard_layout_english_us" />
<keyboard-layout android:name="keyboard_layout_english_us_dvorak"
android:label="@string/keyboard_layout_english_us_dvorak_label"
- android:kcm="@raw/keyboard_layout_english_us_dvorak" />
+ android:keyboardLayout="@raw/keyboard_layout_english_us_dvorak" />
<keyboard-layout android:name="keyboard_layout_german"
android:label="@string/keyboard_layout_german_label"
- android:kcm="@raw/keyboard_layout_german" />
+ android:keyboardLayout="@raw/keyboard_layout_german" />
<keyboard-layout android:name="keyboard_layout_french"
android:label="@string/keyboard_layout_french_label"
- android:kcm="@raw/keyboard_layout_french" />
+ android:keyboardLayout="@raw/keyboard_layout_french" />
<keyboard-layout android:name="keyboard_layout_french_ca"
android:label="@string/keyboard_layout_french_ca_label"
- android:kcm="@raw/keyboard_layout_french_ca" />
+ android:keyboardLayout="@raw/keyboard_layout_french_ca" />
<keyboard-layout android:name="keyboard_layout_russian"
android:label="@string/keyboard_layout_russian_label"
- android:kcm="@raw/keyboard_layout_russian" />
+ android:keyboardLayout="@raw/keyboard_layout_russian" />
<keyboard-layout android:name="keyboard_layout_russian_mac"
android:label="@string/keyboard_layout_russian_mac_label"
- android:kcm="@raw/keyboard_layout_russian_mac" />
+ android:keyboardLayout="@raw/keyboard_layout_russian_mac" />
<keyboard-layout android:name="keyboard_layout_spanish"
android:label="@string/keyboard_layout_spanish_label"
- android:kcm="@raw/keyboard_layout_spanish" />
+ android:keyboardLayout="@raw/keyboard_layout_spanish" />
<keyboard-layout android:name="keyboard_layout_swiss_french"
android:label="@string/keyboard_layout_swiss_french_label"
- android:kcm="@raw/keyboard_layout_swiss_french" />
+ android:keyboardLayout="@raw/keyboard_layout_swiss_french" />
<keyboard-layout android:name="keyboard_layout_swiss_german"
android:label="@string/keyboard_layout_swiss_german_label"
- android:kcm="@raw/keyboard_layout_swiss_german" />
+ android:keyboardLayout="@raw/keyboard_layout_swiss_german" />
<keyboard-layout android:name="keyboard_layout_belgian"
android:label="@string/keyboard_layout_belgian"
- android:kcm="@raw/keyboard_layout_belgian" />
+ android:keyboardLayout="@raw/keyboard_layout_belgian" />
<keyboard-layout android:name="keyboard_layout_bulgarian"
android:label="@string/keyboard_layout_bulgarian"
- android:kcm="@raw/keyboard_layout_bulgarian" />
+ android:keyboardLayout="@raw/keyboard_layout_bulgarian" />
<keyboard-layout android:name="keyboard_layout_italian"
android:label="@string/keyboard_layout_italian"
- android:kcm="@raw/keyboard_layout_italian" />
+ android:keyboardLayout="@raw/keyboard_layout_italian" />
<keyboard-layout android:name="keyboard_layout_danish"
android:label="@string/keyboard_layout_danish"
- android:kcm="@raw/keyboard_layout_danish" />
+ android:keyboardLayout="@raw/keyboard_layout_danish" />
<keyboard-layout android:name="keyboard_layout_norwegian"
android:label="@string/keyboard_layout_norwegian"
- android:kcm="@raw/keyboard_layout_norwegian" />
+ android:keyboardLayout="@raw/keyboard_layout_norwegian" />
<keyboard-layout android:name="keyboard_layout_swedish"
android:label="@string/keyboard_layout_swedish"
- android:kcm="@raw/keyboard_layout_swedish" />
+ android:keyboardLayout="@raw/keyboard_layout_swedish" />
<keyboard-layout android:name="keyboard_layout_finnish"
android:label="@string/keyboard_layout_finnish"
- android:kcm="@raw/keyboard_layout_finnish" />
+ android:keyboardLayout="@raw/keyboard_layout_finnish" />
<keyboard-layout android:name="keyboard_layout_croatian"
android:label="@string/keyboard_layout_croatian"
- android:kcm="@raw/keyboard_layout_croatian_and_slovenian" />
+ android:keyboardLayout="@raw/keyboard_layout_croatian_and_slovenian" />
<keyboard-layout android:name="keyboard_layout_czech"
android:label="@string/keyboard_layout_czech"
- android:kcm="@raw/keyboard_layout_czech" />
+ android:keyboardLayout="@raw/keyboard_layout_czech" />
<keyboard-layout android:name="keyboard_layout_estonian"
android:label="@string/keyboard_layout_estonian"
- android:kcm="@raw/keyboard_layout_estonian" />
+ android:keyboardLayout="@raw/keyboard_layout_estonian" />
<keyboard-layout android:name="keyboard_layout_hungarian"
android:label="@string/keyboard_layout_hungarian"
- android:kcm="@raw/keyboard_layout_hungarian" />
+ android:keyboardLayout="@raw/keyboard_layout_hungarian" />
<keyboard-layout android:name="keyboard_layout_icelandic"
android:label="@string/keyboard_layout_icelandic"
- android:kcm="@raw/keyboard_layout_icelandic" />
+ android:keyboardLayout="@raw/keyboard_layout_icelandic" />
<keyboard-layout android:name="keyboard_layout_portuguese"
android:label="@string/keyboard_layout_portuguese"
- android:kcm="@raw/keyboard_layout_portuguese" />
+ android:keyboardLayout="@raw/keyboard_layout_portuguese" />
<keyboard-layout android:name="keyboard_layout_slovak"
android:label="@string/keyboard_layout_slovak"
- android:kcm="@raw/keyboard_layout_slovak" />
+ android:keyboardLayout="@raw/keyboard_layout_slovak" />
<keyboard-layout android:name="keyboard_layout_slovenian"
android:label="@string/keyboard_layout_slovenian"
- android:kcm="@raw/keyboard_layout_croatian_and_slovenian" />
+ android:keyboardLayout="@raw/keyboard_layout_croatian_and_slovenian" />
<keyboard-layout android:name="keyboard_layout_turkish"
android:label="@string/keyboard_layout_turkish"
- android:kcm="@raw/keyboard_layout_turkish" />
+ android:keyboardLayout="@raw/keyboard_layout_turkish" />
<keyboard-layout android:name="keyboard_layout_ukrainian"
android:label="@string/keyboard_layout_ukrainian"
- android:kcm="@raw/keyboard_layout_ukrainian" />
+ android:keyboardLayout="@raw/keyboard_layout_ukrainian" />
</keyboard-layouts>
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java
index 299649d..9e94b52 100644
--- a/services/java/com/android/server/input/InputManagerService.java
+++ b/services/java/com/android/server/input/InputManagerService.java
@@ -597,7 +597,7 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
visitAllKeyboardLayouts(new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
list.add(new KeyboardLayout(descriptor, label));
}
});
@@ -614,7 +614,7 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
visitKeyboardLayout(keyboardLayoutDescriptor, new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
result[0] = new KeyboardLayout(descriptor, label);
}
});
@@ -683,10 +683,11 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
com.android.internal.R.styleable.KeyboardLayout_name);
String label = a.getString(
com.android.internal.R.styleable.KeyboardLayout_label);
- int kcmResId = a.getResourceId(
- com.android.internal.R.styleable.KeyboardLayout_kcm, 0);
- if (name == null || label == null || kcmResId == 0) {
- Log.w(TAG, "Missing required 'name', 'label' or 'kcm' "
+ int keyboardLayoutResId = a.getResourceId(
+ com.android.internal.R.styleable.KeyboardLayout_keyboardLayout,
+ 0);
+ if (name == null || label == null || keyboardLayoutResId == 0) {
+ Log.w(TAG, "Missing required 'name', 'label' or 'keyboardLayout' "
+ "attributes in keyboard layout "
+ "resource from receiver "
+ receiver.packageName + "/" + receiver.name);
@@ -695,7 +696,7 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
receiver.packageName, receiver.name, name);
if (keyboardName == null || name.equals(keyboardName)) {
visitor.visitKeyboardLayout(resources, descriptor,
- label, kcmResId);
+ label, keyboardLayoutResId);
}
}
} finally {
@@ -1138,11 +1139,11 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
visitKeyboardLayout(keyboardLayoutDescriptor, new KeyboardLayoutVisitor() {
@Override
public void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId) {
+ String descriptor, String label, int keyboardLayoutResId) {
try {
result[0] = descriptor;
result[1] = Streams.readFully(new InputStreamReader(
- resources.openRawResource(kcmResId)));
+ resources.openRawResource(keyboardLayoutResId)));
} catch (IOException ex) {
} catch (NotFoundException ex) {
}
@@ -1261,7 +1262,7 @@ public class InputManagerService extends IInputManager.Stub implements Watchdog.
private interface KeyboardLayoutVisitor {
void visitKeyboardLayout(Resources resources,
- String descriptor, String label, int kcmResId);
+ String descriptor, String label, int keyboardLayoutResId);
}
private final class InputDevicesChangedListenerRecord implements DeathRecipient {