summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Ole Lauridsen <jlauridsen@google.com>2023-05-04 14:51:19 -0700
committerJens Ole Lauridsen <jlauridsen@google.com>2023-05-04 23:18:36 +0000
commit831c25e7dff2656172662af1ec42983276e84442 (patch)
tree378b07053bfea985b2591929c095529b94d5cf49
parent0e3878b87663eafd744ea67388ce78e43f4b3073 (diff)
downloadbase-831c25e7dff2656172662af1ec42983276e84442.tar.gz
Fix grammaticalGender handling in the Layout Inspector
A field named grammaticalGender was in fake-android. The real android has a Java "getGrammaticalGender" function. The byte code for calling that method is different from accessing a field with the same name. This caused Android U apps to crash when using the Layout Inspector. Fix this. Fixes: 280847078 Test: N/A Change-Id: Ibb9fd1fb2230e1a1b1c0cfc633d26813a7683ca9 (cherry picked from commit 1ec5103d4ddeeee4f5311a5c5f237c1eefa828b6)
-rw-r--r--dynamic-layout-inspector/agent/appinspection/fake-android/src/android/content/res/Configuration.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/dynamic-layout-inspector/agent/appinspection/fake-android/src/android/content/res/Configuration.java b/dynamic-layout-inspector/agent/appinspection/fake-android/src/android/content/res/Configuration.java
index 8c4513cf55..31a9f4f28d 100644
--- a/dynamic-layout-inspector/agent/appinspection/fake-android/src/android/content/res/Configuration.java
+++ b/dynamic-layout-inspector/agent/appinspection/fake-android/src/android/content/res/Configuration.java
@@ -38,7 +38,11 @@ public final class Configuration {
public int orientation = 0;
public int screenWidthDp = 0;
public int screenHeightDp = 0;
- public int grammaticalGender = 0;
+ public int grammaticalGenderField = 0;
+
+ public int getGrammaticalGender() {
+ return grammaticalGenderField;
+ }
public final LocaleList getLocales() {
return mLocales;