packages/apps/Browser
Revisión | b9f31c6bdc9fb20c88b8f6cf4a39f627fa228a83 (tree) |
---|---|
Tiempo | 2011-05-28 05:43:23 |
Autor | John Reck <jreck@goog...> |
Commiter | Android (Google) Code Review |
Merge "DO NOT MERGE Fix vanishing title/url in window picker" into gingerbread
@@ -43,6 +43,7 @@ import android.os.Message; | ||
43 | 43 | import android.os.SystemClock; |
44 | 44 | import android.provider.Browser; |
45 | 45 | import android.speech.RecognizerResultsIntent; |
46 | +import android.text.TextUtils; | |
46 | 47 | import android.util.Log; |
47 | 48 | import android.view.KeyEvent; |
48 | 49 | import android.view.LayoutInflater; |
@@ -1862,8 +1863,8 @@ class Tab { | ||
1862 | 1863 | // Populate the picker data using the given history item and the current top |
1863 | 1864 | // WebView. |
1864 | 1865 | private void populatePickerData(WebHistoryItem item) { |
1865 | - mPickerData = new PickerData(); | |
1866 | - if (item != null) { | |
1866 | + if (item != null && !TextUtils.isEmpty(item.getUrl())) { | |
1867 | + mPickerData = new PickerData(); | |
1867 | 1868 | mPickerData.mUrl = item.getUrl(); |
1868 | 1869 | mPickerData.mTitle = item.getTitle(); |
1869 | 1870 | mPickerData.mFavicon = item.getFavicon(); |
@@ -1950,7 +1951,6 @@ class Tab { | ||
1950 | 1951 | // Restore the internal state even if the WebView fails to restore. |
1951 | 1952 | // This will maintain the app id, original url and close-on-exit values. |
1952 | 1953 | mSavedState = null; |
1953 | - mPickerData = null; | |
1954 | 1954 | mCloseOnExit = b.getBoolean(CLOSEONEXIT); |
1955 | 1955 | mAppId = b.getString(APPID); |
1956 | 1956 | mOriginalUrl = b.getString(ORIGINALURL); |