The input field should have a focus on the input screen by default

The focus should be given to the input field on the input screen by
default to activate software keyboard automatically, if implemented.

Bug: 112735924
Test: Confirmed the expected behaviors mentioned in GSMA PDATA.12

Change-Id: I99ab76e26dc1fb0efae316b7d9692607af235f30
diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java
index fa688c7..1192206 100644
--- a/src/com/android/stk/StkInputActivity.java
+++ b/src/com/android/stk/StkInputActivity.java
@@ -33,6 +33,7 @@
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.WindowManager;
 import android.view.inputmethod.EditorInfo;
 import android.widget.Button;
 import android.widget.EditText;
@@ -501,6 +502,10 @@
                         .getInstance());
             }
             mTextIn.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN);
+            // Request the initial focus on the edit box and show the software keyboard.
+            mTextIn.requestFocus();
+            getWindow().setSoftInputMode(
+                    WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
             // Set default text if present.
             if (mStkInput.defaultText != null) {
                 mTextIn.setText(mStkInput.defaultText);