Back out c1881e7e046c on suspicion of causing talos failures

This commit is contained in:
Matt Brubeck 2011-11-09 13:17:37 -08:00
parent bb8919e177
commit f61ffff515
2 changed files with 7 additions and 15 deletions

View File

@ -129,7 +129,6 @@
<activity android:name="org.mozilla.gecko.AwesomeBar"
android:theme="@android:style/Theme.Translucent"
android:configChanges="orientation"
android:windowSoftInputMode="stateAlwaysVisible|adjustResize"
android:windowIsTranslucent="true"
android:windowContentOverlay="@null"

View File

@ -44,7 +44,6 @@ import java.io.File;
import android.app.Activity;
import android.content.Intent;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
@ -66,7 +65,6 @@ public class AwesomeBar extends Activity {
private String mType;
private AwesomeBarTabs mAwesomeTabs;
private EditText mText;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -84,17 +82,17 @@ public class AwesomeBar extends Activity {
}
});
mText = (EditText)findViewById(R.id.awesomebar_text);
final EditText text = (EditText)findViewById(R.id.awesomebar_text);
Intent intent = getIntent();
String currentUrl = intent.getStringExtra(CURRENT_URL_KEY);
mType = intent.getStringExtra(TYPE_KEY);
if (currentUrl != null) {
mText.setText(currentUrl);
mText.selectAll();
text.setText(currentUrl);
text.selectAll();
}
mText.addTextChangedListener(new TextWatcher() {
text.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
// do nothing
}
@ -110,13 +108,13 @@ public class AwesomeBar extends Activity {
}
});
mText.setOnKeyListener(new View.OnKeyListener() {
text.setOnKeyListener(new View.OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
if (event.getAction() != KeyEvent.ACTION_DOWN)
return true;
openUrlAndFinish(mText.getText().toString());
openUrlAndFinish(text.getText().toString());
return true;
} else {
return false;
@ -124,7 +122,7 @@ public class AwesomeBar extends Activity {
}
});
mText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
text.setOnFocusChangeListener(new View.OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
@ -134,11 +132,6 @@ public class AwesomeBar extends Activity {
});
}
@Override
public void onConfigurationChanged(Configuration newConfiguration) {
super.onConfigurationChanged(newConfiguration);
}
private void openUrlAndFinish(String url) {
Intent resultIntent = new Intent();
resultIntent.putExtra(URL_KEY, url);