Add support to pass password in Call barring

- Adding password support for call barring over IMS

Test: Manual
Bug: 112248618
Change-Id: If86291fa3aa74e34fdb715cc4c6d832b5cc32600
diff --git a/src/com/android/phone/CallBarringDeselectAllPreference.java b/src/com/android/phone/CallBarringDeselectAllPreference.java
index e9310f8..7191937 100644
--- a/src/com/android/phone/CallBarringDeselectAllPreference.java
+++ b/src/com/android/phone/CallBarringDeselectAllPreference.java
@@ -19,12 +19,9 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.view.View;
 import android.widget.EditText;
 
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.imsphone.ImsPhone;
 import com.android.phone.settings.fdn.EditPinPreference;
 
 /**
@@ -34,9 +31,6 @@
     private static final String LOG_TAG = "CallBarringDeselectAllPreference";
     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
 
-    private boolean mShowPassword;
-    private Phone mPhone;
-
     /**
      * CallBarringDeselectAllPreference constructor.
      *
@@ -49,28 +43,10 @@
 
     @Override
     protected void showDialog(Bundle state) {
-        // Finds out if the password field should be shown or not.
-        ImsPhone imsPhone = mPhone != null ? (ImsPhone) mPhone.getImsPhone() : null;
-        mShowPassword = !(imsPhone != null && imsPhone.isUtEnabled());
-
-        // Selects dialog message depending on if the password field is shown or not.
-        setDialogMessage(getContext().getString(mShowPassword
-                ? R.string.messageCallBarring : R.string.call_barring_deactivate_all_no_password));
-
-        if (DBG) {
-            Log.d(LOG_TAG, "showDialog: mShowPassword: " + mShowPassword);
-        }
-
+        setDialogMessage(getContext().getString(R.string.messageCallBarring));
         super.showDialog(state);
     }
 
-    void init(Phone phone) {
-        if (DBG) {
-            Log.d(LOG_TAG, "init: phoneId = " + phone.getPhoneId());
-        }
-        mPhone = phone;
-    }
-
     @Override
     protected void onBindDialogView(View view) {
         super.onBindDialogView(view);
@@ -78,20 +54,7 @@
         final EditText editText = (EditText) view.findViewById(android.R.id.edit);
         if (editText != null) {
             // Hide the input-text-line if the password is not shown.
-            editText.setVisibility(mShowPassword ? View.VISIBLE : View.GONE);
+            editText.setVisibility(View.VISIBLE);
         }
     }
-
-    @Override
-    protected boolean needInputMethod() {
-        // Input method should only be displayed if the password-field is shown.
-        return mShowPassword;
-    }
-
-    /**
-     * Returns whether the password field is shown.
-     */
-    boolean isPasswordShown() {
-        return mShowPassword;
-    }
 }