public class PhoneFactory extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ACTIVE_PHONES |
Constructor and Description |
---|
PhoneFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
addLocalLog(String key,
int size)
Adds a local log category.
|
static int |
calculatePreferredNetworkType(Context context,
int phoneSubId)
Returns the preferred network type that should be set in the modem.
|
static void |
dump(FileDescriptor fd,
PrintWriter printwriter,
String[] args) |
static Phone |
getDefaultPhone() |
static int |
getDefaultSubscription() |
static Phone |
getPhone(int phoneId) |
static Phone[] |
getPhones() |
static boolean |
isSMSPromptEnabled() |
static void |
localLog(String key,
String log)
Add a line to the named Local Log.
|
static void |
makeDefaultPhone(Context context)
FIXME replace this with some other way of making these
instances
|
static void |
makeDefaultPhones(Context context) |
static Phone |
makeImsPhone(PhoneNotifier phoneNotifier,
Phone defaultPhone)
Makes a
ImsPhone object. |
static SipPhone |
makeSipPhone(String sipUri)
Makes a
SipPhone object. |
public static final int MAX_ACTIVE_PHONES
public static void makeDefaultPhones(Context context)
public static void makeDefaultPhone(Context context)
public static Phone getDefaultPhone()
public static Phone getPhone(int phoneId)
public static Phone[] getPhones()
public static SipPhone makeSipPhone(String sipUri)
SipPhone
object.sipUri
- the local SIP URI the phone runs onSipPhone
object or null if the SIP URI is not validpublic static int calculatePreferredNetworkType(Context context, int phoneSubId)
context
- The current Context
.public static int getDefaultSubscription()
public static boolean isSMSPromptEnabled()
public static Phone makeImsPhone(PhoneNotifier phoneNotifier, Phone defaultPhone)
ImsPhone
object.ImsPhone
object or null if the exception occuredpublic static void addLocalLog(String key, int size)
key
- the name of the category - will be the header in the service dump.size
- the number of lines to maintain in this categorypublic static void localLog(String key, String log)
key
- the name of the log category to put this in. Must be created
via addLocalLog.log
- the string to add to the log.public static void dump(FileDescriptor fd, PrintWriter printwriter, String[] args)