Back out e8fae7f2ce39 (bug 781318) because of reftest failure

This commit is contained in:
Matt Brubeck 2012-08-15 19:48:31 -04:00
parent e73aa21788
commit 8d3664b927
2 changed files with 3 additions and 20 deletions

View File

@ -36,7 +36,6 @@ import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.view.inputmethod.InputMethodManager;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;
@ -84,7 +83,6 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
private String label = "";
private String type = "";
private String hint = "";
private Boolean autofocus = false;
private JSONObject mJSONInput = null;
private View view = null;
@ -99,9 +97,6 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
try {
hint = aJSONInput.getString("hint");
} catch(Exception ex) { }
try {
autofocus = aJSONInput.getBoolean("autofocus");
} catch(Exception ex) { }
}
public View getView() {
@ -130,18 +125,6 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
if (!hint.equals("")) {
input.setHint(hint);
}
if (autofocus) {
input.setOnFocusChangeListener(new View.OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
((InputMethodManager) GeckoApp.mAppContext.getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(v, 0);
}
}
});
input.requestFocus();
}
view = (View)input;
} else if (type.equals("menulist")) {
Spinner spinner = new Spinner(GeckoApp.mAppContext);

View File

@ -248,7 +248,7 @@ Prompt.prototype = {
},
nsIPrompt_prompt: function nsIPrompt_prompt(aTitle, aText, aValue, aCheckMsg, aCheckState) {
let inputs = [{ type: "textbox", value: aValue.value, autofocus: true }];
let inputs = [{ type: "textbox", value: aValue.value }];
let data = this.commonPrompt(aTitle, aText, null, aCheckMsg, aCheckState, inputs);
let ok = data.button == 0;
@ -261,7 +261,7 @@ Prompt.prototype = {
nsIPrompt_promptPassword: function nsIPrompt_promptPassword(
aTitle, aText, aPassword, aCheckMsg, aCheckState) {
let inputs = [{ type: "password", hint: PromptUtils.getLocaleString("password", "passwdmgr"), value: aPassword.value || "", autofocus: true }];
let inputs = [{ type: "password", hint: PromptUtils.getLocaleString("password", "passwdmgr"), value: aPassword.value || "" }];
let data = this.commonPrompt(aTitle, aText, null, aCheckMsg, aCheckState, inputs);
let ok = data.button == 0;
@ -274,7 +274,7 @@ Prompt.prototype = {
nsIPrompt_promptUsernameAndPassword: function nsIPrompt_promptUsernameAndPassword(
aTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState) {
let inputs = [{ type: "textbox", hint: PromptUtils.getLocaleString("username", "passwdmgr"), value: aUsername.value, autofocus: true },
let inputs = [{ type: "textbox", hint: PromptUtils.getLocaleString("username", "passwdmgr"), value: aUsername.value },
{ type: "password", hint: PromptUtils.getLocaleString("password", "passwdmgr"), value: aPassword.value }];
let data = this.commonPrompt(aTitle, aText, null, aCheckMsg, aCheckState, inputs);