STK : Fix STK input activity when rotated handset

    When user is writing password in STK and then rotates the device,
    the password numbers are displaying. And STK send the unexpected
    Terminal Response to the UICC, so it causes wrong behavior.
    Bug: 10383311, 10382809

Change-Id: I2fbce28a73fa15183e45bfc85791d4b11612aa4b
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 994abdb..e750e93 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -47,7 +47,8 @@
 	         </intent-filter>
          </activity>
 
-		<activity android:name="StkInputActivity">
+         <activity android:name="StkInputActivity"
+            android:configChanges="orientation|screenSize">
 			<intent-filter>
 		        <action android:name="android.intent.action.VIEW" />
 		        <action android:name="android.intent.action.EDIT" />
@@ -56,7 +57,8 @@
 		</activity>
 
         <activity android:name="StkDialogActivity"
-            android:theme="@android:style/Theme.Dialog">
+            android:theme="@android:style/Theme.Dialog"
+            android:configChanges="orientation|screenSize">
         </activity>
 
         <activity android:name="ToneDialog"
diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java
index fb81469..1e70394 100644
--- a/src/com/android/stk/StkInputActivity.java
+++ b/src/com/android/stk/StkInputActivity.java
@@ -25,6 +25,7 @@
 import android.os.Message;
 import android.text.Editable;
 import android.text.InputFilter;
+import android.text.InputType;
 import android.text.TextWatcher;
 import android.text.method.PasswordTransformationMethod;
 import android.view.KeyEvent;
@@ -303,8 +304,8 @@
             numOfCharsView.setText(lengthLimit);
 
             if (!mStkInput.echo) {
-                mTextIn.setTransformationMethod(PasswordTransformationMethod
-                        .getInstance());
+                mTextIn.setInputType(InputType.TYPE_CLASS_NUMBER
+                                     | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
             }
             // Set default text if present.
             if (mStkInput.defaultText != null) {