Back out 9f76571216ff (bug 880650) for test failures

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2013-06-11 20:43:00 -07:00
parent 9da62b7959
commit 311073b449
4 changed files with 9 additions and 3 deletions

View File

@ -228,7 +228,7 @@
<activity android:name="org.mozilla.gecko.AwesomeBar"
android:theme="@style/Gecko.AwesomeBar"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateUnspecified|adjustResize"/>
android:windowSoftInputMode="stateAlwaysVisible|adjustResize"/>
<activity android:name="org.mozilla.gecko.GeckoPreferences"
android:theme="@style/Gecko.Preferences"

View File

@ -121,6 +121,8 @@ public class AwesomeBar extends GeckoActivity
mText.setText(text);
mText.setSelection(mText.getText().length());
mText.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mText, InputMethodManager.SHOW_IMPLICIT);
}
});
}
@ -144,6 +146,7 @@ public class AwesomeBar extends GeckoActivity
String currentUrl = intent.getStringExtra(CURRENT_URL_KEY);
if (currentUrl != null) {
mText.setText(currentUrl);
mText.selectAll();
}
mTarget = intent.getStringExtra(TARGET_KEY);
@ -217,8 +220,7 @@ public class AwesomeBar extends GeckoActivity
return;
}
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
try {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
} catch (NullPointerException e) {
@ -469,6 +471,8 @@ public class AwesomeBar extends GeckoActivity
} else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
mText.setText("");
mText.requestFocus();
InputMethodManager imm = (InputMethodManager) mText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mText, InputMethodManager.SHOW_IMPLICIT);
return true;
} else {
int prevSelStart = mText.getSelectionStart();

View File

@ -16,6 +16,7 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.TabHost;
import android.widget.TabWidget;

View File

@ -41,6 +41,7 @@
android:singleLine="true"
android:gravity="center_vertical|left"
gecko:autoUpdateTheme="false">
<requestFocus/>
</view>
<LinearLayout android:layout_width="4dp"