summaryrefslogtreecommitdiff
path: root/tools/codegen/src
diff options
context:
space:
mode:
authorEugene Susla <eugenesusla@google.com>2021-03-23 16:05:17 -0700
committerEugene Susla <eugenesusla@google.com>2021-03-23 16:20:22 -0700
commit1f37e7a8314bb6959182c863e2e001b61faaa02c (patch)
tree9527d181b7cd0eaad36451f9e1f6bb93145c844b /tools/codegen/src
parent9eaba911ec0d48ba5aed06c6892c566e7f57d214 (diff)
Fix IBinder parcelling
Fixes: 183547536 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ifffac8c560a8e2e9e0543d523738ad529af633e9
Diffstat (limited to 'tools/codegen/src')
-rw-r--r--tools/codegen/src/com/android/codegen/FieldInfo.kt3
-rw-r--r--tools/codegen/src/com/android/codegen/SharedConstants.kt2
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/codegen/src/com/android/codegen/FieldInfo.kt b/tools/codegen/src/com/android/codegen/FieldInfo.kt
index 02ebaef90f0b..74392ddc30e6 100644
--- a/tools/codegen/src/com/android/codegen/FieldInfo.kt
+++ b/tools/codegen/src/com/android/codegen/FieldInfo.kt
@@ -220,11 +220,12 @@ data class FieldInfo(
isBinder(FieldInnerType!!) -> "BinderList"
else -> "ParcelableList"
}
+ isStrongBinder(Type) -> "StrongBinder"
isIInterface(Type) -> "StrongInterface"
- isBinder(Type) -> "StrongBinder"
else -> "TypedObject"
}.capitalize()
+ private fun isStrongBinder(type: String) = type == "Binder" || type == "IBinder"
private fun isBinder(type: String) = type == "Binder" || type == "IBinder" || isIInterface(type)
private fun isIInterface(type: String) = type.length >= 2 && type[0] == 'I' && type[1].isUpperCase()
} \ No newline at end of file
diff --git a/tools/codegen/src/com/android/codegen/SharedConstants.kt b/tools/codegen/src/com/android/codegen/SharedConstants.kt
index d9ad649782bb..4da401951470 100644
--- a/tools/codegen/src/com/android/codegen/SharedConstants.kt
+++ b/tools/codegen/src/com/android/codegen/SharedConstants.kt
@@ -1,7 +1,7 @@
package com.android.codegen
const val CODEGEN_NAME = "codegen"
-const val CODEGEN_VERSION = "1.0.22"
+const val CODEGEN_VERSION = "1.0.23"
const val CANONICAL_BUILDER_CLASS = "Builder"
const val BASE_BUILDER_CLASS = "BaseBuilder"