Search in sources :

Example 1 with PhoneAccount

use of android.telecom.PhoneAccount in project android_frameworks_base by ResurrectionRemix.

the class Telecom method runRegisterSimPhoneAccount.

private void runRegisterSimPhoneAccount() throws RemoteException {
    final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
    final String label = nextArgRequired();
    final String address = nextArgRequired();
    PhoneAccount account = PhoneAccount.builder(handle, label).setAddress(Uri.parse(address)).setSubscriptionAddress(Uri.parse(address)).setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION).setShortDescription(label).addSupportedUriScheme(PhoneAccount.SCHEME_TEL).addSupportedUriScheme(PhoneAccount.SCHEME_VOICEMAIL).build();
    mTelecomService.registerPhoneAccount(account);
    System.out.println("Success - " + handle + " registered.");
}
Also used : PhoneAccount(android.telecom.PhoneAccount) PhoneAccountHandle(android.telecom.PhoneAccountHandle)

Example 2 with PhoneAccount

use of android.telecom.PhoneAccount in project android_frameworks_base by DirtyUnicorns.

the class Telecom method runRegisterSimPhoneAccount.

private void runRegisterSimPhoneAccount() throws RemoteException {
    final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
    final String label = nextArgRequired();
    final String address = nextArgRequired();
    PhoneAccount account = PhoneAccount.builder(handle, label).setAddress(Uri.parse(address)).setSubscriptionAddress(Uri.parse(address)).setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION).setShortDescription(label).addSupportedUriScheme(PhoneAccount.SCHEME_TEL).addSupportedUriScheme(PhoneAccount.SCHEME_VOICEMAIL).build();
    mTelecomService.registerPhoneAccount(account);
    System.out.println("Success - " + handle + " registered.");
}
Also used : PhoneAccount(android.telecom.PhoneAccount) PhoneAccountHandle(android.telecom.PhoneAccountHandle)

Example 3 with PhoneAccount

use of android.telecom.PhoneAccount in project android_frameworks_base by DirtyUnicorns.

the class Telecom method runRegisterPhoneAccount.

private void runRegisterPhoneAccount() throws RemoteException {
    final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
    final String label = nextArgRequired();
    PhoneAccount account = PhoneAccount.builder(handle, label).setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER).build();
    mTelecomService.registerPhoneAccount(account);
    System.out.println("Success - " + handle + " registered.");
}
Also used : PhoneAccount(android.telecom.PhoneAccount) PhoneAccountHandle(android.telecom.PhoneAccountHandle)

Example 4 with PhoneAccount

use of android.telecom.PhoneAccount in project android_frameworks_base by AOSPA.

the class Telecom method runRegisterPhoneAccount.

private void runRegisterPhoneAccount() throws RemoteException {
    final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
    final String label = nextArgRequired();
    PhoneAccount account = PhoneAccount.builder(handle, label).setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER).build();
    mTelecomService.registerPhoneAccount(account);
    System.out.println("Success - " + handle + " registered.");
}
Also used : PhoneAccount(android.telecom.PhoneAccount) PhoneAccountHandle(android.telecom.PhoneAccountHandle)

Example 5 with PhoneAccount

use of android.telecom.PhoneAccount in project platform_frameworks_base by android.

the class Telecom method runRegisterPhoneAccount.

private void runRegisterPhoneAccount() throws RemoteException {
    final PhoneAccountHandle handle = getPhoneAccountHandleFromArgs();
    final String label = nextArgRequired();
    PhoneAccount account = PhoneAccount.builder(handle, label).setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER).build();
    mTelecomService.registerPhoneAccount(account);
    System.out.println("Success - " + handle + " registered.");
}
Also used : PhoneAccount(android.telecom.PhoneAccount) PhoneAccountHandle(android.telecom.PhoneAccountHandle)

Aggregations

PhoneAccount (android.telecom.PhoneAccount)53 PhoneAccountHandle (android.telecom.PhoneAccountHandle)41 TelecomManager (android.telecom.TelecomManager)32 TelephonyManager (android.telephony.TelephonyManager)19 ArrayList (java.util.ArrayList)13 SubscriptionInfo (android.telephony.SubscriptionInfo)11 SubscriptionManager (android.telephony.SubscriptionManager)10 AlertDialog (android.app.AlertDialog)7 Dialog (android.app.Dialog)7 DialogInterface (android.content.DialogInterface)7 KeyEvent (android.view.KeyEvent)7 ListAdapter (android.widget.ListAdapter)7 Uri (android.net.Uri)3 Context (android.content.Context)2 NotificationChannel (android.app.NotificationChannel)1 NotificationManager (android.app.NotificationManager)1 ContentResolver (android.content.ContentResolver)1 ContentValues (android.content.ContentValues)1 Drawable (android.graphics.drawable.Drawable)1 Bundle (android.os.Bundle)1