All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.shadows.PhoneCapabilityFactory Maven / Gradle / Ivy

The newest version!
package org.robolectric.shadows;

import android.telephony.PhoneCapability;
import java.util.ArrayList;

/** Factory to create PhoneCapability. */
public final class PhoneCapabilityFactory {

  /** Creates PhoneCapability. */
  public static PhoneCapability create(
      int maxActiveVoiceSubscriptions,
      int maxActiveDataSubscriptions,
      boolean networkValidationBeforeSwitchSupported,
      int[] deviceNrCapabilities) {
    return new PhoneCapability(
        maxActiveVoiceSubscriptions,
        maxActiveDataSubscriptions,
        // Since ModemInfo is an @hide object, there is no reason for an external object to be able
        // to declare it, using an empty ArrayList as the parameter here.
        /* List */ new ArrayList<>(),
        networkValidationBeforeSwitchSupported,
        deviceNrCapabilities);
  }

  private PhoneCapabilityFactory() {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy