@@ -40,8 +40,10 @@ public final class App implements JsonUnknown, JsonSerializable {
4040 private @ Nullable String appBuild ;
4141 /** Application permissions in the form of "permission_name" : "granted|not_granted" */
4242 private @ Nullable Map <String , String > permissions ;
43- /** The list of the visibile UI screens * */
43+ /** The list of the visible UI screens * */
4444 private @ Nullable List <String > viewNames ;
45+ /** the app start type */
46+ private @ Nullable String startType ;
4547 /**
4648 * A flag indicating whether the app is in foreground or not. An app is in foreground when it's
4749 * visible to the user.
@@ -61,6 +63,7 @@ public App() {}
6163 this .permissions = CollectionUtils .newConcurrentHashMap (app .permissions );
6264 this .inForeground = app .inForeground ;
6365 this .viewNames = CollectionUtils .newArrayList (app .viewNames );
66+ this .startType = app .startType ;
6467 this .unknown = CollectionUtils .newConcurrentHashMap (app .unknown );
6568 }
6669
@@ -151,6 +154,15 @@ public void setViewNames(final @Nullable List<String> viewNames) {
151154 this .viewNames = viewNames ;
152155 }
153156
157+ @ Nullable
158+ public String getStartType () {
159+ return startType ;
160+ }
161+
162+ public void setStartType (final @ Nullable String startType ) {
163+ this .startType = startType ;
164+ }
165+
154166 @ Override
155167 public boolean equals (Object o ) {
156168 if (this == o ) return true ;
@@ -165,7 +177,8 @@ public boolean equals(Object o) {
165177 && Objects .equals (appBuild , app .appBuild )
166178 && Objects .equals (permissions , app .permissions )
167179 && Objects .equals (inForeground , app .inForeground )
168- && Objects .equals (viewNames , app .viewNames );
180+ && Objects .equals (viewNames , app .viewNames )
181+ && Objects .equals (startType , app .startType );
169182 }
170183
171184 @ Override
@@ -180,7 +193,8 @@ public int hashCode() {
180193 appBuild ,
181194 permissions ,
182195 inForeground ,
183- viewNames );
196+ viewNames ,
197+ startType );
184198 }
185199
186200 // region json
@@ -207,6 +221,7 @@ public static final class JsonKeys {
207221 public static final String APP_PERMISSIONS = "permissions" ;
208222 public static final String IN_FOREGROUND = "in_foreground" ;
209223 public static final String VIEW_NAMES = "view_names" ;
224+ public static final String START_TYPE = "start_type" ;
210225 }
211226
212227 @ Override
@@ -243,6 +258,9 @@ public void serialize(final @NotNull ObjectWriter writer, final @NotNull ILogger
243258 if (viewNames != null ) {
244259 writer .name (JsonKeys .VIEW_NAMES ).value (logger , viewNames );
245260 }
261+ if (startType != null ) {
262+ writer .name (JsonKeys .START_TYPE ).value (startType );
263+ }
246264 if (unknown != null ) {
247265 for (String key : unknown .keySet ()) {
248266 Object value = unknown .get (key );
@@ -298,6 +316,9 @@ public static final class Deserializer implements JsonDeserializer<App> {
298316 app .setViewNames (viewNames );
299317 }
300318 break ;
319+ case JsonKeys .START_TYPE :
320+ app .startType = reader .nextStringOrNull ();
321+ break ;
301322 default :
302323 if (unknown == null ) {
303324 unknown = new ConcurrentHashMap <>();
0 commit comments