[X] This issue is not security related and can safely be disclosed publicly on GitHub
Java version
1.8.0.291
Android version
API 28, Android 9
Android SDK version
16.1.3
Installation platform & version
Gradle
Package
Core & AppEvents
Goals
Init facebook SDK manually
Expected results
Facebook SDK should be initialized
Actual results
Facebook skip initialization because of the method initializeIfNotInitialized() in UserSettingsManager class. Looks like the first condition should be the opposite. Now we return from this method when Facebook is not initialized.
private fun initializeIfNotInitialized() {
if (!FacebookSdk.isInitialized()) {
return
}
if (!isInitialized.compareAndSet(false, true)) {
return
}
userSettingPref =
FacebookSdk.getApplicationContext()
.getSharedPreferences(USER_SETTINGS, Context.MODE_PRIVATE)
initializeUserSetting(autoLogAppEventsEnabled, advertiserIDCollectionEnabled, autoInitEnabled)
initializeCodelessSetupEnabledAsync()
logWarnings()
logIfSDKSettingsChanged()
}
Checklist before submitting a bug report
Java version
1.8.0.291
Android version
API 28, Android 9
Android SDK version
16.1.3
Installation platform & version
Gradle
Package
Core & AppEvents
Goals
Init facebook SDK manually
Expected results
Facebook SDK should be initialized
Actual results
Facebook skip initialization because of the method initializeIfNotInitialized() in UserSettingsManager class. Looks like the first condition should be the opposite. Now we return from this method when Facebook is not initialized.
Steps to reproduce
Code samples & details