import android.os.SystemClock;
import android.provider.Browser;
import android.speech.RecognizerResultsIntent;
+import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
// Populate the picker data using the given history item and the current top
// WebView.
private void populatePickerData(WebHistoryItem item) {
- mPickerData = new PickerData();
- if (item != null) {
+ if (item != null && !TextUtils.isEmpty(item.getUrl())) {
+ mPickerData = new PickerData();
mPickerData.mUrl = item.getUrl();
mPickerData.mTitle = item.getTitle();
mPickerData.mFavicon = item.getFavicon();
// Restore the internal state even if the WebView fails to restore.
// This will maintain the app id, original url and close-on-exit values.
mSavedState = null;
- mPickerData = null;
mCloseOnExit = b.getBoolean(CLOSEONEXIT);
mAppId = b.getString(APPID);
mOriginalUrl = b.getString(ORIGINALURL);