资源简介
android5.1 源码上开发短信拦截功能,骚扰短信拦截,黑名单添加
代码片段和文件信息
/*
* Copyright (C) 2014 MediaTek Inc.
* Modification based on code covered by the mentioned copyright
* and/or permission notice(s).
*/
/*
* Copyright (C) 2011 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.mms.apptests;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.onclickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.android.mms.apptests.R;
// This is a manual test application for testing the Messaging app‘s ability to send Sms messages
// without the user having to confirm or press a send button. This app uses the intent:
// com.android.mms.intent.action.SENDTO_NO_CONFIRMATION
// to tell the messaging app to send a message. This app tests that the required permissions
// are checked. It also has buttons for testing sending a long (i.e. greater than 140 char) message
// and for sending a number of messages in rapid fire succession.
public class SmsSendIntentTestActivity extends Activity {
/** Tag string for our debug logs */
private static final String TAG = “SmsSendIntentTestActivity“;
private EditText mRecipient;
private EditText mMessage;
private final int NOTIFICATION_MENU = 100;
private final int NOTIFICATIONS_REQUEST_CODE = 101;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sms_send_intent_test);
mRecipient = (EditText)findViewById(R.id.sms_recipient);
mMessage = (EditText)findViewById(R.id.sms_content);
String line1Number = ((TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number();
mRecipient.setText(line1Number); // use this to prime a number
Button sendButton = (Button) findViewById(R.id.sms_send_message);
sendButton.setonclickListener(new onclickListener() {
public void onclick(View v) {
sendMessage(1 1);
}
});
Button sendUnlockButton = (Button) findViewById(R.id.sms_send_message_unlock_screen);
sendUnlockButton.setonclickListener(new onclickListener() {
publ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1390 2016-04-08 13:40 Mms\Android.mk
文件 36207 2016-04-08 13:40 Mms\AndroidManifest.xm
文件 627 2016-04-08 13:40 Mms\apptests\Android.mk
文件 1942 2016-04-08 13:40 Mms\apptests\AndroidManifest.xm
文件 3154 2016-04-08 13:40 Mms\apptests\res\layout\sms_send_intent_test.xm
文件 1983 2016-04-08 13:40 Mms\apptests\res\values\strings.xm
文件 7834 2016-04-08 13:40 Mms\apptests\src\com\android\mms\tests\SmsSendIntentTestActivity.java
文件 2361 2016-04-08 13:40 Mms\CleanSpec.mk
文件 951 2016-04-08 13:40 Mms\ext\Android.mk
文件 330 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultAppGuideExt.java
文件 2899 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultDisplayClassZeroMessageExt.java
文件 3100 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMissedSmsReceiverExt.java
文件 2871 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsAdvanceSearchExt.java
文件 2913 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsAskIfDownloadExt.java
文件 3167 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsAttachmentEnhanceExt.java
文件 4381 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsCancelDownloadExt.java
文件 8364 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsComposeExt.java
文件 10349 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsConfigExt.java
文件 3105 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsConversationExt.java
文件 3118 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsConversationListItemExt.java
文件 3220 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsDialogModeExt.java
文件 6410 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsDialogNotifyExt.java
文件 2674 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsFailedNotifyExt.java
文件 3431 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsFeatureManagerExt.java
文件 2699 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsLongPressGuideExt.java
文件 3426 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsManageSimMessageExt.java
文件 4466 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsMessageListItemExt.java
文件 5307 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsMultiDeleteAndForwardExt.java
文件 2984 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsMultiDeleteExt.java
文件 3009 2016-04-08 13:40 Mms\ext\src\com\mediatek\mms\ext\DefaultMmsPla
............此处省略2411个文件信息
- 上一篇:JSP课程设计宠物店源码+数据库+报告
- 下一篇:Oracle设计之图书管理系统
评论
共有 条评论