Make intent broadcasts in "am" synchronous (they wait until exit).

Clean up error handling and reporting in "am".
Make the usage message for "am" more informative.

Make it easier to turn on logging in GoogleHttpClient.
This commit is contained in:
Dan Egnor
2009-07-22 14:06:56 -07:00
parent 2f140bdb8a
commit 9f4af53561
2 changed files with 264 additions and 310 deletions

View File

@@ -58,8 +58,8 @@ import java.net.URISyntaxException;
* and otherwise tweak HTTP requests.
*/
public class GoogleHttpClient implements HttpClient {
private static final String TAG = "GoogleHttpClient";
private static final boolean LOCAL_LOGV = Config.LOGV || false;
/** Exception thrown when a request is blocked by the URL rules. */
public static class BlockedRequestException extends IOException {
@@ -289,9 +289,7 @@ public class GoogleHttpClient implements HttpClient {
wrapper.setURI(uri);
request = wrapper;
if (Config.LOGV) {
Log.v(TAG, "Rule " + rule.mName + ": " + original + " -> " + rewritten);
}
if (LOCAL_LOGV) Log.v(TAG, "Rule " + rule.mName + ": " + original + " -> " + rewritten);
return executeWithoutRewriting(request, context);
}