Skip to content

Commit

Permalink
Removing FacebookActivity and adding UiLifecycleHelper
Browse files Browse the repository at this point in the history
Summary: Removing FacebookActivity and adding a UiLifecycleHelper instead to keep track of the active Session.

Test Plan: Tested all sample apps and ran unit tests.

Reviewers: mmarucheck, clang

Reviewed By: mmarucheck

CC: msdkexp@, subodh

Differential Revision: https://phabricator.fb.com/D649877

Task ID: 1940439
  • Loading branch information
mingflifb committed Dec 7, 2012
1 parent 77bfe46 commit 4484f89
Show file tree
Hide file tree
Showing 9 changed files with 347 additions and 433 deletions.
347 changes: 0 additions & 347 deletions facebook/src/com/facebook/FacebookActivity.java

This file was deleted.

3 changes: 1 addition & 2 deletions facebook/src/com/facebook/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public class Session implements Serializable {
private static final String AUTH_BUNDLE_SAVE_KEY = "com.facebook.sdk.Session.authBundleKey";
private static final String PUBLISH_PERMISSION_PREFIX = "publish";
private static final String MANAGE_PERMISSION_PREFIX = "manage";
private static final String APP_ID_BUNDLE_KEY = "app_id";

@SuppressWarnings("serial")
private static final Set<String> OTHER_PUBLISH_PERMISSIONS = new HashSet<String>() {{
Expand Down Expand Up @@ -754,7 +753,7 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException
* @param bundle the Bundle to save the Session to
*/
public static final void saveSession(Session session, Bundle bundle) {
if (bundle != null && session != null) {
if (bundle != null && session != null && !bundle.containsKey(SESSION_BUNDLE_SAVE_KEY)) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
new ObjectOutputStream(outputStream).writeObject(session);
Expand Down
Loading

0 comments on commit 4484f89

Please sign in to comment.