/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.phone;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.provider.Settings;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;
import android.text.TextUtils;
import android.text.method.DialerKeyListener;
import android.util.EventLog;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.SlidingDrawer;
import android.widget.TextView;
import android.widget.Toast;
import com.android.internal.telephony.Call;
import com.android.internal.telephony.CallManager;
import com.android.internal.telephony.Connection;
import com.android.internal.telephony.MmiCode;
import com.android.internal.telephony.Phone;
import com.android.phone.OtaUtils.CdmaOtaInCallScreenUiState;
import com.android.phone.OtaUtils.CdmaOtaScreenState;
import java.util.List;
/**
* Phone app "in call" screen.
*/
public class InCallScreen extends Activity
implements View.OnClickListener, View.OnTouchListener {
private static final String LOG_TAG = "InCallScreen";
private static final boolean DBG =
(PhoneApp.DBG_LEVEL >= 1) && (SystemProperties.getInt("ro.debuggable", 0) == 1);
private static final boolean VDBG = (PhoneApp.DBG_LEVEL >= 2);
/**
* Intent extra used to specify whether the DTMF dialpad should be
* initially visible when bringing up the InCallScreen. (If this
* extra is present, the dialpad will be initially shown if the extra
* has the boolean value true, and initially hidden otherwise.)
*/
// TODO: Should be EXTRA_SHOW_DIALPAD for consistency.
static final String SHOW_DIALPAD_EXTRA = "com.android.phone.ShowDialpad";
/**
* Intent extra to specify the package name of the gateway
* provider. Used to get the name displayed in the in-call screen
* during the call setup. The value is a string.
*/
// TODO: This extra is currently set by the gateway application as
// a temporary measure. Ultimately, the framework will securely
// set it.
/* package */ static final String EXTRA_GATEWAY_PROVIDER_PACKAGE =
"com.android.phone.extra.GATEWAY_PROVIDER_PACKAGE";
/**
* Intent extra to specify the URI of the provider to place the
* call. The value is a string. It holds the gateway address
* (phone gateway URL should start with the 'tel:' scheme) that
* will actually be contacted to call the number passed in the
* intent URL or in the EXTRA_PHONE_NUMBER extra.
*/
// TODO: Should the value be a Uri (Parcelable)? Need to make sure
// MMI code '#' don't get confused as URI fragments.
/* package */ static final String EXTRA_GATEWAY_URI =
"com.android.phone.extra.GATEWAY_URI";
// Amount of time (in msec) that we display the "Call ended" state.
// The "short" value is for calls ended by the local user, and the
// "long" value is for calls ended by the remote caller.
private static final int CALL_ENDED_SHORT_DELAY = 200; // msec
private static final int CALL_ENDED_LONG_DELAY = 2000; // msec
// Amount of time (in msec) that we keep the in-call menu onscreen
// *after* the user changes the state of one of the toggle buttons.
private static final int MENU_DISMISS_DELAY = 1000; // msec
// Amount of time that we display the PAUSE alert Dialog showing the
// post dial string yet to be send out to the n/w
private static final int PAUSE_PROMPT_DIALOG_TIMEOUT = 2000; //msec
// The "touch lock" overlay timeout comes from Gservices; this is the default.
private static final int TOUCH_LOCK_DELAY_DEFAULT = 6000; // msec
// Amount of time for Displaying "Dialing" for 3way Calling origination
private static final int THREEWAY_CALLERINFO_DISPLAY_TIME = 3000; // msec
// Amount of time that we display the provider's overlay if applicable.
private static final int PROVIDER_OVERLAY_TIMEOUT = 5000; // msec
// These are values for the settings of the auto retry mode:
// 0 = disabled
// 1 = enabled
// TODO (Moto):These constants don't really belong here,
// they should be moved to Settings where the value is being looked up in the first place
static final int AUTO_RETRY_OFF = 0;
static final int AUTO_RETRY_ON = 1;
// Message codes; see mHandler below.
// Note message codes < 100 are reserved for the PhoneApp.
private static final int PHONE_STATE_CHANGED = 101;
private static final int PHONE_DISCONNECT = 102;
private static final int EVENT_HEADSET_PLUG_STATE_CHANGED = 103;
private static final int POST_ON_DIAL_CHARS = 104;
private static final int WILD_PROMPT_CHAR_ENTERED = 105;
private static final int ADD_VOICEMAIL_NUMBER = 106;
private static final int DONT_ADD_VOICEMAIL_NUMBER = 107;
private static final int DELAYED_CLEANUP_AFTER_DISCONNECT = 108;
private static final int SUPP_SERVICE_FAILED = 110;
private static final int DISMISS_MENU = 111;
private static final int ALLOW_SCREEN_ON = 112;
private static final int TOUCH_LOCK_TIMER = 113;
private static final int REQUEST_UPDATE_BLUETOOTH_INDICATION = 114;
private static final int PHONE_CDMA_CALL_WAITING = 115;
private static final int THREEWAY_CALLERINFO_DISPLAY_DONE = 116;
private static final int EVENT_OTA_PROVISION_CHANGE = 117;
private static final int REQUEST_CLOSE_SPC_ERROR_NOTICE = 118;
private static final int REQUEST_CLOSE_OTA_FAILURE_NOTICE = 119;
private static final int EVENT_PAUSE_DIALOG_COMPLETE = 120;
private static final int EVENT_HIDE_PROVIDER_OVERLAY = 121; // Time to remove the overlay.
private static final int REQUEST_UPDATE_TOUCH_UI = 122;
//following constants are used for OTA Call
public static final String ACTION_SHOW_ACTIVATION =
"com.android.phone.InCallScreen.SHOW_ACTIVATION";
public static final String OTA_NUMBER = "*228";
public static final String EXTRA_OTA_CALL = "android.phone.extra.OTA_CALL";
// When InCallScreenMode is UNDEFINED set the default action
// to ACTION_UNDEFINED so if we are resumed the activity will
// know its
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
android接听电话源码 (555个子文件)
INetworkQueryService.aidl 2KB
INetworkQueryServiceCallback.aidl 1KB
.classpath 280B
InCallScreen.java 221KB
PhoneUtils.java 110KB
BluetoothHandsfree.java 97KB
CallNotifier.java 87KB
CallFeaturesSetting.java 75KB
PhoneApp.java 72KB
CallCard.java 70KB
OtaUtils.java 42KB
NotificationMgr.java 42KB
DTMFTwelveKeyDialer.java 38KB
BluetoothHeadsetService.java 35KB
InCallTouchUi.java 34KB
CellBroadcastSms.java 32KB
PhoneInterfaceManager.java 26KB
SipEditor.java 23KB
EmergencyDialer.java 22KB
Settings.java 20KB
InCallMenuView.java 20KB
InCallMenu.java 19KB
BluetoothAtPhonebook.java 18KB
EditPhoneNumberPreference.java 17KB
SipSettings.java 17KB
FdnSetting.java 17KB
OutgoingCallBroadcaster.java 16KB
NetworkSetting.java 16KB
SipCallOptionHandler.java 15KB
SimContacts.java 14KB
EditFdnContactScreen.java 14KB
ManageConferenceUtils.java 14KB
EmergencyCallbackModeExitDialog.java 13KB
Ringer.java 11KB
ChangeIccPinScreen.java 10KB
CallForwardEditPreference.java 10KB
SpecialCharSequenceMgr.java 9KB
TelephonyCapabilities.java 9KB
EmergencyCallHandler.java 8KB
DataUsageListener.java 8KB
EmergencyCallbackModeService.java 8KB
CallLogAsync.java 8KB
NetworkQueryService.java 8KB
InCallControlState.java 8KB
IccNetworkDepersonalizationPanel.java 7KB
CallTime.java 7KB
CdmaSystemSelectListPreference.java 7KB
TimeConsumingPreferenceActivity.java 7KB
ADNList.java 7KB
InCallMenuItemView.java 6KB
CdmaPhoneCallState.java 6KB
AccelerometerListener.java 6KB
ButtonGridLayout.java 6KB
CLIRListPreference.java 6KB
GsmUmtsCallForwardOptions.java 6KB
DeleteFdnContactScreen.java 6KB
SipBroadcastReceiver.java 5KB
HapticFeedback.java 5KB
SipProfileDb.java 5KB
EnableFdnScreen.java 5KB
CdmaSubscriptionListPreference.java 5KB
EnableIccPinScreen.java 5KB
FdnList.java 5KB
CdmaOptions.java 4KB
CallWaitingCheckBoxPreference.java 4KB
OtaStartupReceiver.java 4KB
Profiler.java 4KB
Use2GOnlyCheckBoxPreference.java 4KB
SipSharedPreferences.java 4KB
EditPinPreference.java 4KB
IccPanel.java 3KB
ProcessOutgoingCallTest.java 3KB
DTMFTwelveKeyDialerView.java 3KB
CdmaVoicePrivacyCheckBoxPreference.java 3KB
CnapTest.java 3KB
DataUsage.java 3KB
GsmUmtsOptions.java 3KB
CdmaDisplayInfo.java 3KB
FakePhoneActivity.java 3KB
GsmUmtsAdditionalCallOptions.java 3KB
GetPin2Screen.java 2KB
InCallScreenShowActivation.java 2KB
BluetoothCmeError.java 2KB
CarrierLogo.java 2KB
GsmUmtsCallOptions.java 1KB
CdmaCallOptions.java 1KB
SipUtil.java 1KB
IccProvider.java 825B
EventLogTags.logtags 270B
CleanSpec.mk 2KB
Android.mk 1KB
Android.mk 911B
MODULE_LICENSE_APACHE2 0B
NOTICE 10KB
bg_in_call_gradient_connected.9.png 46KB
bg_in_call_gradient_bluetooth.9.png 20KB
btn_in_call_answer_pressed.9.png 20KB
dialpad_lock.9.png 16KB
btn_in_call_manage_conf_selected.9.png 15KB
btn_in_call_manage_conf_pressed.9.png 15KB
共 555 条
- 1
- 2
- 3
- 4
- 5
- 6
duke1996
- 粉丝: 0
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页