Java Code Examples for android.support.annotation.VisibleForTesting

The following are top voted examples for showing how to use android.support.annotation.VisibleForTesting. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: shoebill   File: ShoebillProcessor.java   View source code 6 votes vote down vote up
private MethodSpec getSingletonSetterMethod(ClassName className, FieldSpec singletonField) {
    ParameterSpec parameter = ParameterSpec
            .builder(className, "wrapper")
            .build();

    AnnotationSpec visibleForTesting = AnnotationSpec
            .builder(VisibleForTesting.class)
            .addMember("otherwise", "VisibleForTesting.NONE")
            .build();

    return MethodSpec
            .methodBuilder("setInstance")
            .addAnnotation(visibleForTesting)
            .addModifiers(Modifier.PUBLIC, Modifier.STATIC)
            .addParameter(parameter)
            .addStatement("$N = $N", singletonField, parameter)
            .build();
}
 
Example 2
Project: q-mail   File: MessagingController.java   View source code 6 votes vote down vote up
@VisibleForTesting
MessagingController(Context context, NotificationController notificationController,
        Contacts contacts, TransportProvider transportProvider) {
    this.context = context;
    this.notificationController = notificationController;
    this.contacts = contacts;
    this.transportProvider = transportProvider;

    controllerThread = new Thread(new Runnable() {
        @Override
        public void run() {
            runInBackground();
        }
    });
    controllerThread.setName("MessagingController");
    controllerThread.start();
    addListener(memorizingMessagingListener);
}
 
Example 3
Project: silly-android   File: AnnotationParser.java   View source code 6 votes vote down vote up
/**
 * Returns all fields from the given class, including its superclass fields. If cached fields are available, they will be used; instead, a new list will
 * be saved to the cache.
 *
 * @param classInstance Which class to look into
 * @return A list of declared class' fields. Do not modify this instance
 */
@NonNull
@VisibleForTesting
static List<Field> getAllFields(@NonNull final Class<?> classInstance) {
    Class<?> parsedClass = classInstance;
    final String name = parsedClass.getName();
    List<Field> allFields = FIELD_CACHE.get(name);
    if (allFields == null || allFields.isEmpty()) {
        allFields = new LinkedList<>();
        while (parsedClass != null && parsedClass != Object.class) {
            allFields.addAll(Arrays.asList(parsedClass.getDeclaredFields()));
            parsedClass = parsedClass.getSuperclass();
        }
        FIELD_CACHE.put(name, allFields);
    }
    return allFields;
}
 
Example 4
Project: PeSanKita-android   File: AttachmentDatabase.java   View source code 6 votes vote down vote up
@VisibleForTesting
protected void updateAttachmentThumbnail(MasterSecret masterSecret, AttachmentId attachmentId, InputStream in, float aspectRatio)
    throws MmsException
{
  Log.w(TAG, "updating part thumbnail for #" + attachmentId);

  Pair<File, Long> thumbnailFile = setAttachmentData(masterSecret, in);

  SQLiteDatabase database = databaseHelper.getWritableDatabase();
  ContentValues  values   = new ContentValues(2);

  values.put(THUMBNAIL, thumbnailFile.first.getAbsolutePath());
  values.put(THUMBNAIL_ASPECT_RATIO, aspectRatio);

  database.update(TABLE_NAME, values, PART_ID_WHERE, attachmentId.toStrings());

  Cursor cursor = database.query(TABLE_NAME, new String[] {MMS_ID}, PART_ID_WHERE, attachmentId.toStrings(), null, null, null);

  try {
    if (cursor != null && cursor.moveToFirst()) {
      notifyConversationListeners(DatabaseFactory.getMmsDatabase(context).getThreadIdForMessage(cursor.getLong(cursor.getColumnIndexOrThrow(MMS_ID))));
    }
  } finally {
    if (cursor != null) cursor.close();
  }
}
 
Example 5
Project: Blockly   File: Connection.java   View source code 6 votes vote down vote up
@VisibleForTesting
void checkConnection(Connection target) {
    switch (canConnectWithReason(target)) {
        case CAN_CONNECT:
            break;
        case REASON_SELF_CONNECTION:
            throw new IllegalArgumentException("Cannot connect a block to itself.");
        case REASON_WRONG_TYPE:
            throw new IllegalArgumentException("Cannot connect these types.");
        case REASON_MUST_DISCONNECT:
            throw new IllegalStateException(
                    "Must disconnect from current block before connecting to a new one.");
        case REASON_TARGET_NULL:
            throw new IllegalArgumentException("Cannot connect to a null connection/block");
        case REASON_CHECKS_FAILED:
            throw new IllegalArgumentException("Cannot connect, checks do not match.");
        default:
            throw new IllegalArgumentException(
                    "Unknown connection failure, this should never happen!");
    }
}
 
Example 6
Project: BWS-Android   File: CameraHelper.java   View source code 6 votes vote down vote up
/**
 * does setup the repeating capture request for taking images for the preview
 */
@VisibleForTesting
void setupCaptureRequestForPreview(@NonNull CameraCaptureSession previewSession, @NonNull CameraDevice camera,
                                   @NonNull List<Surface> surfaces) {
    try {
        CaptureRequest.Builder previewRequestBuilder = camera.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
        for (Surface surface : surfaces) {
            previewRequestBuilder.addTarget(surface);
        }
        previewRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);

        previewSession.setRepeatingRequest(previewRequestBuilder.build(), null, null);

    } catch (CameraAccessException | IllegalStateException e) {
        throw new CameraException(e);
    }
}
 
Example 7
Project: BWS-Android   File: CameraHelper.java   View source code 6 votes vote down vote up
/**
 * configures the ProportionalTextureView to respect the aspect ratio of the image and using an appropriate buffer size
 */
@VisibleForTesting
void configureTextureView(@NonNull ProportionalTextureView textureView, @ConfigurationOrientation int deviceOrientation,
                          @SurfaceRotation int relativeDisplayRotation, @NonNull Size previewSize) {
    switch (deviceOrientation) {
        case Configuration.ORIENTATION_PORTRAIT:
            // swap values because preview sizes are always landscape
            textureView.setAspectRatio(previewSize.getHeight(), previewSize.getWidth(), relativeDisplayRotation);
            break;
        case Configuration.ORIENTATION_LANDSCAPE:
            textureView.setAspectRatio(previewSize.getWidth(), previewSize.getHeight(), relativeDisplayRotation);
            break;
    }

    // working more memory efficient
    SurfaceTexture surface = textureView.getSurfaceTexture();
    if (surface != null) {
        surface.setDefaultBufferSize(previewSize.getWidth(), previewSize.getHeight());
    } else {
        throw new CameraException("surface texture not attached to view");
    }
}
 
Example 8
Project: https-github.com-hyb1996-NoRootScriptDroid   File: RhinoAndroidHelper.java   View source code 5 votes vote down vote up
/**
 * @return The Context factory which has to be used on android.
 */
@VisibleForTesting
public AndroidContextFactory getContextFactory() {
    AndroidContextFactory factory;
    if (!ContextFactory.hasExplicitGlobal()) {
        factory = new AndroidContextFactory(cacheDirectory);
        ContextFactory.getGlobalSetter().setContextFactoryGlobal(factory);
    } else if (!(ContextFactory.getGlobal() instanceof AndroidContextFactory)) {
        throw new IllegalStateException("Cannot initialize factory for Android Rhino: There is already another factory");
    } else {
        factory = (AndroidContextFactory) ContextFactory.getGlobal();
    }
    return factory;
}
 
Example 9
Project: q-mail   File: PgpMessageBuilder.java   View source code 5 votes vote down vote up
@VisibleForTesting
PgpMessageBuilder(Context context, MessageIdGenerator messageIdGenerator, BoundaryGenerator boundaryGenerator,
        AutocryptOperations autocryptOperations, AutocryptOpenPgpApiInteractor autocryptOpenPgpApiInteractor) {
    super(context, messageIdGenerator, boundaryGenerator);

    this.autocryptOperations = autocryptOperations;
    this.autocryptOpenPgpApiInteractor = autocryptOpenPgpApiInteractor;
}
 
Example 10
Project: StaggeredAnimationGroup   File: StaggeredAnimationGroup.java   View source code 5 votes vote down vote up
@VisibleForTesting
final void addTransitionToStaggeredTransition(Transition basePartialTransition,
                                              TransitionSet staggeredTransition,
                                              int viewId, int indexInTransition) {
    Transition partialTransition =
            applyStaggeredTransitionParams(basePartialTransition, viewId, indexInTransition);
    staggeredTransition.addTransition(partialTransition);
}
 
Example 11
Project: Phial   File: OverlayPresenter.java   View source code 5 votes vote down vote up
@VisibleForTesting
@NonNull
Page findSelected(List<Page> visible) {
    final String selectedPageId = selectedPageStorage.getSelectedPage();
    for (Page page : visible) {
        if (ObjectUtil.equals(selectedPageId, page.getId())) {
            return page;
        }
    }
    return visible.get(0);
}
 
Example 12
Project: ViewPagerAnimator   File: ViewPagerAnimator.java   View source code 5 votes vote down vote up
@VisibleForTesting
static ViewPagerAnimator<Integer> ofArgb(ViewPager viewPager,
                                         Provider<Integer> provider,
                                         Property<Integer> property,
                                         TypeEvaluator<Integer> evaluator,
                                         Interpolator interpolator) {
    return new ViewPagerAnimator<>(viewPager, provider, property, evaluator, interpolator);
}
 
Example 13
Project: AndroidDvbDriver   File: RegMap.java   View source code 5 votes vote down vote up
@VisibleForTesting
static long readValue(byte[] buff) {
    long res = 0;
    for (int i = 0; i < buff.length; i++) {
        res |= ((long) (buff[i] & 0xFF)) << ((buff.length - i - 1) * 8);
    }
    return res;
}
 
Example 14
Project: q-mail   File: MessageCryptoStructureDetector.java   View source code 5 votes vote down vote up
@VisibleForTesting
static boolean isPartPgpInlineEncryptedOrSigned(Part part) {
    if (!part.isMimeType(TEXT_PLAIN) && !part.isMimeType(APPLICATION_PGP)) {
        return false;
    }
    String text = MessageExtractor.getTextFromPart(part, TEXT_LENGTH_FOR_INLINE_CHECK);
    if (TextUtils.isEmpty(text)) {
        return false;
    }
    text = text.trim();
    return text.startsWith(PGP_INLINE_START_MARKER) || text.startsWith(PGP_INLINE_SIGNED_START_MARKER);
}
 
Example 15
Project: firefox-tv   File: WebViewProvider.java   View source code 5 votes vote down vote up
@VisibleForTesting static String buildUserAgentString(final Context context, final AmazonWebSettings settings, final String appName) {
    final StringBuilder uaBuilder = new StringBuilder();

    uaBuilder.append("Mozilla/5.0");

    // WebView by default includes "; wv" as part of the platform string, but we're a full browser
    // so we shouldn't include that.
    // Most webview based browsers (and chrome), include the device name AND build ID, e.g.
    // "Pixel XL Build/NOF26V", that seems unnecessary (and not great from a privacy perspective),
    // so we skip that too.
    uaBuilder.append(" (Linux; Android ").append(Build.VERSION.RELEASE).append(") ");

    final String existingWebViewUA = settings.getUserAgentString();

    final String appVersion;
    try {
        appVersion = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
    } catch (PackageManager.NameNotFoundException e) {
        // This should be impossible - we should always be able to get information about ourselves:
        throw new IllegalStateException("Unable find package details for Focus", e);
    }

    final String focusToken = appName + "/" + appVersion;
    uaBuilder.append(getUABrowserString(existingWebViewUA, focusToken));

    return uaBuilder.toString();
}
 
Example 16
Project: q-mail   File: ContactPictureLoader.java   View source code 5 votes vote down vote up
@VisibleForTesting
protected static String calcUnknownContactLetter(Address address) {
    String letter = null;
    String personal = address.getPersonal();
    String str = (personal != null) ? personal : address.getAddress();
    Matcher m = EXTRACT_LETTER_PATTERN.matcher(str);
    if (m.find()) {
        letter = m.group(0).toUpperCase(Locale.US);
    }

    return (TextUtils.isEmpty(letter)) ?
            FALLBACK_CONTACT_LETTER : letter;
}
 
Example 17
Project: android-architecture-components   File: UserViewModel.java   View source code 5 votes vote down vote up
@VisibleForTesting
public void setLogin(String login) {
    if (Objects.equals(this.login.getValue(), login)) {
        return;
    }
    this.login.setValue(login);
}
 
Example 18
Project: PeSanKita-android   File: SmsListener.java   View source code 5 votes vote down vote up
@VisibleForTesting String parseChallenge(String messageBody) {
  Matcher challengeMatcher = CHALLENGE_PATTERN.matcher(messageBody);

  if (!challengeMatcher.matches()) {
    throw new AssertionError("Expression should match.");
  }

  return challengeMatcher.group(2) + challengeMatcher.group(3);
}
 
Example 19
Project: Cable-Android   File: CanonicalAddressDatabase.java   View source code 5 votes vote down vote up
@VisibleForTesting
static boolean isNumberAddress(@NonNull String number) {
  if (number.contains("@"))             return false;
  if (GroupUtil.isEncodedGroup(number)) return false;

  final String networkNumber = PhoneNumberUtils.extractNetworkPortion(number);

  if (TextUtils.isEmpty(networkNumber)) return false;
  if (networkNumber.length() < 3)       return false;

  return PhoneNumberUtils.isWellFormedSmsAddress(number);
}
 
Example 20
Project: QiangHongBao   File: BottomBar.java   View source code 5 votes vote down vote up
@VisibleForTesting
void restoreState(Bundle savedInstanceState) {
    if (savedInstanceState != null) {
        isComingFromRestoredState = true;
        ignoreTabReselectionListener = true;

        int restoredPosition = savedInstanceState.getInt(STATE_CURRENT_SELECTED_TAB, currentTabPosition);
        selectTabAtPosition(restoredPosition, false);
    }
}
 
Example 21
Project: RIBs   File: Interactor.java   View source code 5 votes vote down vote up
/** @return the currently attached presenter if there is one */
@VisibleForTesting
private P getPresenter() {
  if (presenter == null) {
    throw new IllegalStateException("Attempting to get interactor's presenter before being set.");
  }
  return presenter;
}
 
Example 22
Project: SpanEZ   File: SpanEZ.java   View source code 5 votes vote down vote up
/**
 * Applies the given {@code span} to the specified range from
 *
 * @param targetRange the range were the span will be applied to
 * @param span        the span to be applied
 */
@SuppressWarnings("WeakerAccess")
@VisibleForTesting
protected void addSpan(@NonNull TargetRange targetRange, @NonNull Object span) {
    final int start = targetRange.getStart();
    final int end = targetRange.getEnd();
    // Added 1 to the span, because it seems that internally it does exclusive range
    spannableContent.setSpan(span, start, end + 1, spanFlags);
}
 
Example 23
Project: PeSanKita-android   File: AttachmentDatabase.java   View source code 5 votes vote down vote up
@VisibleForTesting
protected @Nullable InputStream getDataStream(MasterSecret masterSecret, AttachmentId attachmentId, String dataType)
{
  File dataFile = getAttachmentDataFile(attachmentId, dataType);

  try {
    if (dataFile != null) return new DecryptingPartInputStream(dataFile, masterSecret);
    else                  return null;
  } catch (FileNotFoundException e) {
    Log.w(TAG, e);
    return null;
  }
}
 
Example 24
Project: Graywater   File: GraywaterAdapter.java   View source code 5 votes vote down vote up
/**
 * Note that this is an <i>O(n)</i> operation, but it does not query for the list of binders.
 *
 * @param itemPosition
 * 		the position in the list of items.
 * @return the number of viewholders before the given item position.
 */
@VisibleForTesting
public int getViewHolderCount(final int itemPosition) {
	if (itemPosition >= 0 && !mItemPositionToFirstViewHolderPositionCache.isEmpty()) {
		if (itemPosition >= mItemPositionToFirstViewHolderPositionCache.size()) {
			return mViewHolderToItemPositionCache.size();
		} else {
			return mItemPositionToFirstViewHolderPositionCache.get(itemPosition);
		}
	} else {
		return 0;
	}
}
 
Example 25
Project: GitHub   File: GlideApp.java   View source code 5 votes vote down vote up
/**
 * @see Glide#init(Glide)
 */
@Deprecated
@VisibleForTesting
@SuppressLint("VisibleForTests")
public static void init(Glide glide) {
  Glide.init(glide);
}
 
Example 26
Project: StaggeredAnimationGroup   File: StaggeredAnimationGroup.java   View source code 5 votes vote down vote up
@VisibleForTesting
final Transition applyStaggeredTransitionParams(Transition partialTransition,
                                                int viewId, int indexInTransition) {
    partialTransition.setStartDelay(indexInTransition * partialDelay);
    partialTransition.addTarget(viewId);
    return partialTransition;
}
 
Example 27
Project: pact-workshop-android   File: NetworkModule.java   View source code 5 votes vote down vote up
@VisibleForTesting
public Retrofit getRetrofit(@NonNull Context context,
                            @NonNull String baseUrl) {
  return new Retrofit.Builder()
      .baseUrl(baseUrl)
      .client(getOkHttpClient(context))
      .addConverterFactory(MoshiConverterFactory.create(getMoshi()))
      .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
      .build();
}
 
Example 28
Project: BWS-Android   File: BioIdWebserviceClient.java   View source code 5 votes vote down vote up
@VisibleForTesting
protected HttpRequest createVerificationResultRequest(@NonNull String token) {
    try {
        return withDefaultTimeout(
                HttpRequest.get(BWS_BASE_URL + "/extension/verify")
                        .authorization("Bearer " + token)
                        .acceptJson());
    } catch (HttpRequest.HttpRequestException e) {
        throw new NoConnectionException(e);
    }
}
 
Example 29
Project: GitHub   File: Glide.java   View source code 5 votes vote down vote up
@VisibleForTesting
public static synchronized void init(Context context, GlideBuilder builder) {
  if (Glide.glide != null) {
    tearDown();
  }
  initializeGlide(context, builder);
}
 
Example 30
Project: GitHub   File: GifFrameLoader.java   View source code 5 votes vote down vote up
@VisibleForTesting
void onFrameReady(DelayTarget delayTarget) {
  if (onEveryFrameListener != null) {
    onEveryFrameListener.onFrameReady();
  }
  isLoadPending = false;
  if (isCleared) {
    handler.obtainMessage(FrameLoaderCallback.MSG_CLEAR, delayTarget).sendToTarget();
    return;
  }
  // If we're not running, notifying here will recycle the frame that we might currently be
  // showing, which breaks things (see #2526). We also can't discard this frame because we've
  // already incremented the frame pointer and can't decode the same frame again. Instead we'll
  // just hang on to this next frame until start() or clear() are called.
  if (!isRunning) {
    pendingTarget = delayTarget;
    return;
  }

  if (delayTarget.getResource() != null) {
    recycleFirstFrame();
    DelayTarget previous = current;
    current = delayTarget;
    // The callbacks may unregister when onFrameReady is called, so iterate in reverse to avoid
    // concurrent modifications.
    for (int i = callbacks.size() - 1; i >= 0; i--) {
      FrameCallback cb = callbacks.get(i);
      cb.onFrameReady();
    }
    if (previous != null) {
      handler.obtainMessage(FrameLoaderCallback.MSG_CLEAR, previous).sendToTarget();
    }
  }

  loadNextFrame();
}
 
Example 31
Project: GitHub   File: BitmapPreFillRunner.java   View source code 5 votes vote down vote up
@VisibleForTesting
BitmapPreFillRunner(BitmapPool bitmapPool, MemoryCache memoryCache, PreFillQueue allocationOrder,
    Clock clock, Handler handler) {
  this.bitmapPool = bitmapPool;
  this.memoryCache = memoryCache;
  this.toPrefill = allocationOrder;
  this.clock = clock;
  this.handler = handler;
}
 
Example 32
Project: PeSanKita-android   File: AttachmentDownloadJob.java   View source code 5 votes vote down vote up
@VisibleForTesting
SignalServiceAttachmentPointer createAttachmentPointer(MasterSecret masterSecret, Attachment attachment)
    throws InvalidPartException
{
  if (TextUtils.isEmpty(attachment.getLocation())) {
    throw new InvalidPartException("empty content id");
  }

  if (TextUtils.isEmpty(attachment.getKey())) {
    throw new InvalidPartException("empty encrypted key");
  }

  try {
    AsymmetricMasterSecret asymmetricMasterSecret = MasterSecretUtil.getAsymmetricMasterSecret(context, masterSecret);
    long                   id                     = Long.parseLong(attachment.getLocation());
    byte[]                 key                    = MediaKey.getDecrypted(masterSecret, asymmetricMasterSecret, attachment.getKey());
    String                 relay                  = null;

    if (TextUtils.isEmpty(attachment.getRelay())) {
      relay = attachment.getRelay();
    }

    return new SignalServiceAttachmentPointer(id, null, null, key, relay, Optional.<byte[]>absent());
  } catch (InvalidMessageException | IOException e) {
    Log.w(TAG, e);
    throw new InvalidPartException(e);
  }
}
 
Example 33
Project: cat-is-a-dog   File: LoginActivity.java   View source code 5 votes vote down vote up
/**
 * Only called from test, creates and returns a new {@link SimpleIdlingResource}.
 */
@VisibleForTesting
@NonNull
public IdlingResource getIdlingResource() {
    if (mIdlingResource == null) {
        mIdlingResource = new SimpleIdlingResource();
    }
    return mIdlingResource;
}
 
Example 34
Project: Phial   File: PhialButton.java   View source code 5 votes vote down vote up
@VisibleForTesting
static int getIconSize(int maxSize, int intrinsicSize) {
    if (intrinsicSize == -1 || intrinsicSize > maxSize) {
        return maxSize;
    }
    return intrinsicSize;
}
 
Example 35
Project: GitHub   File: Engine.java   View source code 5 votes vote down vote up
@VisibleForTesting
void shutdown() {
  shutdownAndAwaitTermination(diskCacheExecutor);
  shutdownAndAwaitTermination(sourceExecutor);
  shutdownAndAwaitTermination(sourceUnlimitedExecutor);
  shutdownAndAwaitTermination(animationExecutor);
}
 
Example 36
Project: playTorrent   File: DownloadProcessor.java   View source code 5 votes vote down vote up
@VisibleForTesting()
public void connectLocalHostPeer() throws UnknownHostException, ConnectException {
    // find local address
    InetAddress local = InetAddress.getLocalHost();
    Peer downloadPeer = new Peer("10.0.2.2", 49152);
    mPeerMap.put(local.getHostAddress(), downloadPeer);
    downloadPeer.setPeerListener(mPeerEventListener);
    handFoundPeerList();
}
 
Example 37
Project: silly-android   File: AnnotationParser.java   View source code 5 votes vote down vote up
/**
 * Verifies that the given field is a {@link View} or crashes.
 *
 * @param field  The field you are checking
 * @param object The object instance holding the field
 * @throws IllegalArgumentException When field is not a {@link View}
 */
@VisibleForTesting
static void verifyTypeOfView(@NonNull final Field field, @NonNull final Object object) {
    try {
        field.setAccessible(true);
        Object value = field.get(object);
        if (value instanceof View || View.class.isAssignableFrom(field.getType())) {
            return;
        }
    } catch (IllegalAccessException ignored) {}
    throw new IllegalArgumentException("Field \n\t'" + String.valueOf(field) + "\n is not a View, instead it is a " + field.getType().getSimpleName());
}
 
Example 38
Project: OpenYOLO-Android   File: CredentialClient.java   View source code 5 votes vote down vote up
@VisibleForTesting
CredentialClient(
        @NonNull Context context,
        @NonNull CredentialClientOptions options) {
    validate(context, notNullValue(), NullPointerException.class);
    validate(options, notNullValue(), NullPointerException.class);

    mApplicationContext = context.getApplicationContext();
    mDeviceState = options.getDeviceState();
}
 
Example 39
Project: ViewPagerAnimator   File: ViewPagerAnimator.java   View source code 5 votes vote down vote up
@VisibleForTesting
static ViewPagerAnimator<Integer> ofInt(ViewPager viewPager,
                                        Provider<Integer> provider,
                                        Property<Integer> property,
                                        TypeEvaluator<Integer> evaluator,
                                        Interpolator interpolator) {
    return new ViewPagerAnimator<>(viewPager, provider, property, evaluator, interpolator);
}
 
Example 40
Project: mvp-core   File: BaseMVPDialogFragment.java   View source code 5 votes vote down vote up
/**
 * Call the presenter callbacks for onStop
 */
@VisibleForTesting
void doStop()
{
    assert mPresenter != null;

    mPresenter.onStop();

    mPresenter.onViewDetached();
}