Merge change Iaca22686 into eclair

* changes:
  Work on issue #2163789: Way too much logging
This commit is contained in:
Android (Google) Code Review
2009-10-04 18:35:24 -04:00
11 changed files with 34 additions and 23 deletions

View File

@ -1028,7 +1028,7 @@ public class SyncStorageEngine extends Handler {
ident++;
}
}
Log.d(TAG, "created a new AuthorityInfo for " + accountName
if (DEBUG) Log.v(TAG, "created a new AuthorityInfo for " + accountName
+ ", provider " + authorityName);
authority = new AuthorityInfo(accountName, authorityName, ident);
account.authorities.put(authorityName, authority);

View File

@ -973,8 +973,9 @@ public class PackageParser {
return null;
} else {
Log.w(TAG, "Bad element under <manifest>: "
+ parser.getName());
Log.w(TAG, "Unknown element under <manifest>: " + parser.getName()
+ " at " + mArchiveSourcePath + " "
+ parser.getPositionDescription());
XmlUtils.skipCurrentTag(parser);
continue;
}
@ -1729,8 +1730,9 @@ public class PackageParser {
return null;
}
if (intent.countActions() == 0) {
Log.w(TAG, "Intent filter for activity " + intent
+ " defines no actions");
Log.w(TAG, "No actions in intent filter at "
+ mArchiveSourcePath + " "
+ parser.getPositionDescription());
} else {
a.intents.add(intent);
}
@ -1877,8 +1879,9 @@ public class PackageParser {
return null;
}
if (intent.countActions() == 0) {
Log.w(TAG, "Intent filter for activity alias " + intent
+ " defines no actions");
Log.w(TAG, "No actions in intent filter at "
+ mArchiveSourcePath + " "
+ parser.getPositionDescription());
} else {
a.intents.add(intent);
}

View File

@ -42,7 +42,7 @@ import android.text.TextUtils;
public class MobileDataStateTracker extends NetworkStateTracker {
private static final String TAG = "MobileDataStateTracker";
private static final boolean DBG = true;
private static final boolean DBG = false;
private Phone.DataState mMobileDataState;
private ITelephony mPhoneService;

View File

@ -41,7 +41,6 @@ public class LocalTransport extends IBackupTransport.Stub {
public LocalTransport(Context context) {
if (DEBUG) Log.v(TAG, "Transport constructed");
mContext = context;
mPackageManager = context.getPackageManager();
}

View File

@ -53,7 +53,7 @@ import java.util.List;
*/
public class ConnectivityService extends IConnectivityManager.Stub {
private static final boolean DBG = true;
private static final boolean DBG = false;
private static final String TAG = "ConnectivityService";
// Event log tags (must be in sync with event-log-tags)

View File

@ -48,6 +48,7 @@ import java.util.ArrayList;
public abstract class KeyInputQueue {
static final String TAG = "KeyInputQueue";
static final boolean DEBUG = false;
static final boolean DEBUG_VIRTUAL_KEYS = false;
static final boolean DEBUG_POINTERS = false;
@ -200,7 +201,7 @@ public abstract class KeyInputQueue {
FileInputStream fis = new FileInputStream(
"/sys/board_properties/virtualkeys." + deviceName);
InputStreamReader isr = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(isr);
BufferedReader br = new BufferedReader(isr, 2048);
String str = br.readLine();
if (str != null) {
String[] it = str.split(":");
@ -257,7 +258,7 @@ public abstract class KeyInputQueue {
}
String name = parser.getAttributeValue(null, "name");
if (name != null) {
Log.d(TAG, "addExcludedDevice " + name);
if (DEBUG) Log.v(TAG, "addExcludedDevice " + name);
addExcludedDevice(name);
}
}
@ -413,7 +414,7 @@ public abstract class KeyInputQueue {
Thread mThread = new Thread("InputDeviceReader") {
public void run() {
Log.d(TAG, "InputDeviceReader.run()");
if (DEBUG) Log.v(TAG, "InputDeviceReader.run()");
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);

View File

@ -32,13 +32,14 @@ import java.io.RandomAccessFile;
class RandomBlock {
private static final String TAG = "RandomBlock";
private static final boolean DEBUG = false;
private static final int BLOCK_SIZE = 4096;
private byte[] block = new byte[BLOCK_SIZE];
private RandomBlock() { }
static RandomBlock fromFile(String filename) throws IOException {
Log.v(TAG, "reading from file " + filename);
if (DEBUG) Log.v(TAG, "reading from file " + filename);
InputStream stream = null;
try {
stream = new FileInputStream(filename);
@ -62,7 +63,7 @@ class RandomBlock {
}
void toFile(String filename) throws IOException {
Log.v(TAG, "writing to file " + filename);
if (DEBUG) Log.v(TAG, "writing to file " + filename);
RandomAccessFile out = null;
try {
out = new RandomAccessFile(filename, "rws");

View File

@ -9183,7 +9183,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
pw.print(" lowMem="); pw.print(proc.reportLowMemory);
pw.print(", last gced=");
pw.print(now-proc.lastRequestedGc);
pw.print(" ms ago, last lowMwm=");
pw.print(" ms ago, last lowMem=");
pw.print(now-proc.lastLowMemory);
pw.println(" ms ago");
@ -12306,8 +12306,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
// broadcast, then do nothing at this point. Just in case, we
// check that the process we're waiting for still exists.
if (mPendingBroadcast != null) {
Log.i(TAG, "processNextBroadcast: waiting for "
+ mPendingBroadcast.curApp);
if (DEBUG_BROADCAST_LIGHT) {
Log.v(TAG, "processNextBroadcast: waiting for "
+ mPendingBroadcast.curApp);
}
boolean isDead;
synchronized (mPidsSelfLocked) {

View File

@ -149,6 +149,11 @@ class StatusBarIcon {
r = context.getResources();
}
if (data.iconId == 0) {
Log.w(StatusBarService.TAG, "No icon ID for slot " + data.slot);
return null;
}
try {
return r.getDrawable(data.iconId);
} catch (RuntimeException e) {

View File

@ -1180,16 +1180,16 @@ public class StatusBarPolicy {
final String action = intent.getAction();
final boolean enabled = intent.getBooleanExtra(TtyIntent.TTY_ENABLED, false);
Log.i(TAG, "updateTTY: enabled: " + enabled);
if (false) Log.v(TAG, "updateTTY: enabled: " + enabled);
if (enabled) {
// TTY is on
Log.i(TAG, "updateTTY: set TTY on");
if (false) Log.v(TAG, "updateTTY: set TTY on");
mService.updateIcon(mTTYModeIcon, mTTYModeEnableIconData, null);
mService.setIconVisibility(mTTYModeIcon, true);
} else {
// TTY is off
Log.i(TAG, "updateTTY: set TTY off");
if (false) Log.v(TAG, "updateTTY: set TTY off");
mService.setIconVisibility(mTTYModeIcon, false);
}
}
@ -1220,7 +1220,7 @@ public class StatusBarPolicy {
}
if (iconIndex == EriInfo.ROAMING_INDICATOR_OFF) {
Log.d(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
if (false) Log.v(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
return;
}

View File

@ -1733,7 +1733,7 @@ public class StatusBarService extends IStatusBar.Stub
mOngoingTitle.setText(mContext.getText(R.string.status_bar_ongoing_events_title));
mLatestTitle.setText(mContext.getText(R.string.status_bar_latest_events_title));
mNoNotificationsTitle.setText(mContext.getText(R.string.status_bar_no_notifications_title));
Log.d(TAG, "updateResources");
if (false) Log.v(TAG, "updateResources");
}
//