Exemplo n.º 1
0
  public void saveInstanceState(Bundle outState) {
    ArrayList<String> callIds = new ArrayList<String>(pendingCallMap.keySet());
    outState.putStringArrayList(CALL_ID_ARRAY_KEY, callIds);

    for (FacebookDialog.PendingCall pendingCall : pendingCallMap.values()) {
      String stateKey = getSavedStateKeyForPendingCallId(pendingCall.getCallId().toString());
      outState.putParcelable(stateKey, pendingCall);
    }
  }
Exemplo n.º 2
0
  public void restoreFromSavedInstanceState(Bundle savedInstanceState) {
    ArrayList<String> callIds = savedInstanceState.getStringArrayList(CALL_ID_ARRAY_KEY);
    if (callIds != null) {
      for (String callId : callIds) {
        String stateKey = getSavedStateKeyForPendingCallId(callId);
        FacebookDialog.PendingCall pendingCall = savedInstanceState.getParcelable(stateKey);

        if (pendingCall != null) {
          pendingCallMap.put(pendingCall.getCallId().toString(), pendingCall);
        }
      }
    }
  }
Exemplo n.º 3
0
 public void trackPendingCall(FacebookDialog.PendingCall pendingCall) {
   if (pendingCall != null) {
     pendingCallMap.put(pendingCall.getCallId().toString(), pendingCall);
   }
 }