Kanzi 4.1.2 migration guide¶
Use this migration guide to update Kanzi applications from Kanzi 4.1.1 to Kanzi 4.1.2.
Do not reorder property storages through the property storage iterators¶
Do not use the iterators that PropertyObject::beginPropertyStorage and PropertyObject::endPropertyStorage return to replace, swap, or reorder property storages. PropertyObject now keeps the property type descriptors of its storages in a separate array in the same order, to find a storage without reading each one. After such a change, a property lookup can return the storage of a different property, which results in undefined behavior.
The separate array also changes the size of PropertyObject and of every class that derives from it. Rebuild your Kanzi Engine plugins and applications against Kanzi 4.1.2.
Client views connect to the Kanzi Android Service only while they are attached to a window¶
A KanziServiceSurfaceView, KanziServiceTextureView, or KanziServiceComposable client view now connects to the Kanzi Android Service when it attaches to a window, and disconnects when it detaches. For example, a client view detaches when you remove it from its window, swap its fragment, scroll it out of a ViewPager, RecyclerView, or LazyColumn, or navigate away from its composable.
A client view that you create in code connects when it attaches to a window, not when you call
KanziServiceSurfaceView.connectorKanziServiceTextureView.connect. If you callconnecton a view that is not attached to a window,onServiceConnectedfires only after the view attaches.The client drops the calls that you make while its client view is detached, such as
pushDataInt. Before, these calls reached the Kanzi Android Service host. The Kanzi Android Service host keeps the data that you pushed before the client view detached. InKanziServiceClientListener.onServiceConnected, push the data that changed while the client view was detached.onServiceConnectedfires again each time the client view attaches to a window.KanziServiceSurfaceView.connectandKanziServiceTextureView.connectthrowIllegalStateExceptioninstead ofAssertionErrorwhen you call them again for the same client view. A client view that you inflate from XML with theserviceHostPackageattribute has already calledconnect.