-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the state machine of updating custom installation id in the local cache and update to Firebase Segmentation backend. #545
Conversation
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
cache and update to Firebase Segmentation backend. CL also contains unit tests. (The http client is not implemented yet.)
…k into arete-floc
This is a pretty large PR, but the key part is just FirebaseSegmentation.java which needs a close review. |
/retest |
/retest |
@@ -55,7 +79,161 @@ public static FirebaseSegmentation getInstance(@NonNull FirebaseApp app) { | |||
return app.get(FirebaseSegmentation.class); | |||
} | |||
|
|||
Task<Void> setCustomInstallationId(String customInstallationId) { | |||
return Tasks.forResult(null); | |||
Task<Void> setCustomInstallationId(@Nullable String customInstallationId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the return type be @NonNull public Task<Void>
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what are the thread-safety/concurrency requirements for this method(including the ones it calls)? I looks like multiple calls to this from different threads could lead to races
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Yes, definitely it should be nonnull public
-
Change it to be synchronized
firebase-segmentation/src/main/java/com/google/firebase/segmentation/FirebaseSegmentation.java
Show resolved
Hide resolved
…k into arete-floc
Close review needed for FirebaseSegmentation.java
CL also contains unit tests.
The http client is not implemented yet.