Last active
August 29, 2015 14:20
-
-
Save kmdupr33/5e06819aec1694453ff3 to your computer and use it in GitHub Desktop.
Showing injected dependencies and onStop()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SessionDetailViewPresenter implements RepositoryManagerCallbacks { | |
public SessionDetailViewPresenter(SessionDetailView sessionDetailView, | |
RepositoryManager loaderManager, | |
ServiceStarter serviceStarter, | |
long calendarId | |
) { | |
mSessionDetailView = sessionDetailView; | |
mLoaderManager = loaderManager; | |
mServiceStarter = serviceStarter; | |
mCalendarId = calendarId; | |
} | |
//... | |
public void onViewTranslatorStopped() { | |
if (mInitStarred != mStarred) { | |
if (System.currentTimeMillis() < mSessionStart) { | |
CalendarSession calendarSession = new CalendarSession(mSessionUri, mSessionStart, mSessionEnd, mTitleString, mRoomName); | |
if (mStarred) { | |
mServiceStarter.startAddCalendarSessionService(mCalendarId, calendarSession); | |
} else { | |
mServiceStarter.startRemoveCalendarSessionService(mCalendarId, calendarSession); | |
} | |
} | |
if (mStarred) { | |
setupSessionNotification(); | |
} | |
} | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment