code: public static final Session restoreSession(
              Context context, TokenCachingStrategy cachingStrategy, StatusCallback callback, Bundle bundle) {
          if (bundle == null) {
              return null;
          }
          byte[] data = bundle.getByteArray(SESSION_BUNDLE_SAVE_KEY);
          if (data != null) {
              ByteArrayInputStream is = new ByteArrayInputStream(data);
              try {
                  Session session = (Session) (new ObjectInputStream(is)).readObject();
                  initializeStaticContext(context);
                  if (cachingStrategy != null) {
                      session.tokenCachingStrategy = cachingStrategy;
                  } else {
                      session.tokenCachingStrategy = new SharedPreferencesTokenCachingStrategy(context);
                  }
                  if (callback != null) {
                      session.addCallback(callback);
                  }
                  session.authorizationBundle = bundle.getBundle(AUTH_BUNDLE_SAVE_KEY);
                  return session;
              } catch (ClassNotFoundException e) {
                  Log.w(TAG, "Unable to restore session", e);
              } catch (IOException e) {
                  Log.w(TAG, "Unable to restore session.", e);
              }
          }
          return null;
      }
docs: Restores the saved session from a Bundle, if any. Returns the restored Session or
  null if it could not be restored. This method is intended to be called from an Activity or Fragment's
  onCreate method when a Session has previously been saved into a Bundle via saveState to preserve a Session
  across Activity lifecycle events.
  
  @param context         the Activity or Service creating the Session, must not be null
  @param cachingStrategy the TokenCachingStrategy to use to load and store the token. If this is
  null, a default token cachingStrategy that stores data in
  SharedPreferences will be used
  @param callback        the callback to notify for Session state changes, can be null
  @param bundle          the bundle to restore the Session from
  @return the restored Session, or null