-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.snowplowanalytics.snowplow; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
AlexBenny
Author
Contributor
|
||
|
||
public interface ScreenStatePreviousFields { | ||
String getPreviousId(); | ||
String getPreviousName(); | ||
String getPreviousType(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,11 +211,18 @@ protected ScreenView(Builder<?> builder) { | |
/** | ||
* Update the passed screen state with the data related to | ||
* the current ScreenView event. | ||
* @apiNote ScreenState updates back the previous screen fields | ||
* in the ScreenView event (if `previousId` not already set). | ||
* @param screenState The screen state to update. | ||
*/ | ||
public void updateScreenState(ScreenState screenState) { | ||
public synchronized void updateScreenState(ScreenState screenState) { | ||
This comment has been minimized.
Sorry, something went wrong.
paulboocock
Contributor
|
||
if (screenState == null) return; | ||
screenState.updateScreenState(id, name, type, transitionType, fragmentClassName, fragmentTag, activityClassName, activityTag); | ||
if (previousId == null) { | ||
previousId = screenState.getPreviousId(); | ||
previousName = screenState.getPreviousName(); | ||
previousType = screenState.getPreviousType(); | ||
} | ||
} | ||
|
||
/** | ||
|
Shouldn't this file be in a folder? It's at the
snowplow
root folder at the moment. Probably should be in theevents
folder?