diff options
| author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-21 15:31:08 +0000 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-21 15:31:08 +0000 |
| commit | f3eedad48060d312ed7ee6edec2a71f3cce4f22a (patch) | |
| tree | e667e130df9b81ca63d9588751ecffa57e77ce18 /apps | |
| parent | b4ccad3c03bcb85202dc219de47397d2b433266b (diff) | |
| download | android_development-f3eedad48060d312ed7ee6edec2a71f3cce4f22a.tar.gz android_development-f3eedad48060d312ed7ee6edec2a71f3cce4f22a.tar.bz2 android_development-f3eedad48060d312ed7ee6edec2a71f3cce4f22a.zip | |
Revert "Dev Tools: Mock SMS"
This reverts commit 32b56a6be2a346548ca547b812bc5f6271ddbda7.
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/Development/AndroidManifest.xml | 8 | ||||
| -rw-r--r-- | apps/Development/res/layout/sms_tester.xml | 92 | ||||
| -rw-r--r-- | apps/Development/res/values/strings.xml | 10 | ||||
| -rw-r--r-- | apps/Development/src/com/android/development/SMSTester.java | 95 |
4 files changed, 0 insertions, 205 deletions
diff --git a/apps/Development/AndroidManifest.xml b/apps/Development/AndroidManifest.xml index 646851162..7a16f1dfa 100644 --- a/apps/Development/AndroidManifest.xml +++ b/apps/Development/AndroidManifest.xml @@ -43,7 +43,6 @@ <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" /> <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES" /> <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser" /> - <uses-permission android:name="android.permission.SEND_MOCK_SMS" /> <application android:label="Dev Tools" android:icon="@mipmap/ic_launcher_devtools"> @@ -185,12 +184,5 @@ </intent-filter> </activity> - <activity android:name="SMSTester" android:label="SMS Tester"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.TEST" /> - </intent-filter> - </activity> - </application> </manifest> diff --git a/apps/Development/res/layout/sms_tester.xml b/apps/Development/res/layout/sms_tester.xml deleted file mode 100644 index d316bb22c..000000000 --- a/apps/Development/res/layout/sms_tester.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ** Copyright (C) 2012 The CyanogenMod 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. ---> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:scrollbars="vertical"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_mock_title" - android:textSize="20dp" /> - <TextView - android:background="#ff33b5e5" - android:layout_width="match_parent" - android:layout_height="2dp" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_smsc_address_title" /> - <EditText - android:id="@+id/sms_tester_mock_sms_sc" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_default_address" - android:hint="@null" - android:singleLine="true" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_sender_address_title" /> - <EditText - android:id="@+id/sms_tester_mock_sms_sender" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_default_address" - android:hint="@null" - android:singleLine="true" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_message_title" /> - <EditText - android:id="@+id/sms_tester_mock_sms_msg" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sms_default_msg" - android:hint="@null" - android:singleLine="false" - android:lines="10" - android:minLines="10" - android:gravity="top|left" - android:scrollbars="vertical" /> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - <Button - android:id="@+id/sms_tester_mock_sms_send_msg" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/sms_send_msg" /> - <Button - android:id="@+id/sms_tester_mock_sms_send_pdu" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/sms_send_pdu" /> - </LinearLayout> - -</LinearLayout> diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml index 7f5bdc9c2..10879316f 100644 --- a/apps/Development/res/values/strings.xml +++ b/apps/Development/res/values/strings.xml @@ -231,14 +231,4 @@ <string name="scancard">Scan SD card</string> <string name="numsongs"># of albums</string> <string name="insertbutton">Insert %1s albums</string> - - <!-- Mock SMS --> - <string name="sms_mock_title">Mock SMS</string> - <string name="sms_smsc_address_title">SMSC Address:</string> - <string name="sms_sender_address_title">Sender Address:</string> - <string name="sms_message_title">Message:</string> - <string name="sms_send_msg">Send Mock SMS Message</string> - <string name="sms_send_pdu">Send Mock SMS PDU</string> - <string name="sms_default_address">+01123456789</string> - <string name="sms_default_msg">This is a mock SMS message.</string> </resources> diff --git a/apps/Development/src/com/android/development/SMSTester.java b/apps/Development/src/com/android/development/SMSTester.java deleted file mode 100644 index 5e467aa0a..000000000 --- a/apps/Development/src/com/android/development/SMSTester.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2012 The CyanogenMod 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.development; - -import android.app.Activity; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.os.Bundle; -import android.provider.Telephony.Sms.Intents; -import android.text.TextUtils; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.TextView; - -import com.android.internal.util.HexDump; - -public class SMSTester extends Activity { - - private final String MOCK_PDU = - "07914151551512f2040B916105551511f100006060605130308A04D4F29C0E"; - - private EditText mSc; - private EditText mSender; - private EditText mMsg; - - @Override - protected void onCreate(Bundle icicle) { - super.onCreate(icicle); - setContentView(R.layout.sms_tester); - - mSc = (EditText)findViewById(R.id.sms_tester_mock_sms_sc); - mSender = (EditText)findViewById(R.id.sms_tester_mock_sms_sender); - mMsg = (EditText)findViewById(R.id.sms_tester_mock_sms_msg); - - Button btnMockSms = (Button)findViewById(R.id.sms_tester_mock_sms_send_msg); - btnMockSms.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - String sc = mSc.getText().toString(); - String sender = mSender.getText().toString(); - String msg = mMsg.getText().toString(); - - Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION); - if (!TextUtils.isEmpty(sc)) { - in.putExtra("scAddr", sc); - } - if (!TextUtils.isEmpty(sender)) { - in.putExtra("senderAddr", sender); - } - if (!TextUtils.isEmpty(msg)) { - in.putExtra("msg", msg); - } - sendBroadcast(in); - } - }); - Button btnMockSmsPdu = (Button)findViewById(R.id.sms_tester_mock_sms_send_pdu); - btnMockSmsPdu.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - byte[][] pdus = new byte[1][]; - pdus[0] = HexDump.hexStringToByteArray(MOCK_PDU); - Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION); - in.putExtra("pdus", pdus); - sendBroadcast(in); - } - }); - } - - @Override - protected void onResume() { - super.onResume(); - } - - @Override - protected void onStop() { - super.onStop(); - } -} - |
