public final class

ActivityInvoker$$CC

extends java.lang.Object

 java.lang.Object

↳androidx.test.internal.platform.app.ActivityInvoker$$CC

Gradle dependencies

compile group: 'androidx.test', name: 'monitor', version: '1.7.2'

  • groupId: androidx.test
  • artifactId: monitor
  • version: 1.7.2

Artifact androidx.test:monitor:1.7.2 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.test:monitor com.android.support.test:monitor

Overview

Handles default implementation for ActivityInvoker#getIntentForActivity

Previous releases of androidx.test:monitor shipped with java 7 bytecode, and used desugaring to convert Java8+ features like default interface method implementations to java7.

This meant previous releases of androidx.test:monitor had an effective inter-library dependency on a generated ActivityInvoker$$CC class. Thus retain this class so monitor is compatible with older androidx.test core versions.

Summary

Methods
public static IntentgetIntentForActivity$$dflt$$(ActivityInvoker invoker, java.lang.Class<Activity> activityClass)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public static Intent getIntentForActivity$$dflt$$(ActivityInvoker invoker, java.lang.Class<Activity> activityClass)

Source

package androidx.test.internal.platform.app;

import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.Scope;

/**
 * Handles default implementation for ActivityInvoker#getIntentForActivity
 *
 * <p>Previous releases of androidx.test:monitor shipped with java 7 bytecode, and used desugaring
 * to convert Java8+ features like default interface method implementations to java7.
 *
 * <p>This meant previous releases of androidx.test:monitor had an effective inter-library
 * dependency on a generated ActivityInvoker$$CC class. Thus retain this class so monitor is
 * compatible with older androidx.test core versions.
 *
 * @hide
 */
@RestrictTo(Scope.LIBRARY_GROUP)
public final class ActivityInvoker$$CC {

  private ActivityInvoker$$CC() {}

  public static Intent getIntentForActivity$$dflt$$(ActivityInvoker invoker,
            Class<? extends Activity> activityClass) {
    Intent intent =
        Intent.makeMainActivity(
            new ComponentName(getInstrumentation().getTargetContext(), activityClass));
    if (getInstrumentation().getTargetContext().getPackageManager().resolveActivity(intent, 0)
        != null) {
      return intent;
    }
    return Intent.makeMainActivity(
        new ComponentName(getInstrumentation().getContext(), activityClass));
  }
}