summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-10-21 07:39:10 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-10-21 07:39:10 -0700
commit385a753dead6ef15f2e30eae47f73e642b3ef7ed (patch)
treeae4e55f4c7903e62f23802c7d49ad97ae5b2f0a7 /telephony
parenta376d030a2075909219926d622b71016418d7dcd (diff)
parent368fdba47a49f249aa4346edaf3f45291ca6a7ff (diff)
downloadframeworks_base-385a753dead6ef15f2e30eae47f73e642b3ef7ed.zip
frameworks_base-385a753dead6ef15f2e30eae47f73e642b3ef7ed.tar.gz
frameworks_base-385a753dead6ef15f2e30eae47f73e642b3ef7ed.tar.bz2
resolved conflicts for merge of 368fdba4 to master
Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java41
1 files changed, 17 insertions, 24 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
index 8471efa..ce6875f 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java
@@ -38,7 +38,7 @@ import android.util.Log;
*/
public class CallerInfoAsyncQuery {
- private static final boolean DBG = (SystemProperties.getInt("ro.debuggable", 0) == 1);
+ private static final boolean DBG = false;
private static final String LOG_TAG = "CallerInfoAsyncQuery";
private static final int EVENT_NEW_QUERY = 1;
@@ -129,13 +129,13 @@ public class CallerInfoAsyncQuery {
// However, if there is any code that this Handler calls (such as in
// super.handleMessage) that DOES place unexpected messages on the
// queue, then we need pass these messages on.
- if (DBG) log("Unexpected command (CookieWrapper is null): " + msg.what +
+ if (DBG) Log.d(LOG_TAG, "Unexpected command (CookieWrapper is null): " + msg.what +
" ignored by CallerInfoWorkerHandler, passing onto parent.");
super.handleMessage(msg);
} else {
- if (DBG) log("Processing event: " + cw.event + " token (arg1): " + msg.arg1 +
+ if (DBG) Log.d(LOG_TAG, "Processing event: " + cw.event + " token (arg1): " + msg.arg1 +
" command: " + msg.what + " query URI: " + sanitizeUriToString(args.uri));
switch (cw.event) {
@@ -191,7 +191,7 @@ public class CallerInfoAsyncQuery {
*/
@Override
protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
- if (DBG) log("##### onQueryComplete() ##### query complete for token: " + token);
+ if (DBG) Log.d(LOG_TAG, "##### onQueryComplete() ##### query complete for token: " + token);
//get the cookie and notify the listener.
CookieWrapper cw = (CookieWrapper) cookie;
@@ -200,7 +200,7 @@ public class CallerInfoAsyncQuery {
// from within this code.
// However, if there is any code that calls this method, we should
// check the parameters to make sure they're viable.
- if (DBG) log("Cookie is null, ignoring onQueryComplete() request.");
+ if (DBG) Log.d(LOG_TAG, "Cookie is null, ignoring onQueryComplete() request.");
return;
}
@@ -229,7 +229,7 @@ public class CallerInfoAsyncQuery {
mCallerInfo = new CallerInfo().markAsVoiceMail();
} else {
mCallerInfo = CallerInfo.getCallerInfo(mQueryContext, mQueryUri, cursor);
- if (DBG) log("==> Got mCallerInfo: " + mCallerInfo);
+ if (DBG) Log.d(LOG_TAG, "==> Got mCallerInfo: " + mCallerInfo);
// Use the number entered by the user for display.
if (!TextUtils.isEmpty(cw.number)) {
@@ -241,7 +241,7 @@ public class CallerInfoAsyncQuery {
}
}
- if (DBG) log("constructing CallerInfo object for token: " + token);
+ if (DBG) Log.d(LOG_TAG, "constructing CallerInfo object for token: " + token);
//notify that we can clean up the queue after this.
CookieWrapper endMarker = new CookieWrapper();
@@ -251,7 +251,7 @@ public class CallerInfoAsyncQuery {
//notify the listener that the query is complete.
if (cw.listener != null) {
- if (DBG) log("notifying listener: " + cw.listener.getClass().toString() +
+ if (DBG) Log.d(LOG_TAG, "notifying listener: " + cw.listener.getClass().toString() +
" for token: " + token + mCallerInfo);
cw.listener.onQueryComplete(token, cw.cookie, mCallerInfo);
}
@@ -274,7 +274,7 @@ public class CallerInfoAsyncQuery {
CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();
c.allocate(context, contactRef);
- if (DBG) log("starting query for URI: " + contactRef + " handler: " + c.toString());
+ if (DBG) Log.d(LOG_TAG, "starting query for URI: " + contactRef + " handler: " + c.toString());
//create cookieWrapper, start query
CookieWrapper cw = new CookieWrapper();
@@ -301,9 +301,9 @@ public class CallerInfoAsyncQuery {
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
OnQueryCompleteListener listener, Object cookie) {
if (DBG) {
- log("##### CallerInfoAsyncQuery startQuery()... #####");
- log("- number: " + /*number*/ "xxxxxxx");
- log("- cookie: " + cookie);
+ Log.d(LOG_TAG, "##### CallerInfoAsyncQuery startQuery()... #####");
+ Log.d(LOG_TAG, "- number: " + /*number*/ "xxxxxxx");
+ Log.d(LOG_TAG, "- cookie: " + cookie);
}
// Construct the URI object and query params, and start the query.
@@ -314,7 +314,7 @@ public class CallerInfoAsyncQuery {
if (PhoneNumberUtils.isUriNumber(number)) {
// "number" is really a SIP address.
- if (DBG) log(" - Treating number as a SIP address: " + /*number*/ "xxxxxxx");
+ if (DBG) Log.d(LOG_TAG, " - Treating number as a SIP address: " + /*number*/ "xxxxxxx");
// We look up SIP addresses directly in the Data table:
contactRef = Data.CONTENT_URI;
@@ -346,11 +346,11 @@ public class CallerInfoAsyncQuery {
}
if (DBG) {
- log("==> contactRef: " + sanitizeUriToString(contactRef));
- log("==> selection: " + selection);
+ Log.d(LOG_TAG, "==> contactRef: " + sanitizeUriToString(contactRef));
+ Log.d(LOG_TAG, "==> selection: " + selection);
if (selectionArgs != null) {
for (int i = 0; i < selectionArgs.length; i++) {
- log("==> selectionArgs[" + i + "]: " + selectionArgs[i]);
+ Log.d(LOG_TAG, "==> selectionArgs[" + i + "]: " + selectionArgs[i]);
}
}
}
@@ -388,7 +388,7 @@ public class CallerInfoAsyncQuery {
*/
public void addQueryListener(int token, OnQueryCompleteListener listener, Object cookie) {
- if (DBG) log("adding listener to query: " + sanitizeUriToString(mHandler.mQueryUri) +
+ if (DBG) Log.d(LOG_TAG, "adding listener to query: " + sanitizeUriToString(mHandler.mQueryUri) +
" handler: " + mHandler.toString());
//create cookieWrapper, add query request to end of queue.
@@ -436,11 +436,4 @@ public class CallerInfoAsyncQuery {
return "";
}
}
-
- /**
- * static logging method
- */
- private static void log(String msg) {
- Log.d(LOG_TAG, msg);
- }
}