Skip to content

Commit ea53727

Browse files
chenwenyufacebook-github-bot
authored andcommitted
Android: fix cookies lost on Android 5.0 and above (facebook#19770)
Summary: This fixes cookie missing bug on Android 5.0 and above. On Android 5.0 and above, after the app successfully obtains the cookie, you kills the App within 30 seconds and restarts the App. It accesses the interface that needs to carry the cookie and finds that the cookie does not exist. Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior. Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior. [ANDROID] [BUGFIX] [Cookie] - Fix cookies lost on Android 5.0 and above Pull Request resolved: facebook#19770 Differential Revision: D10114102 Pulled By: hramos fbshipit-source-id: 5b4766f02f70541fd46ac5db36f1179fe386ac7a
1 parent af181fb commit ea53727

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/modules/network/ForwardingCookieHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public void run() {
129129
for (String cookie : cookies) {
130130
addCookieAsync(url, cookie);
131131
}
132+
getCookieManager().flush();
132133
mCookieSaver.onCookiesModified();
133134
}
134135
}

0 commit comments

Comments
 (0)