diff options
Diffstat (limited to 'src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java')
-rw-r--r-- | src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java b/src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java index b52a67b1f..f17784303 100644 --- a/src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java +++ b/src/com/android/dialer/lookup/yellowpages/YellowPagesApi.java @@ -22,8 +22,6 @@ import android.text.TextUtils; import com.android.dialer.lookup.LookupSettings; import com.android.dialer.lookup.LookupUtils; -import org.apache.http.client.methods.HttpGet; - import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -54,11 +52,11 @@ public class YellowPagesApi { } private void fetchPage() throws IOException { - mOutput = LookupUtils.httpGet(new HttpGet(mLookupUrl + mNumber)); + mOutput = LookupUtils.httpGet(mLookupUrl + mNumber, null); } private String getPhotoUrl(String website) throws IOException { - String output = LookupUtils.httpGet(new HttpGet(website)); + String output = LookupUtils.httpGet(website, null); String galleryRef = LookupUtils.firstRegexResult(output, "href=\"([^\"]+gallery\\?lid=[^\"]+)\"", true); if (galleryRef == null) { @@ -66,10 +64,8 @@ public class YellowPagesApi { } // Get first image - HttpGet get = new HttpGet("http://www.yellowpages.com" + galleryRef); - output = LookupUtils.httpGet(get); - - return LookupUtils.firstRegexResult(output, + return LookupUtils.firstRegexResult( + LookupUtils.httpGet("http://www.yellowpages.com" + galleryRef, null), "\"type\":\"image\",\"src\":\"([^\"]+)\"", true); } |