Skip to content

Commit

Permalink
Android: fix cookies lost on Android 5.0 and above (#19770)
Browse files Browse the repository at this point in the history
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: #19770

Differential Revision: D10114102

Pulled By: hramos

fbshipit-source-id: 5b4766f02f70541fd46ac5db36f1179fe386ac7a
  • Loading branch information
chenwenyu authored and facebook-github-bot committed Sep 28, 2018
1 parent af181fb commit ea53727
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public void run() {
for (String cookie : cookies) {
addCookieAsync(url, cookie);
}
getCookieManager().flush();
mCookieSaver.onCookiesModified();
}
}
Expand Down

0 comments on commit ea53727

Please sign in to comment.