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 void onViewTranslatorStopped() { | |
if (mInitStarred != mStarred) { | |
if (System.currentTimeMillis() < mSessionStart) { | |
CalendarSession calendarSession = new CalendarSession(mSessionUri, mSessionStart, mSessionEnd, mTitleString, mRoomName); | |
if (mStarred) { |
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 LaunchActivityTest | |
extends ActivityUnitTestCase<LaunchActivity> { | |
... | |
@Override | |
protected void setUp() throws Exception { | |
super.setUp(); | |
mLaunchIntent = new Intent(getInstrumentation() | |
.getTargetContext(), LaunchActivity.class); | |
startActivity(mLaunchIntent, null, null); |
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
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.CoreMatchers.*; | |
import static org.mockito.Mockito.*; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.Mock; | |
import org.mockito.runners.MockitoJUnitRunner; | |
import android.content.SharedPreferences; | |
@RunWith(MockitoJUnitRunner.class) |
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 TagPresenter { | |
private final SessionTagViewTranslator mSessionTagViewTranslator; | |
private final SessionDetailActivity mSessionDetailActivity; | |
public TagPresenter(SessionTagViewTranslator sessionTagViewTranslator, | |
SessionDetailActivity sessionDetailActivity) { | |
mSessionTagViewTranslator = sessionTagViewTranslator; | |
mSessionDetailActivity = sessionDetailActivity; |
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 RecyclerView { | |
private void setAdapterInternal(Adapter adapter, boolean compatibleWithPrevious, | |
boolean removeAndRecycleViews) { | |
if (mAdapter != null) { | |
mAdapter.unregisterAdapterDataObserver(mObserver); | |
} | |
//... | |
mAdapter = adapter; | |
if (adapter != null) { | |
//mObserver responds to changes in the Adapter's data by helping the RecyclerView redraw itself appropriately. |
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 interface Iterator<E> { | |
boolean hasNext(); | |
E next(); //if there's an error we throw an exception | |
} |
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
private class ArrayFilter extends Filter { | |
@Override | |
protected FilterResults performFiltering(CharSequence prefix) { | |
FilterResults results = new FilterResults(); | |
if (prefix == null || prefix.length() == 0) { | |
ArrayList<T> list; | |
synchronized (mLock) { | |
list = new ArrayList<T>(mOriginalValues); | |
} |