-
Notifications
You must be signed in to change notification settings - Fork 616
Patch caching fid in memory on successful registration. #1764
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
Conversation
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (fa0ffc01) is created by Prow via merging commits: 0ce007a 85910e3. |
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (fa0ffc01) is created by Prow via merging commits: 0ce007a 85910e3. |
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.
As for the multi-threading with the tasks, executors, and listeners my understanding is limited, unfortunately. :/
firebase-installations/src/main/java/com/google/firebase/installations/GetIdListener.java
Show resolved
Hide resolved
firebase-installations/src/main/java/com/google/firebase/installations/GetIdListener.java
Show resolved
Hide resolved
@@ -322,7 +341,8 @@ private String doGetId() { | |||
* @param forceRefresh true if this is for a getAuthToken call and if the caller wants to fetch a | |||
* new auth token from the server even if an unexpired auth token exists on the client. | |||
*/ | |||
private void doGetAuthToken(boolean forceRefresh) { | |||
private final void doRegistrationInternal(boolean forceRefresh) { |
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.
The way I read the code this does not only do "registration", but also auth token refresh.
Thus, I think the new name is misleading.
How about something that describes what is happening?
Here is a suggestion, maybe you have a better idea.
getLocalDataOrSendRequestToFirebaseInstallationsApi()
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.
As a related question: Where do you decide which request to actually send, i.e. #CreateInstallation ("registration") or #GenerateAuthToken ("refresh")?
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.
In the below method called doNetworkCallIfNecessary
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.
changed it to doRegistrationOrRefresh.
...ase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java
Outdated
Show resolved
Hide resolved
...ase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java
Outdated
Show resolved
Hide resolved
...ase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java
Outdated
Show resolved
Hide resolved
No worries :) Fred reviewed those changes in another PR #1767 |
Also, updating caching FID logic due to the reverted PR.