Commit 8672df9
feat: spec2go — generate struct fields and marshal/unmarshal from JavaWireFormat
Bare AIDL parcelables (like android.location.Location) are declared
without fields in AIDL but have wire format extracted from Java
writeToParcel(). Generate Go struct fields and serialization code
from this wire format data.
Key changes:
- parser.ParcelableDecl gains a JavaWireFormat field for wire layout
- spec2go synthesizes FieldDecl entries from JavaWireFormat when a
parcelable has no AIDL-defined fields
- codegen generates custom MarshalParcel/UnmarshalParcel that handle
conditional fields (bitmask guards) and opaque field skipping
- Fields with invalid names, unresolvable conditions, or unknown
types are treated as opaque and skipped
- Duplicate field names are deduplicated with numeric suffixes
- Java string constants (e.g. LocationProvider) are now generated
as typed Go constants1 parent ba05ba5 commit 8672df9
941 files changed
Lines changed: 69936 additions & 110 deletions
File tree
- android
- accessibilityservice
- types
- accounts
- apphibernation
- appwidget
- app
- admin
- ambientcontext
- assist
- backup
- blob
- contentsuggestions
- job
- ondeviceintelligence
- people
- pinner
- prediction
- search
- servertransaction
- slice
- smartspace
- timedetector
- timezonedetector
- time
- types
- usage
- wallpapereffectsgeneration
- companion
- virtual
- camera
- sensor
- content
- integrity
- om
- pm
- permission
- types
- verify/domain
- res
- types
- rollback
- types
- credentials
- flags
- graphics
- drawable
- fonts
- hardware
- biometrics
- camera2
- impl
- params
- utils
- devicestate
- display
- face
- fingerprint
- hdmi
- input
- lights
- location
- radio
- soundtrigger
- usb
- location
- provider
- types
- media
- audiopolicy
- metrics
- midi
- musicrecognition
- projection
- session
- tv
- ad
- interactive
- types
- net
- vcn
- nfc
- cardemulation
- os
- connectivity
- storage
- types
- permission
- printservice
- recommendation
- print
- types
- security
- attestationverification
- keymaster
- keystore
- recovery
- service
- ambientcontext
- assist/classification
- autofill
- carrier
- chooser
- contentcapture
- controls
- actions
- templates
- credentials
- displayhash
- euicc
- games
- notification
- quickaccesswallet
- quicksettings
- resolver
- rotationresolver
- settings/suggestions
- timezone
- trust
- voice
- types
- speech
- tts
- telecom
- telephony
- cdma
- data
- emergency
- euicc
- gba
- ims
- feature
- stub
- mbms
- satellite
- text
- util
- view
- accessibility
- autofill
- types
- contentcapture
- displayhash
- inputmethod
- textclassifier
- textservice
- translation
- types
- types
- webkit
- widget
- inline
- window
- com/android
- ims
- internal_/uce
- common
- options
- presence
- internal_
- app
- procstats
- compat
- content
- infra
- inputmethod
- net
- os
- statusbar
- telephony
- util
- view
- widget
- tools
- cmd/spec2go
- pkg
- codegen
- parser
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 265 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments