congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PhoneAccountHandle.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
android.telecom.PhoneAccountHandle
constructor

Best Java code snippets using android.telecom.PhoneAccountHandle.<init> (Showing top 7 results out of 315)

origin: robolectric/robolectric

 private static PhoneAccountHandle createHandle(String packageName, String id) {
  return new PhoneAccountHandle(new ComponentName(packageName, "component_class_name"), id);
 }
}
origin: robolectric/robolectric

@Test
@Config(minSdk = O)
public void shouldCreateForPhoneAccountHandle() {
 PhoneAccountHandle phoneAccountHandle =
   new PhoneAccountHandle(
     new ComponentName(ApplicationProvider.getApplicationContext(), Object.class), "handle");
 TelephonyManager mockTelephonyManager = mock(TelephonyManager.class);
 shadowOf(telephonyManager)
   .setTelephonyManagerForHandle(phoneAccountHandle, mockTelephonyManager);
 assertEquals(
   mockTelephonyManager, telephonyManager.createForPhoneAccountHandle(phoneAccountHandle));
}
origin: robolectric/robolectric

@Test
@Config(minSdk = O) // The setter on the real manager was added in O
public void shouldSetVoicemailRingtoneUri() {
 PhoneAccountHandle phoneAccountHandle =
   new PhoneAccountHandle(
     new ComponentName(ApplicationProvider.getApplicationContext(), Object.class), "handle");
 Uri ringtoneUri = Uri.fromParts("file", "ringtone.mp3", /* fragment = */ null);
 // Note: Using the real manager to set, instead of the shadow.
 telephonyManager.setVoicemailRingtoneUri(phoneAccountHandle, ringtoneUri);
 assertEquals(ringtoneUri, telephonyManager.getVoicemailRingtoneUri(phoneAccountHandle));
}
origin: robolectric/robolectric

@Test
@Config(minSdk = N)
public void shouldGiveVoiceVibrationEnabled() {
 PhoneAccountHandle phoneAccountHandle =
   new PhoneAccountHandle(
     new ComponentName(ApplicationProvider.getApplicationContext(), Object.class), "handle");
 shadowOf(telephonyManager).setVoicemailVibrationEnabled(phoneAccountHandle, true);
 assertTrue(telephonyManager.isVoicemailVibrationEnabled(phoneAccountHandle));
}
origin: robolectric/robolectric

@Test
@Config(minSdk = N)
public void shouldGiveVoicemailRingtoneUri() {
 PhoneAccountHandle phoneAccountHandle =
   new PhoneAccountHandle(
     new ComponentName(ApplicationProvider.getApplicationContext(), Object.class), "handle");
 Uri ringtoneUri = Uri.fromParts("file", "ringtone.mp3", /* fragment = */ null);
 shadowOf(telephonyManager).setVoicemailRingtoneUri(phoneAccountHandle, ringtoneUri);
 assertEquals(ringtoneUri, telephonyManager.getVoicemailRingtoneUri(phoneAccountHandle));
}
origin: geniusgithub/AndroidDialer

/**
 * Compose PhoneAccount object from component name and account id.
 */
@Nullable
public static PhoneAccountHandle getAccount(@Nullable String componentString,
    @Nullable String accountId) {
  if (TextUtils.isEmpty(componentString) || TextUtils.isEmpty(accountId)) {
    return null;
  }
  final ComponentName componentName = ComponentName.unflattenFromString(componentString);
  if (componentName == null) {
    return null;
  }
  return new PhoneAccountHandle(componentName, accountId);
}
origin: geniusgithub/AndroidDialer

accountHandle = new PhoneAccountHandle(
  ComponentName.unflattenFromString(callToNotify.accountComponentName),
  callToNotify.accountId);
android.telecomPhoneAccountHandle<init>

Popular methods of PhoneAccountHandle

  • getComponentName
  • getId

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now