本文整理汇总了Java中com.android.internal.telephony.TelephonyProperties类的典型用法代码示例。如果您正苦于以下问题:Java TelephonyProperties类的具体用法?Java TelephonyProperties怎么用?Java TelephonyProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TelephonyProperties类属于com.android.internal.telephony包,在下文中一共展示了TelephonyProperties类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeNotification
import com.android.internal.telephony.TelephonyProperties; //导入依赖的package包/类
private void removeNotification(int startId) {
Log.d(TAG, "removeNotification, startId=" + startId);
for (TxnRequest req : txnRequestsMap ) {
if (req.serviceId == startId) {
if (req.requestedSubId == -1) {
Log.d(TAG, "Notification cleanup not required since subId is -1");
return;
}
if (req.anyRequestFailed ==1) {
// dont remove notification.
Log.d(TAG, "Some transaction failed for this sub, notification not cleared.");
} else {
// remove notification
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)
getApplicationContext().getSystemService(ns);
mNotificationManager.cancel(req.requestedSubId);
boolean isSilent = true; //default, silent enabled.
if ("prompt".equals(
SystemProperties.get(TelephonyProperties.PROPERTY_MMS_TRANSACTION))) {
isSilent = false;
}
if (isSilent) {
int nextSub = (req.requestedSubId ==1) ?0:1;
Log.d(TAG, "MMS silent transaction finished for sub="+nextSub);
Intent silentIntent = new Intent(getApplicationContext(),
edu.bupt.mms.ui.SelectMmsSubscription.class);
silentIntent.putExtra(Mms.SUB_ID, nextSub);
silentIntent.putExtra("TRIGGER_SWITCH_ONLY", 1);
getApplicationContext().startService(silentIntent);
}
}
}
}
}
示例2: init
import com.android.internal.telephony.TelephonyProperties; //导入依赖的package包/类
public static void init(Context context) {
if (LOCAL_LOGV) {
Log.v(TAG, "MmsConfig.init()");
}
// Always put the mnc/mcc in the log so we can tell which mms_config.xml was loaded.
Log.v(TAG, "mnc/mcc: " +
android.os.SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC));
loadMmsSettings(context);
}
示例3: isRoaming
import com.android.internal.telephony.TelephonyProperties; //导入依赖的package包/类
static boolean isRoaming() {
// TODO: fix and put in Telephony layer
String roaming = SystemProperties.get(
TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null);
if (LOCAL_LOGV) {
Log.v(TAG, "roaming ------> " + roaming);
}
return "true".equals(roaming);
}
示例4: sendMessage
import com.android.internal.telephony.TelephonyProperties; //导入依赖的package包/类
private void sendMessage(boolean bCheckEcmMode) {
if (bCheckEcmMode) {
// TODO: expose this in telephony layer for SDK build
String inEcm = SystemProperties
.get(TelephonyProperties.PROPERTY_INECM_MODE);
if (Boolean.parseBoolean(inEcm)) {
try {
startActivityForResult(
new Intent(
TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS,
null), REQUEST_CODE_ECM_EXIT_DIALOG);
return;
} catch (ActivityNotFoundException e) {
// continue to send message
Log.e(TAG, "Cannot find EmergencyCallbackModeExitDialog", e);
}
}
}
if (!mSendingMessage) {
if (LogTag.SEVERE_WARNING) {
String sendingRecipients = mConversation.getRecipients()
.serialize();
if (!sendingRecipients.equals(mDebugRecipients)) {
String workingRecipients = mWorkingMessage
.getWorkingRecipients();
if (!mDebugRecipients.equals(workingRecipients)) {
LogTag.warnPossibleRecipientMismatch(
"ComposeMessageActivity.sendMessage"
+ " recipients in window: \""
+ mDebugRecipients
+ "\" differ from recipients from conv: \""
+ sendingRecipients
+ "\" and working recipients: "
+ workingRecipients, this);
}
}
sanityCheckConversation();
}
// send can change the recipients. Make sure we remove the listeners
// first and then add
// them back once the recipient list has settled.
removeRecipientsListeners();
mWorkingMessage.send(mDebugRecipients);
mSentMessage = true;
mSendingMessage = true;
addRecipientsListeners();
mScrollOnSend = true; // in the next onQueryComplete, scroll the
// list to the end.
}
// But bail out if we are supposed to exit after the message is sent.
if (mExitOnSent) {
finish();
}
}
示例5: sendMessage
import com.android.internal.telephony.TelephonyProperties; //导入依赖的package包/类
private void sendMessage(boolean bCheckEcmMode) {
if (bCheckEcmMode) {
// TODO: expose this in telephony layer for SDK build
String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE);
if (Boolean.parseBoolean(inEcm)) {
try {
startActivityForResult(
new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS, null),
REQUEST_CODE_ECM_EXIT_DIALOG);
return;
} catch (ActivityNotFoundException e) {
// continue to send message
Log.e(TAG, "Cannot find EmergencyCallbackModeExitDialog", e);
}
}
}
if (!mSendingMessage) {
if (LogTag.SEVERE_WARNING) {
String sendingRecipients = mConversation.getRecipients().serialize();
if (!sendingRecipients.equals(mDebugRecipients)) {
String workingRecipients = mWorkingMessage.getWorkingRecipients();
if (!mDebugRecipients.equals(workingRecipients)) {
LogTag.warnPossibleRecipientMismatch("ComposeMessageActivity.sendMessage" +
" recipients in window: \"" +
mDebugRecipients + "\" differ from recipients from conv: \"" +
sendingRecipients + "\" and working recipients: " +
workingRecipients, this);
}
}
sanityCheckConversation();
}
// send can change the recipients. Make sure we remove the listeners first and then add
// them back once the recipient list has settled.
removeRecipientsListeners();
mWorkingMessage.send(mDebugRecipients);
mSentMessage = true;
mSendingMessage = true;
addRecipientsListeners();
mScrollOnSend = true; // in the next onQueryComplete, scroll the list to the end.
}
// But bail out if we are supposed to exit after the message is sent.
if (mSendDiscreetMode) {
finish();
}
}