resolved conflicts for merge of 368fdba4 to master

Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
This commit is contained in:
Brad Fitzpatrick
2010-10-21 07:39:10 -07:00
15 changed files with 78 additions and 67 deletions

View File

@@ -664,11 +664,11 @@ class BackupManagerService extends IBackupManager.Stub {
// backup.
RandomAccessFile in = null;
try {
Slog.i(TAG, "Found stale backup journal, scheduling:");
Slog.i(TAG, "Found stale backup journal, scheduling");
in = new RandomAccessFile(f, "r");
while (true) {
String packageName = in.readUTF();
Slog.i(TAG, " + " + packageName);
Slog.i(TAG, " " + packageName);
dataChangedImpl(packageName);
}
} catch (EOFException e) {

View File

@@ -700,9 +700,6 @@ public class NotificationManagerService extends INotificationManager.Stub
public void enqueueNotificationInternal(String pkg, int callingUid, int callingPid,
String tag, int id, Notification notification, int[] idOut)
{
Slog.d(TAG, "enqueueNotificationWithTag: calling uid=" + callingUid
+ ", pid=" + callingPid);
checkIncomingCall(pkg);
// Limit the number of notifications that any given package except the android

View File

@@ -2500,7 +2500,9 @@ class PackageManagerService extends IPackageManager.Stub {
return;
}
Log.d(TAG, "Scanning app dir " + dir);
if (false) {
Log.d(TAG, "Scanning app dir " + dir);
}
int i;
for (i=0; i<files.length; i++) {
@@ -2866,10 +2868,8 @@ class PackageManagerService extends IPackageManager.Stub {
TAG, "Scanning package " + pkg.packageName);
if (mPackages.containsKey(pkg.packageName)
|| mSharedLibraries.containsKey(pkg.packageName)) {
Slog.w(TAG, "*************************************************");
Slog.w(TAG, "Application package " + pkg.packageName
+ " already installed. Skipping duplicate.");
Slog.w(TAG, "*************************************************");
mLastScanError = PackageManager.INSTALL_FAILED_DUPLICATE_PACKAGE;
return null;
}

View File

@@ -54,7 +54,7 @@ import java.util.Map;
public class StatusBarManagerService extends IStatusBarService.Stub
{
static final String TAG = "StatusBarManagerService";
static final boolean SPEW = true;
static final boolean SPEW = false;
final Context mContext;
Handler mHandler = new Handler();
@@ -161,7 +161,6 @@ public class StatusBarManagerService extends IStatusBarService.Stub
synchronized (mDisableRecords) {
manageDisableListLocked(what, token, pkg);
final int net = gatherDisableActionsLocked();
Slog.d(TAG, "disable... net=0x" + Integer.toHexString(net));
if (net != mDisabled) {
mDisabled = net;
mHandler.post(new Runnable() {

View File

@@ -260,6 +260,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
if (!checkNotifyPermission("notifyServiceState()")){
return;
}
Slog.i(TAG, "notifyServiceState: " + state);
synchronized (mRecords) {
mServiceState = state;
for (Record r : mRecords) {
@@ -363,6 +364,9 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
if (!checkNotifyPermission("notifyDataConnection()" )) {
return;
}
Slog.i(TAG, "notifyDataConnection: state=" + state + " isDataConnectivityPossible="
+ isDataConnectivityPossible + " reason=" + reason
+ " interfaceName=" + interfaceName + " networkType=" + networkType);
synchronized (mRecords) {
boolean modified = false;
if (state == TelephonyManager.DATA_CONNECTED) {

View File

@@ -889,7 +889,9 @@ public class WifiService extends IWifiManager.Stub {
Settings.System.getInt(mContext.getContentResolver(),
Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
if (action.equals(Intent.ACTION_SCREEN_ON)) {
Slog.d(TAG, "ACTION_SCREEN_ON");
if (DBG) {
Slog.d(TAG, "ACTION_SCREEN_ON");
}
mAlarmManager.cancel(mIdleIntent);
mDeviceIdle = false;
mScreenOff = false;
@@ -899,7 +901,9 @@ public class WifiService extends IWifiManager.Stub {
mWifiStateMachine.enableRssiPolling(true);
updateWifiState();
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
Slog.d(TAG, "ACTION_SCREEN_OFF");
if (DBG) {
Slog.d(TAG, "ACTION_SCREEN_OFF");
}
mScreenOff = true;
mWifiStateMachine.enableRssiPolling(false);
/*
@@ -916,19 +920,26 @@ public class WifiService extends IWifiManager.Stub {
// but not as long as we would if connected (below)
// TODO - fix the race conditions and switch back to the immediate turn-off
long triggerTime = System.currentTimeMillis() + (2*60*1000); // 2 min
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for 120,000 ms");
if (DBG) {
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for 120,000 ms");
}
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
// // do not keep Wifi awake when screen is off if Wifi is not associated
// mDeviceIdle = true;
// updateWifiState();
} else {
long triggerTime = System.currentTimeMillis() + idleMillis;
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
if (DBG) {
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis
+ "ms");
}
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
}
}
} else if (action.equals(ACTION_DEVICE_IDLE)) {
Slog.d(TAG, "got ACTION_DEVICE_IDLE");
if (DBG) {
Slog.d(TAG, "got ACTION_DEVICE_IDLE");
}
mDeviceIdle = true;
reportStartWorkSource();
updateWifiState();
@@ -941,10 +952,15 @@ public class WifiService extends IWifiManager.Stub {
* the already-set timer.
*/
int pluggedType = intent.getIntExtra("plugged", 0);
if (DBG) {
Slog.d(TAG, "ACTION_BATTERY_CHANGED pluggedType: " + pluggedType);
}
if (mScreenOff && shouldWifiStayAwake(stayAwakeConditions, mPluggedType) &&
!shouldWifiStayAwake(stayAwakeConditions, pluggedType)) {
long triggerTime = System.currentTimeMillis() + idleMillis;
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
if (DBG) {
Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
}
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
}
mPluggedType = pluggedType;

View File

@@ -136,7 +136,6 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
static final long USB_DISCONNECT_DELAY = 1000;
public Tethering(Context context, Looper looper) {
Log.d(TAG, "Tethering starting");
mContext = context;
mLooper = looper;

View File

@@ -44,6 +44,7 @@ import java.util.Random;
public class GpsXtraDownloader {
private static final String TAG = "GpsXtraDownloader";
static final boolean DEBUG = false;
private Context mContext;
private String[] mXtraServers;
@@ -107,7 +108,7 @@ public class GpsXtraDownloader {
protected static byte[] doDownload(String url, boolean isProxySet,
String proxyHost, int proxyPort) {
if (Config.LOGD) Log.d(TAG, "Downloading XTRA data from " + url);
if (DEBUG) Log.d(TAG, "Downloading XTRA data from " + url);
AndroidHttpClient client = null;
try {
@@ -130,7 +131,7 @@ public class GpsXtraDownloader {
HttpResponse response = client.execute(req);
StatusLine status = response.getStatusLine();
if (status.getStatusCode() != 200) { // HTTP 200 is success.
if (Config.LOGD) Log.d(TAG, "HTTP error: " + status.getReasonPhrase());
if (DEBUG) Log.d(TAG, "HTTP error: " + status.getReasonPhrase());
return null;
}
@@ -159,7 +160,7 @@ public class GpsXtraDownloader {
}
return body;
} catch (Exception e) {
if (Config.LOGD) Log.d(TAG, "error " + e);
if (DEBUG) Log.d(TAG, "error " + e);
} finally {
if (client != null) {
client.close();