File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
firebase-segmentation/src/main/java/com/google/firebase/segmentation Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ public static FirebaseSegmentation getInstance(@NonNull FirebaseApp app) {
79
79
return app .get (FirebaseSegmentation .class );
80
80
}
81
81
82
- Task <Void > setCustomInstallationId (@ Nullable String customInstallationId ) {
82
+ @ NonNull
83
+ public synchronized Task <Void > setCustomInstallationId (@ Nullable String customInstallationId ) {
83
84
if (customInstallationId == null ) {
84
85
return clearCustomInstallationId ();
85
86
}
Original file line number Diff line number Diff line change @@ -101,13 +101,7 @@ private String getSharedPreferencesKey(String key) {
101
101
102
102
private Task <Boolean > commitSharedPreferencesEditAsync (SharedPreferences .Editor editor ) {
103
103
TaskCompletionSource <Boolean > result = new TaskCompletionSource <>();
104
- ioExecuter .execute (
105
- new Runnable () {
106
- @ Override
107
- public void run () {
108
- result .setResult (editor .commit ());
109
- }
110
- });
104
+ ioExecuter .execute (() -> result .setResult (editor .commit ()));
111
105
return result .getTask ();
112
106
}
113
107
}
You can’t perform that action at this time.
0 commit comments