Bug 920935 - Reading list items opened using keywords are not opened in Reading List. r=lucasr

This commit is contained in:
Sunny 2013-10-31 12:03:45 -04:00
Родитель c90e808628
Коммит 1777426401
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -37,6 +37,7 @@ import org.json.JSONObject;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
@ -1484,6 +1485,15 @@ abstract public class BrowserApp extends GeckoApp
return;
}
// If the keywordUrl is in ReadingList, convert the url to an about:reader url and load it.
final ContentResolver cr = getContentResolver();
final boolean inReadingList = BrowserDB.isReadingListItem(cr, keywordUrl);
if (inReadingList) {
final String readerUrl = ReaderModeUtils.getAboutReaderForUrl(keywordUrl);
Tabs.getInstance().loadUrl(readerUrl, Tabs.LOADURL_USER_ENTERED);
return;
}
recordSearch(null, "barkeyword");
// Otherwise, construct a search query from the bookmark keyword.