예제 #1
0
 @Override
 public void onContentTransferred(ContactId contact, Geoloc geoloc, boolean initiatedByRemote) {
   if (sLogger.isActivated()) {
     sLogger.debug("Geoloc transferred.");
   }
   synchronized (mLock) {
     mGeolocSharingService.removeGeolocSharing(mSharingId);
     if (initiatedByRemote) {
       if (RichCallHistory.getInstance().setGeolocSharingTransferred(mSharingId, geoloc)) {
         mBroadcaster.broadcastStateChanged(
             contact, mSharingId, State.TRANSFERRED, ReasonCode.UNSPECIFIED);
       }
     } else {
       if (mPersistentStorage.setStateAndReasonCode(State.TRANSFERRED, ReasonCode.UNSPECIFIED)) {
         mBroadcaster.broadcastStateChanged(
             contact, mSharingId, State.TRANSFERRED, ReasonCode.UNSPECIFIED);
       }
     }
   }
 }
예제 #2
0
 private void setStateAndReasonCode(ContactId contact, State state, ReasonCode reasonCode) {
   if (mPersistentStorage.setStateAndReasonCode(state, reasonCode)) {
     mBroadcaster.broadcastStateChanged(contact, mSharingId, state, reasonCode);
   }
 }