File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ export function serialize(data: any, wrapPrimitives: boolean = false): any {
103103 return store ;
104104 }
105105
106+ if ( data . native ) {
107+ return data . native ;
108+ }
109+
106110 store = new java . util . HashMap ( ) ;
107111 Object . keys ( data ) . forEach ( ( key ) => store . put ( key , serialize ( data [ key ] ) ) ) ;
108112 console . log ( store . toString ( ) ) ;
@@ -146,6 +150,7 @@ export function deserialize(data: any): any {
146150 return data ;
147151 }
148152 let store ;
153+
149154 switch ( data . getClass ( ) . getName ( ) ) {
150155 case 'java.lang.String' : {
151156 return String ( data ) ;
@@ -155,6 +160,7 @@ export function deserialize(data: any): any {
155160 return String ( data ) === 'true' ;
156161 }
157162
163+ case 'java.lang.Float' :
158164 case 'java.lang.Integer' :
159165 case 'java.lang.Long' :
160166 case 'java.lang.Double' :
@@ -178,6 +184,17 @@ export function deserialize(data: any): any {
178184 }
179185 break ;
180186 }
187+
188+ case 'androidx.collection.SimpleArrayMap' : {
189+ const count = data . size ( ) ;
190+ for ( let l = 0 ; l < count ; l ++ ) {
191+ const key = data . keyAt ( l ) ;
192+ store [ key ] = deserialize ( data . get ( key ) ) ;
193+ }
194+ break ;
195+ }
196+
197+ case 'androidx.collection.ArrayMap' :
181198 case 'android.os.Bundle' :
182199 case 'java.util.HashMap' :
183200 case 'java.util.Map' : {
You can’t perform that action at this time.
0 commit comments